export type D1Row = Record<string, unknown>;
export interface D1PreparedStatementLike {
    bind(...values: unknown[]): D1PreparedStatementLike;
    first<T extends D1Row = D1Row>(): Promise<T | null>;
    all<T extends D1Row = D1Row>(): Promise<{
        results: T[];
    }>;
    run(): Promise<unknown>;
}
export interface D1DatabaseLike {
    prepare(query: string): D1PreparedStatementLike;
    exec?(query: string): Promise<unknown>;
}
export declare function toDate(value: unknown): Date | undefined;
export declare function toNumber(value: unknown, fallback?: number): number;
export declare function toStringValue(value: unknown, fallback?: string): string;
export declare function safeJsonParse<T>(value: unknown): T | undefined;
export declare function queryAll<T extends D1Row = D1Row>(db: D1DatabaseLike, sql: string, params?: readonly unknown[]): Promise<T[]>;
export declare function queryFirst<T extends D1Row = D1Row>(db: D1DatabaseLike, sql: string, params?: readonly unknown[]): Promise<T | null>;
export declare function runStatement(db: D1DatabaseLike, sql: string, params?: readonly unknown[]): Promise<void>;
export declare function runStatements(db: D1DatabaseLike, sqlStatements: readonly string[]): Promise<void>;
