import type { ObjectLiteral } from "../../common/ObjectLiteral";
import type { DataSource } from "../../data-source/DataSource";
import type { EntityMetadata } from "../../metadata/EntityMetadata";
import type { QueryRunner } from "../../query-runner/QueryRunner";
import { AbstractSqliteDriver } from "../sqlite-abstract/AbstractSqliteDriver";
import type { ReplicationMode } from "../types/ReplicationMode";
import type { SqljsDataSourceOptions } from "./SqljsDataSourceOptions";
export declare class SqljsDriver extends AbstractSqliteDriver {
    options: SqljsDataSourceOptions;
    constructor(connection: DataSource);
    /**
     * Performs connection to the database.
     */
    connect(): Promise<void>;
    /**
     * Closes connection with database.
     */
    disconnect(): Promise<void>;
    /**
     * Creates a query runner used to execute database queries.
     * @param mode
     */
    createQueryRunner(mode: ReplicationMode): QueryRunner;
    /**
     * Loads a database from a given file (Node.js), local storage key (browser) or array.
     * This will delete the current database!
     * @param fileNameOrLocalStorageOrData
     * @param checkIfFileOrLocalStorageExists
     */
    load(fileNameOrLocalStorageOrData: string | Uint8Array, checkIfFileOrLocalStorageExists?: boolean): Promise<any>;
    /**
     * Saved the current database to the given file (Node.js), local storage key (browser) or
     * indexedDB key (browser with enabled useLocalForage option).
     * If no location path is given, the location path in the options (if specified) will be used.
     * @param location
     */
    save(location?: string): Promise<void>;
    /**
     * This gets called by the QueryRunner when a change to the database is made.
     * If a custom autoSaveCallback is specified, it get's called with the database as Uint8Array,
     * otherwise the save method is called which saves it to file (Node.js), local storage (browser)
     * or indexedDB (browser with enabled useLocalForage option).
     * Don't auto-save when in transaction as the call to export will end the current transaction
     */
    autoSave(): Promise<void>;
    /**
     * Returns the current database as Uint8Array.
     */
    export(): Uint8Array;
    /**
     * Creates generated map of values generated or returned by database after INSERT query.
     * @param metadata
     * @param insertResult
     */
    createGeneratedMap(metadata: EntityMetadata, insertResult: any): ObjectLiteral | undefined;
    /**
     * Creates connection with the database.
     * If the location option is set, the database is loaded first.
     */
    protected createDatabaseConnection(): Promise<any>;
    /**
     * Creates connection with an optional database.
     * If database is specified it is loaded, otherwise a new empty database is created.
     * @param database
     */
    protected createDatabaseConnectionWithImport(database?: Uint8Array): Promise<any>;
    /**
     * If driver dependency is not given explicitly, then try to load it via "require".
     */
    protected loadDependencies(): void;
}
