import type { SQLOutputValue } from 'node:sqlite';

export type DbRow = Record<string, SQLOutputValue>;

export function asRow<T>(row: DbRow | undefined): T | undefined {
  return row as unknown as T | undefined;
}

export function asRows<T>(rows: DbRow[]): T[] {
  return rows as unknown as T[];
}
