aboutsummaryrefslogtreecommitdiff
path: root/src/database.py
diff options
context:
space:
mode:
authorJoris2020-05-31 13:59:35 +0200
committerJoris2020-05-31 13:59:35 +0200
commit0f1610333324d58acafee8c0fa9d9c9bc293b219 (patch)
tree302c37dd3751e9fe2e50ab656d56253bfd2d55fc /src/database.py
parent8a6e10d401eea8db0947f8c4b309b8a6256f9748 (diff)
downloadtodo-0f1610333324d58acafee8c0fa9d9c9bc293b219.tar.gz
todo-0f1610333324d58acafee8c0fa9d9c9bc293b219.tar.bz2
todo-0f1610333324d58acafee8c0fa9d9c9bc293b219.zip
Use defined tags for tasks
Diffstat (limited to 'src/database.py')
-rw-r--r--src/database.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/database.py b/src/database.py
new file mode 100644
index 0000000..478f62e
--- /dev/null
+++ b/src/database.py
@@ -0,0 +1,19 @@
+import db.init
+
+_database = None
+
+def init(path):
+ global _database
+ _database = db.init.init(path)
+
+def cursor():
+ global _database
+ return _database.cursor()
+
+def commit():
+ global _database
+ _database.commit()
+
+def close():
+ global _database
+ _database.close()