import type { DuckDBPreparedStatement } from '@duckdb/node-api';
import { MastraBase } from '@mastra/core/base';
/**
 * Bind a single parameter to a prepared statement using explicit typed methods.
 * This avoids the "Cannot create values of type ANY" error that occurs when
 * DuckDB cannot infer parameter types from SQL context (e.g. json_extract_string).
 */
export declare function bindParam(stmt: DuckDBPreparedStatement, index: number, value: unknown): void;
/** Configuration for the DuckDB database connection. */
export interface DuckDBStorageConfig {
    /** Path to the DuckDB file. Defaults to 'mastra.duckdb'. Use ':memory:' for ephemeral. */
    path?: string;
}
/**
 * Shared DuckDB connection management for Mastra storage.
 * Defaults to a local file (`mastra.duckdb`) when no path is provided.
 * Pass `path: ':memory:'` for an ephemeral in-memory database.
 */
export declare class DuckDBConnection extends MastraBase {
    private instance;
    private initialized;
    private initPromise;
    private path;
    constructor(config?: DuckDBStorageConfig);
    private initialize;
    /** Create a new connection to the DuckDB instance, initializing if needed. */
    getConnection(): Promise<import("@duckdb/node-api").DuckDBConnection>;
    private closeConnection;
    /**
     * Execute a SQL query and return results as objects.
     */
    query<T = Record<string, unknown>>(sql: string, params?: unknown[]): Promise<T[]>;
    /**
     * Execute a SQL statement without returning results.
     */
    execute(sql: string, params?: unknown[]): Promise<void>;
    /**
     * Execute multiple SQL statements in order using a single DuckDB connection.
     *
     * This is intended for schema setup/migrations where statements have no
     * parameters and must remain ordered, but opening a connection per statement
     * would dominate initialization cost. Blank statements are skipped. Like
     * calling execute() repeatedly, this does not wrap statements in a transaction,
     * so prior statements can remain applied if a later statement fails.
     */
    executeBatch(sqlStatements: readonly string[]): Promise<void>;
    /**
     * Escape a value for safe inline SQL use.
     * DuckDB prepared statements can't handle NULL for parameters typed as ANY,
     * so for complex INSERT/UPDATE operations we inline values safely.
     */
    static sqlValue(value: unknown): string;
    /** Release the DuckDB instance, allowing garbage collection. */
    close(): Promise<void>;
}
//# sourceMappingURL=index.d.ts.map