add more to the inital migration, and refactor the locations of types

This commit is contained in:
2025-05-25 17:55:04 -06:00
parent b597b17eec
commit 60be32e120
6 changed files with 207 additions and 85 deletions

View File

@@ -0,0 +1,14 @@
export type SqlValue = string | number | null | Uint8Array;
export interface QueryExecResult {
columns: Array<string>;
values: Array<Array<SqlValue>>;
}
export interface DatabaseService {
initialize(): Promise<void>;
query(sql: string, params?: any[]): Promise<QueryExecResult[]>;
run(sql: string, params?: any[]): Promise<{ changes: number; lastId?: number }>;
get(sql: string, params?: any[]): Promise<any[] | undefined>;
all(sql: string, params?: any[]): Promise<any[][]>;
}