diff options
author | dusoleil <howcansocksbereal@gmail.com> | 2022-08-27 00:39:58 -0400 |
---|---|---|
committer | dusoleil <howcansocksbereal@gmail.com> | 2022-08-27 00:39:58 -0400 |
commit | e4322bde34c2c8c864e3fd40bd254894d18fb15f (patch) | |
tree | fb07ac99416cbe258bb8415e39eeb1597b7be8d1 /data_model | |
parent | 260fa2214e298686678d43ca58bcbfd493d563b3 (diff) | |
download | Planner-e4322bde34c2c8c864e3fd40bd254894d18fb15f.tar.gz Planner-e4322bde34c2c8c864e3fd40bd254894d18fb15f.zip |
Add Main Schedule Screen Prototype
Diffstat (limited to 'data_model')
-rw-r--r-- | data_model/TimeSlot.gd | 9 |
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"
|