blob: fa044a5122cfc83aac154e11d47a79bd41c69546 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
class_name SubTask
class SubTask_data:
var id
var task_id
var name
var date_completed
func _init(record):
self.id = record['id']
self.task_id = record['task_id']
self.name = record['name']
self.date_completed = record['date_completed']
static func get_by_task(task_id):
var records = DBMS.query("""
SELECT * FROM "SubTasks"
WHERE task_id = ?
""",
[task_id])
var subtasks = []
for record in records:
subtasks.push_back(SubTask_data.new(record))
return subtasks
|