/opt/canhelp/node_modules/kysely/dist/cjs/dialect/postgres
NameSizeModeActions
postgres-adapter.d.ts36820644editdlrm
postgres-adapter.js10860644editdlrm
postgres-dialect-config.d.ts21900644editdlrm
postgres-dialect-config.js770644editdlrm
postgres-dialect.d.ts17800644editdlrm
postgres-dialect.js15360644editdlrm
postgres-driver.d.ts24390644editdlrm
postgres-driver.js53760644editdlrm
postgres-introspector.d.ts7500644editdlrm
postgres-introspector.js42790644editdlrm
postgres-query-compiler.d.ts2250644editdlrm
postgres-query-compiler.js4830644editdlrm
Edit: /opt/canhelp/node_modules/kysely/dist/cjs/dialect/postgres/postgres-adapter.js (1086B)
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.PostgresAdapter = void 0; const sql_js_1 = require("../../raw-builder/sql.js"); const dialect_adapter_base_js_1 = require("../dialect-adapter-base.js"); // Random id for our transaction lock. const LOCK_ID = BigInt('3853314791062309107'); class PostgresAdapter extends dialect_adapter_base_js_1.DialectAdapterBase { get supportsTransactionalDdl() { return true; } get supportsReturning() { return true; } async acquireMigrationLock(db, _opt) { // Acquire a transaction level advisory lock. await (0, sql_js_1.sql) `select pg_advisory_xact_lock(${sql_js_1.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. } } exports.PostgresAdapter = PostgresAdapter;