import { entityKind } from "drizzle-orm";
import type { Logger } from "drizzle-orm";
import { type RelationalSchemaConfig, type TablesRelationalConfig } from "drizzle-orm";
import { type Query } from "drizzle-orm";
import type { SQLiteAsyncDialect, SQLiteExecuteMethod } from "drizzle-orm/sqlite-core";
import type { SelectedFieldsOrdered } from "drizzle-orm/sqlite-core";
import { type PreparedQueryConfig as PreparedQueryConfigBase, type SQLiteTransactionConfig } from "drizzle-orm/sqlite-core";
import { PreparedQuery as PreparedQueryBase, SQLiteSession } from "drizzle-orm/sqlite-core";
export interface SQLiteD1SessionOptions {
    logger?: Logger;
}
type PreparedQueryConfig = Omit<PreparedQueryConfigBase, "statement" | "run">;
export type D1WranglerResults<T = unknown> = {
    results?: T[];
};
export declare class SQLiteWranglerD1Session<TFullSchema extends Record<string, unknown>, TSchema extends TablesRelationalConfig> extends SQLiteSession<"async", D1WranglerResults, TFullSchema, TSchema> {
    private client;
    private configPath;
    private dbName;
    private schema;
    private options;
    static readonly [entityKind]: string;
    private logger;
    constructor(client: (query: string, configPath: string, dbName: string) => Promise<any>, configPath: string, dbName: string, dialect: SQLiteAsyncDialect, schema: RelationalSchemaConfig<TSchema> | undefined, options?: SQLiteD1SessionOptions);
    prepareQuery(query: Query, fields: SelectedFieldsOrdered | undefined, executeMethod: SQLiteExecuteMethod, customResultMapper?: (rows: unknown[][]) => unknown): PreparedQuery;
    transaction<T>(transaction: (tx: any) => T | Promise<T>, config?: SQLiteTransactionConfig): Promise<T>;
}
export declare class PreparedQuery<T extends PreparedQueryConfig = PreparedQueryConfig> extends PreparedQueryBase<{
    type: "async";
    run: D1WranglerResults;
    all: T["all"];
    get: T["get"];
    values: T["values"];
    execute: T["execute"];
}> {
    private stmt;
    private configPath;
    private dbName;
    private queryString;
    private params;
    private logger;
    private fields;
    private customResultMapper?;
    static readonly [entityKind]: string;
    constructor(stmt: (query: string, configPath: string, dbName: string) => Promise<any>, configPath: string, dbName: string, queryString: string, params: unknown[], logger: Logger, fields: SelectedFieldsOrdered | undefined, executeMethod: SQLiteExecuteMethod, customResultMapper?: ((rows: unknown[][]) => unknown) | undefined);
    run(placeholderValues?: Record<string, unknown>): Promise<D1WranglerResults>;
    all(placeholderValues?: Record<string, unknown>): Promise<T["all"]>;
    get(placeholderValues?: Record<string, unknown>): Promise<T["get"]>;
    private d1ToRawMapping;
    values(placeholderValues?: Record<string, unknown>): Promise<unknown[][]>;
}
export {};
