feat: add SQLite database and persistent task schema
This commit is contained in:
19
types/node-sqlite.d.ts
vendored
Normal file
19
types/node-sqlite.d.ts
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
declare module "node:sqlite" {
|
||||
export type RunResult = {
|
||||
changes: number;
|
||||
lastInsertRowid: number | bigint;
|
||||
};
|
||||
|
||||
export class StatementSync {
|
||||
all(...params: unknown[]): unknown[];
|
||||
get(...params: unknown[]): unknown;
|
||||
run(...params: unknown[]): RunResult;
|
||||
}
|
||||
|
||||
export class DatabaseSync {
|
||||
constructor(location?: string | URL, options?: Record<string, unknown>);
|
||||
close(): void;
|
||||
exec(sql: string): void;
|
||||
prepare(sql: string): StatementSync;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user