1.1 --- a/imiptools/stores/database/common.py Tue May 23 22:15:05 2017 +0200
1.2 +++ b/imiptools/stores/database/common.py Wed May 24 15:41:14 2017 +0200
1.3 @@ -22,7 +22,7 @@
1.4 from imiptools.stores.common import StoreBase, JournalBase
1.5
1.6 from datetime import datetime
1.7 -from imiptools.data import parse_string, to_string
1.8 +from imiptools.data import Object, parse_string, to_string
1.9 from imiptools.dates import format_datetime, get_datetime, to_timezone
1.10 from imiptools.freebusy import FreeBusyDatabaseCollection, \
1.11 FreeBusyGroupDatabaseCollection, \
1.12 @@ -31,6 +31,8 @@
1.13
1.14 def first(l): return l[0]
1.15
1.16 +# Store classes.
1.17 +
1.18 class DatabaseStoreBase(DatabaseOperations):
1.19
1.20 "A database store supporting user-specific locking."
1.21 @@ -164,7 +166,7 @@
1.22
1.23 self.cursor.execute(query, values)
1.24 result = self.cursor.fetchone()
1.25 - return result and parse_string(result[0], "utf-8")
1.26 + return result and Object(parse_string(result[0], "utf-8"))
1.27
1.28 def get_complete_event(self, user, uid):
1.29
1.30 @@ -179,7 +181,7 @@
1.31
1.32 self.cursor.execute(query, values)
1.33 result = self.cursor.fetchone()
1.34 - return result and parse_string(result[0], "utf-8")
1.35 + return result and Object(parse_string(result[0], "utf-8"))
1.36
1.37 def set_complete_event(self, user, uid, node):
1.38
1.39 @@ -273,7 +275,7 @@
1.40
1.41 self.cursor.execute(query, values)
1.42 result = self.cursor.fetchone()
1.43 - return result and parse_string(result[0], "utf-8")
1.44 + return result and Object(parse_string(result[0], "utf-8"))
1.45
1.46 def set_recurrence(self, user, uid, recurrenceid, node):
1.47
1.48 @@ -678,7 +680,7 @@
1.49
1.50 self.cursor.execute(query, values)
1.51 result = self.cursor.fetchone()
1.52 - return result and parse_string(result[0], "utf-8")
1.53 + return result and Object(parse_string(result[0], "utf-8"))
1.54
1.55 def set_counter(self, user, other, node, uid, recurrenceid=None):
1.56