import { ElectricConfigWithDialect } from '../config/index.js'; import { DatabaseAdapter } from './adapter.js'; import { Migrator } from '../migrators/index.js'; import { Notifier } from '../notifiers/index.js'; import { Registry } from '../satellite/index.js'; import { SocketFactory } from '../sockets/index.js'; import { DbName } from '../util/types.js'; import { ElectricNamespace } from './namespace.js'; import { ElectricClient } from '../client/model/client.js'; import { DbSchema } from '../client/model/schema.js'; export { ElectricNamespace }; export type * from './adapter.js'; export interface ElectrifyOptions { adapter?: DatabaseAdapter; /** * Defaults to the migrator for SQLite. */ migrator?: Migrator; notifier?: Notifier; socketFactory?: SocketFactory; registry?: Registry; /** * Function that prepares the database connection. * If not overridden, the default prepare function * enables the `foreign_key` pragma on the DB connection. * @param connection The database connection. * @returns A promise that resolves when the database connection is prepared. */ prepare?: (connection: DatabaseAdapter) => Promise; } /** * This is the primary `electrify()` endpoint that the individual drivers * call once they've constructed their implementations. This function can * also be called directly by tests that don't want to go via the adapter * entrypoints in order to avoid loading the environment dependencies. */ export declare const electrify: >(dbName: DbName, dbDescription: DB, adapter: DatabaseAdapter, socketFactory: SocketFactory, config?: ElectricConfigWithDialect, opts?: Omit) => Promise>;