import { F as FenceSql } from '../../types-BynPp5kU.cjs'; export { B as BundledBackendCapabilityOverrides, C as ContributionDiagnostic, a as ContributionDiagnosticState, b as ContributionRepairEntry, c as ContributionRepairResult, G as GraphIdentityConfig } from '../../types-BynPp5kU.cjs'; export { A as AnyPgDatabase, a as AnyPgTransaction } from '../../postgres-execution-fKW0qRiN.cjs'; export { P as PostgresBackendOptions, c as createPostgresBackend } from '../../postgres-Dp3MpyJt.cjs'; export { S as SerializedResourceDeclaration } from '../../profile-DppApFgt.cjs'; export { C as CreatePostgresTablesOptions, P as PostgresTableNames, a as PostgresTables, c as createPostgresTables, e as edgeClaims, b as edges, f as fulltext, n as nodes, r as recordedClock, d as recordedEdges, g as recordedNodes, s as schemaVersions, t as tables, u as uniques } from '../../postgres-DOBXcZVg.cjs'; export { b as generatePostgresDDL, c as generatePostgresMigrationSQL } from '../../ddl-D_09BfbN.cjs'; import 'zod'; import 'drizzle-orm/pg-core'; import 'drizzle-orm/relations'; import 'drizzle-orm'; import '../../atomic-mutation-program-DMdmc4s0.cjs'; import '../../sqlite-BkQM9ZeI.cjs'; import 'drizzle-orm/sqlite-core'; /** * The bundled PostgreSQL lock-statement spelling every write-fence lock site * consumes through its resolved plan (`fence.sql.*`) instead of spelling * `pg_advisory_xact_lock`, `hashtext(`, `LOCK TABLE`, or * `current_setting('transaction_isolation')` itself. The lock-fence inventory * test ratchets those tokens out of the lock-site files, including trusted * import's table lock and the PostgreSQL profile's extension-DDL lock, both * of which now resolve the same plan every other lock site does and consume * `fence.sql.lockTables(...)` / `fence.sql.acquireKeyed(...)` instead of * spelling `LOCK TABLE` / `pg_advisory_xact_lock` themselves — this module is * the only one left spelling any of these four tokens. * * Built from `SqlFragment` (`../../query/sql-fragment`), not `drizzle-orm`, * so this module stays outside the Drizzle zone and is safe to import from * portable code that only ever needs PostgreSQL's own SQL shape directly * (a raw-connection test fixture, or a session-fact read gated purely on * `dialect === "postgres"` rather than on a resolved lock plan). * * `postgresFenceSql` supplies only the two composable expressions and * `lockTables` — `FenceSql`'s complete member set. The standalone-statement * forms every ordinary lock site actually calls (`acquireKeyed`, * `acquireKeyedWithIsolation`, `isolationFact`) are never spelled here: THE * one owner of "wrap this expression in a standalone `SELECT`" is * `resolveWriteFencePlan`'s `resolveFenceStatements` * (`../capabilities/write-fence.ts`), which derives them from this module's * two expressions for every resolved `lock` or `row` plan, bundled or * custom alike. * `./postgres-schema-write-fence.ts` needs `drizzle-orm` to reach the schema * table, so it cannot live in this module (which imports none); it instead * takes the resolved fence target's own `advisoryLockExpression` / * `isolationFactExpression` members as a parameter and calls them directly, * converting each to Drizzle's own `SQL` at the embedding boundary — so a * derived profile's own `FenceSql` backs that fused statement exactly as it * backs every other lock site, never the bundled spelling unconditionally. * * `advisoryLockSingleExpression` is exported bare, unlike the module's other * two expressions: it spells the ONE-argument `pg_advisory_xact_lock(bigint)` * form, which occupies a lock space distinct from every namespaced * two-argument lock this module builds and is not a `FenceSql` member — under * the schema-commit fence's `"lock"` plan arm (`postgres.ts`), it and the * graph-template instantiation statement's advisory-lock variant * (`graph-template-sql.ts`) both import it directly and take it on * `hashtext(graphId)`, so they mutually exclude — calling back into this one * function is what keeps that guarantee from drifting into two independently * spelled lock calls. Under the fence's `"row"` plan arm, neither side takes * this lock: both instead take the same portable fence row. */ /** The bundled PostgreSQL backend's {@link FenceSql} declaration. */ declare const postgresFenceSql: FenceSql; export { postgresFenceSql };