/opt/canhelp/node_modules/kysely/dist/esm/dialect/postgres
NameSizeModeActions
postgres-adapter.d.ts36820644editdlrm
postgres-adapter.js9260644editdlrm
postgres-dialect-config.d.ts21900644editdlrm
postgres-dialect-config.js680644editdlrm
postgres-dialect.d.ts17800644editdlrm
postgres-dialect.js13110644editdlrm
postgres-driver.d.ts24390644editdlrm
postgres-driver.js49730644editdlrm
postgres-introspector.d.ts7500644editdlrm
postgres-introspector.js40780644editdlrm
postgres-query-compiler.d.ts2250644editdlrm
postgres-query-compiler.js3390644editdlrm
Edit: /opt/canhelp/node_modules/kysely/dist/esm/dialect/postgres/postgres-adapter.js (926B)
/// import { sql } from '../../raw-builder/sql.js'; import { DialectAdapterBase } from '../dialect-adapter-base.js'; // Random id for our transaction lock. const LOCK_ID = BigInt('3853314791062309107'); export class PostgresAdapter extends DialectAdapterBase { get supportsTransactionalDdl() { return true; } get supportsReturning() { return true; } async acquireMigrationLock(db, _opt) { // Acquire a transaction level advisory lock. await sql `select pg_advisory_xact_lock(${sql.lit(LOCK_ID)})`.execute(db); } async releaseMigrationLock(_db, _opt) { // Nothing to do here. `pg_advisory_xact_lock` is automatically released at the // end of the transaction and since `supportsTransactionalDdl` true, we know // the `db` instance passed to acquireMigrationLock is actually a transaction. } }