summaryrefslogtreecommitdiffstats
path: root/data_model/TimeSlot.gd
diff options
context:
space:
mode:
Diffstat (limited to 'data_model/TimeSlot.gd')
-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"