diff options
Diffstat (limited to '')
-rw-r--r-- | storage/sqlite.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/storage/sqlite.py b/storage/sqlite.py new file mode 100644 index 0000000..8a24858 --- /dev/null +++ b/storage/sqlite.py @@ -0,0 +1,17 @@ +from storageBase import storageBase +from itemList import itemList +from pysqlite2 import dbapi2 as sqliteBackend + +class sqlite(storageBase): + def __init__(self): + self.con = sqliteBackend.connect(self.getConfigDir() + '/data.sqlite') + + def __del__(self): + self.con.close() + + def load(self): + return itemList(self) + + def notifyChange(self, sender): + print '%s %s' % ('Save changes:', sender.getCreatedAt()) + return |