export type SqlValue = string | number | null | Uint8Array; export interface QueryExecResult { columns: Array; values: Array>; } export interface DatabaseExecResult { changes: number; lastId?: number; } export interface DatabaseService { initialize(): Promise; query(sql: string, params?: unknown[]): Promise; run(sql: string, params?: unknown[]): Promise; } /** * Generic database result type for mapped query results */ export type DatabaseResult> = T; /** * Database query result that can be either a single result or an array */ export type DatabaseQueryResult> = T | T[] | null;