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