aboutsummaryrefslogtreecommitdiff
path: root/todo/database.py
diff options
context:
space:
mode:
Diffstat (limited to 'todo/database.py')
-rw-r--r--todo/database.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/todo/database.py b/todo/database.py
new file mode 100644
index 0000000..b571e88
--- /dev/null
+++ b/todo/database.py
@@ -0,0 +1,19 @@
+import todo.db.init
+
+_database = None
+
+def init(path):
+ global _database
+ _database = todo.db.init.init(path)
+
+def cursor():
+ global _database
+ return _database.cursor()
+
+def commit():
+ global _database
+ _database.commit()
+
+def close():
+ global _database
+ _database.close()