summaryrefslogtreecommitdiffstats
path: root/data_model
diff options
context:
space:
mode:
authordusoleil <howcansocksbereal@gmail.com>2022-08-27 00:39:58 -0400
committerdusoleil <howcansocksbereal@gmail.com>2022-08-27 00:39:58 -0400
commite4322bde34c2c8c864e3fd40bd254894d18fb15f (patch)
treefb07ac99416cbe258bb8415e39eeb1597b7be8d1 /data_model
parent260fa2214e298686678d43ca58bcbfd493d563b3 (diff)
downloadPlanner-e4322bde34c2c8c864e3fd40bd254894d18fb15f.tar.gz
Planner-e4322bde34c2c8c864e3fd40bd254894d18fb15f.zip
Add Main Schedule Screen Prototype
Diffstat (limited to 'data_model')
-rw-r--r--data_model/TimeSlot.gd9
1 files changed, 9 insertions, 0 deletions
diff --git a/data_model/TimeSlot.gd b/data_model/TimeSlot.gd
index f98cd62..80b7671 100644
--- a/data_model/TimeSlot.gd
+++ b/data_model/TimeSlot.gd
@@ -16,6 +16,15 @@ class TimeSlot_data:
self.name = record['name']
self.date_completed = record['date_completed']
+static func get_by_id(id):
+ var record = DBMS.query("""
+ SELECT * FROM "TimeSlots"
+ WHERE id = ?
+ """,
+ [id])
+ record = record[0]
+ return TimeSlot_data.new(record)
+
static func get_by_schedule_name(schedule_name):
var records = DBMS.query("""
SELECT "TimeSlots".* FROM "TimeSlots"