From e4322bde34c2c8c864e3fd40bd254894d18fb15f Mon Sep 17 00:00:00 2001 From: dusoleil Date: Sat, 27 Aug 2022 00:39:58 -0400 Subject: Add Main Schedule Screen Prototype --- data_model/TimeSlot.gd | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'data_model/TimeSlot.gd') 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" -- cgit v1.2.3