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?: unknown[]): Promise<QueryExecResult[]>;
  run(
    sql: string,
    params?: unknown[],
  ): Promise<{ changes: number; lastId?: number }>;
}
