/**
 * Database initialization with driver auto-detection.
 *
 * Selects the appropriate database driver based on `database_url`:
 * - `postgres://` or `postgresql://` — uses `pg` (PostgreSQL)
 * - `file://` — uses `@electric-sql/pglite` (file-based)
 * - `memory://` — uses `@electric-sql/pglite` (in-memory)
 *
 * Both `pg` and `@electric-sql/pglite` are optional peer dependencies,
 * dynamically imported only when needed. For direct driver construction
 * without auto-detection, use `db/db_pg.ts` or `db/db_pglite.ts`.
 *
 * @module
 */
import type { Db, DbType } from './db.js';
/** Result of database initialization. */
export interface CreateDbResult {
    db: Db;
    /** Close the database connection. Bound to the actual driver at construction. */
    close: () => Promise<void>;
    db_type: DbType;
    db_name: string;
}
/**
 * Create a database connection based on a URL.
 *
 * The `close` callback is bound to the actual driver — callers never need to
 * know which driver is in use.
 *
 * For direct driver construction without URL routing, import
 * `create_pg_db` from `db/db_pg.ts` or `create_pglite_db` from `db/db_pglite.ts`.
 *
 * @param database_url - connection URL (`postgres://`, `postgresql://`, `file://`, or `memory://`)
 * @returns database instance, close callback, type, and display name
 * @throws Error if `database_url` uses an unsupported scheme. Driver
 *   construction (`pg.Pool` or `PGlite`) may also throw on bad connection
 *   parameters or missing peer-dependency packages.
 */
export declare const create_db: (database_url: string) => Promise<CreateDbResult>;
//# sourceMappingURL=create_db.d.ts.map