import { DbLease, DbLeaseHolder, DbLeaseOwner, SqliteConnectionPool } from "./SqlitePooledTypes"; import { SqliteLibrary } from "./SqliteLibrary"; /** * A single write connection to the database. */ export declare class SqliteWriteConnection implements SqliteConnectionPool, DbLeaseOwner { private readonly sqliteLibrary; private readonly options; private writeConnectionPromise; private isReleased; /** * Mutex to control access to the write connection. */ private readonly writeConnectionMutex; private dbLease; constructor(sqliteLibrary: SqliteLibrary, options: { acquireTimeout: number; destroyTimeout: number; }); connect(): Promise; close(): Promise; runExclusive(dbLeaseHolder: DbLeaseHolder, callback: (dbLease: DbLease) => Promise): Promise; leaseConnection(dbLeaseHolder: DbLeaseHolder): Promise; releaseConnection(leasedDbConnection: DbLease): Promise; private createAndGetConnection; private createConnection; private assertNotReleased; private captureInvariantViolated; private throwLockTimeoutError; }