This commit is contained in:
2023-06-08 22:47:46 +08:00
parent 2002dd4749
commit 7b5ba18d89
11 changed files with 193 additions and 34 deletions

5
db.ts
View File

@@ -524,6 +524,11 @@ export class EhDb {
);
return s.length ? s[0] : undefined;
}
get_tasks() {
return this.transaction(() =>
this.db.queryEntries<Task>("SELECT * FROM task;")
);
}
get_tasks_by_pid(pid: number) {
return this.transaction(() =>
this.db.queryEntries<Task>("SELECT * FROM task WHERE pid = ?;", [