summaryrefslogtreecommitdiffstats
path: root/data_model/dbms.gd
diff options
context:
space:
mode:
Diffstat (limited to 'data_model/dbms.gd')
-rw-r--r--data_model/dbms.gd16
1 files changed, 16 insertions, 0 deletions
diff --git a/data_model/dbms.gd b/data_model/dbms.gd
new file mode 100644
index 0000000..43c514d
--- /dev/null
+++ b/data_model/dbms.gd
@@ -0,0 +1,16 @@
+#class_name DBMS
+extends Node
+
+const sqlite = preload("res://addons/godot-sqlite/bin/gdsqlite.gdns")
+var db_name = "res://data_model/data.db"
+var db
+
+func _init():
+ db = sqlite.new()
+ db.path = db_name
+ #db.verbosity_level = 3
+ db.open_db()
+
+func query(sql, args):
+ db.query_with_bindings(sql,args)
+ return db.query_result