import { AsyncLocalStorage } from "async_hooks"; import { type Knex } from "knex"; import { type SonamuConfig } from "../api/config"; import { type EnvironmentSnapshots, type SonamuEnvironment } from "../env"; import { TransactionContext } from "./transaction-context"; export type SonamuMainDBPreset = "test" | "fixture" | SonamuEnvironment; export type SonamuReadonlyDBPreset = "test_readonly" | "development_readonly" | "staging_readonly" | "production_readonly"; export type SonamuDBPreset = SonamuMainDBPreset | SonamuReadonlyDBPreset; export type DBPreset = "w" | "r" | SonamuDBPreset; export type SonamuDBConfig = Record; export declare class DBClass { private wdb?; private rdb?; private presetDBs; private workerDBs; private currentConfig; transactionStorage: AsyncLocalStorage; runWithTransaction(callback: () => Promise): Promise; setConfig(dbConfig: SonamuDBConfig): void; private getCurrentConfig; getTransactionContext(): TransactionContext; getDB(which: DBPreset): Knex; private getWorkerDB; getDBConfig(which: DBPreset): Knex.Config; destroy(): Promise; generateDBConfig(config: SonamuConfig["database"], projectName?: string, snapshots?: EnvironmentSnapshots): SonamuDBConfig; testTransaction: Knex.Transaction | null; createTestTransaction(): Promise; clearTestTransaction(): Promise; getTestConnection(): Promise; } export declare const DB: DBClass; //# sourceMappingURL=db.d.ts.map