@dbsp/adapter-pgsql 3.2.2 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/dist/index.d.ts +376 -150
- package/dist/index.js +3203 -1674
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as _dbsp_core from '@dbsp/core';
|
|
2
|
-
import { IndexInfo, TruncateOptions, VacuumOptions, AlterColumnOptions, CreateIndexOptions, DropIndexOptions, ExpressionRef, ModelIR as ModelIR$1, ExecutionCoordinator, CapabilityDescriptor } from '@dbsp/core';
|
|
2
|
+
import { IndexInfo, TruncateOptions, VacuumOptions, AlterColumnOptions, CreateIndexOptions, DropIndexOptions, ExpressionRef, ModelIR as ModelIR$1, TransitionRunPersister, ExecutionCoordinator, CapabilityDescriptor } from '@dbsp/core';
|
|
3
3
|
export { normalizeSQL } from '@dbsp/core';
|
|
4
4
|
import * as _dbsp_types from '@dbsp/types';
|
|
5
|
-
import { DialectCapabilities, ModelIR, ColumnListInput, ParamIntent, JsonAggOrderByEntry, IndexIR, HierarchyIR, Adapter, DbCasing, AdapterLogger, AdapterCapabilities, PlanReport, CompiledNqlQuery, CompileOptions, CompiledQuery, CompileResultWithIncludes, SubqueryIncludeInfo, ExpressionIntent, InsertIntent, InsertFromIntent, UpdateIntent, BatchUpdateIntent, DeleteIntent, UpsertIntent, UpsertFromIntent, RecursivePlanReport, CteQueryIntent, SetOperationIntent, DumpMeta, Dump, AdapterStreamOptions, PinnedConnectionOptions, TransactionOptions,
|
|
5
|
+
import { DialectCapabilities, ModelIR, ColumnListInput, ParamIntent, JsonAggOrderByEntry, IndexIR, HierarchyIR, Adapter, DbCasing, AdapterLogger, AdapterCapabilities, ConnectionAvailability, PlanReport, CompiledNqlQuery, CompileOptions, CompiledQuery, CompileResultWithIncludes, SubqueryIncludeInfo, ExpressionIntent, InsertIntent, InsertFromIntent, UpdateIntent, BatchUpdateIntent, DeleteIntent, UpsertIntent, UpsertFromIntent, RecursivePlanReport, CteQueryIntent, SetOperationIntent, DumpMeta, Dump, AdapterStreamOptions, PinnedConnectionOptions, TransactionOptions, ColumnIR, MutationReturningItem, WhereIntent, OutputDescriptor, QueryIntent, OperationKindRef, SemanticArtifactRef, ProvenPlanShape, PostgreSqlObservationTargetIdentity, ExecutionContract, TransitionSessionClient, TransitionRunJournal, TransitionLessor, ObservationIssuer, ObservationRequest, ObservationContext, EvidenceObservation, TypeRef, ExpressionValue, CollationRef, LogicalIdentity, PhysicalOperation, OperationEffectAssessment, FingerprintManifest, DurableIntentRecord, IssuedObservation, ApplyGuard, AdvisoryObservation, TransactionalCompletionRecord, StepJournal, UnsafeNativeFragment, ResourceAddress, ExecutableAssertion, Assumption, TransitionRule, TransitionCompositionFact, TrustRoot, RequiredEnumLabelIR } from '@dbsp/types';
|
|
6
6
|
import * as _pgsql_types from '@pgsql/types';
|
|
7
7
|
import { Node, OnConflictClause, ParamRef } from '@pgsql/types';
|
|
8
8
|
import { Pool, PoolClient } from 'pg';
|
|
@@ -888,6 +888,11 @@ type PgsqlTransactionTimeoutParameter = 'lock_timeout' | 'statement_timeout';
|
|
|
888
888
|
* @module pgsql-adapter
|
|
889
889
|
*/
|
|
890
890
|
|
|
891
|
+
declare const rollbackOnlyPgsqlScopeBrand: unique symbol;
|
|
892
|
+
/** A scope minted by withScratchScope and guaranteed to roll back on success. */
|
|
893
|
+
type RollbackOnlyPgsqlScope<DB = unknown> = PgsqlAdapter<DB> & {
|
|
894
|
+
readonly [rollbackOnlyPgsqlScopeBrand]: typeof rollbackOnlyPgsqlScopeBrand;
|
|
895
|
+
};
|
|
891
896
|
type PgAdvisoryLockKey = bigint | {
|
|
892
897
|
readonly classId: number;
|
|
893
898
|
readonly objId: number;
|
|
@@ -1029,6 +1034,7 @@ declare class PgsqlAdapter<DB = unknown> implements Adapter<DB> {
|
|
|
1029
1034
|
private readonly managedTransactions;
|
|
1030
1035
|
private readonly adapterManagedTransaction;
|
|
1031
1036
|
private readonly adapterManagedPinnedConnection;
|
|
1037
|
+
private readonly rollbackOnlyScope;
|
|
1032
1038
|
private readonly scopeToken;
|
|
1033
1039
|
private readonly scopeState;
|
|
1034
1040
|
private readonly schemaName;
|
|
@@ -1072,11 +1078,13 @@ declare class PgsqlAdapter<DB = unknown> implements Adapter<DB> {
|
|
|
1072
1078
|
private compileNqlBundleLeafEnvelope;
|
|
1073
1079
|
private compileNqlBundle;
|
|
1074
1080
|
/**
|
|
1075
|
-
* Returns the pool/client executor, or
|
|
1081
|
+
* Returns the pool/client executor, or refuses a connectionless adapter.
|
|
1076
1082
|
*/
|
|
1077
1083
|
private requireConnection;
|
|
1078
1084
|
/** Adapter capabilities for feature detection */
|
|
1079
1085
|
get capabilities(): AdapterCapabilities;
|
|
1086
|
+
/** Per-instance connection state, distinct from PostgreSQL capabilities. */
|
|
1087
|
+
get connectionAvailability(): ConnectionAvailability;
|
|
1080
1088
|
/** PostgreSQL dialect capabilities for planner strategy selection */
|
|
1081
1089
|
get dialectCapabilities(): DialectCapabilities;
|
|
1082
1090
|
/**
|
|
@@ -1304,12 +1312,16 @@ declare class PgsqlAdapter<DB = unknown> implements Adapter<DB> {
|
|
|
1304
1312
|
* Execute scratch PostgreSQL work in a scope that always rolls back on success.
|
|
1305
1313
|
*
|
|
1306
1314
|
* This is intentionally PostgreSQL-adapter-specific. It is used for catalog
|
|
1307
|
-
* shaped scratch DDL such as
|
|
1308
|
-
*
|
|
1315
|
+
* shaped scratch DDL such as expression canonicalisation, where the caller
|
|
1316
|
+
* needs PostgreSQL's rendering but must not keep the scratch objects. This
|
|
1317
|
+
* scope has exactly one successful exit: rollback. In a caller transaction,
|
|
1318
|
+
* only this outer savepoint is retained after rollback; nested work releases
|
|
1319
|
+
* normally, so a large canonicalisation run cannot retain one subtransaction
|
|
1320
|
+
* per expression.
|
|
1309
1321
|
* Rollback here is cleanup of dbsp-created work, not a sandbox for arbitrary
|
|
1310
1322
|
* session effects.
|
|
1311
1323
|
*/
|
|
1312
|
-
withScratchScope<T>(fn: (adapter:
|
|
1324
|
+
withScratchScope<T>(fn: (adapter: RollbackOnlyPgsqlScope<DB>) => Promise<T>): Promise<T>;
|
|
1313
1325
|
private createManagedClientAdapter;
|
|
1314
1326
|
private createPinnedConnectionAdapter;
|
|
1315
1327
|
private createChildTransactionObserver;
|
|
@@ -1499,10 +1511,11 @@ declare class PgsqlAdapter<DB = unknown> implements Adapter<DB> {
|
|
|
1499
1511
|
declare function createPgsqlAdapter<DB = unknown>(pool: Pool, options?: PgsqlPoolAdapterOptions): PgsqlAdapter<DB>;
|
|
1500
1512
|
declare function createPgsqlAdapter<DB = unknown>(client: PoolClient, options: PgsqlBorrowedClientAdapterOptions): PgsqlAdapter<DB>;
|
|
1501
1513
|
/**
|
|
1502
|
-
* Creates a
|
|
1514
|
+
* Creates a connectionless PgsqlAdapter for SQL generation without a database connection.
|
|
1503
1515
|
*
|
|
1504
1516
|
* All compilation methods (compile, compileInsert, etc.), createDump(), and generateDDL()
|
|
1505
|
-
* work normally.
|
|
1517
|
+
* work normally. The adapter has the full PgsqlAdapter surface; database operations refuse
|
|
1518
|
+
* at runtime until it is constructed with a connection via createPgsqlAdapter(pool).
|
|
1506
1519
|
*
|
|
1507
1520
|
* @example
|
|
1508
1521
|
* ```typescript
|
|
@@ -1515,7 +1528,57 @@ declare function createPgsqlAdapter<DB = unknown>(client: PoolClient, options: P
|
|
|
1515
1528
|
* console.log(dump.sql);
|
|
1516
1529
|
* ```
|
|
1517
1530
|
*/
|
|
1518
|
-
declare function createPgsqlCompileOnlyAdapter<DB = unknown>(options?: PgsqlAdapterOptions):
|
|
1531
|
+
declare function createPgsqlCompileOnlyAdapter<DB = unknown>(options?: PgsqlAdapterOptions): PgsqlAdapter<DB>;
|
|
1532
|
+
|
|
1533
|
+
interface CheckConstraintCanonicalizationWarning {
|
|
1534
|
+
readonly table: string;
|
|
1535
|
+
readonly kind: 'check_constraint';
|
|
1536
|
+
readonly name: string;
|
|
1537
|
+
readonly constraint: string;
|
|
1538
|
+
readonly message: string;
|
|
1539
|
+
readonly cause: unknown;
|
|
1540
|
+
}
|
|
1541
|
+
interface ColumnDefaultCanonicalizationWarning {
|
|
1542
|
+
readonly table: string;
|
|
1543
|
+
readonly kind: 'column_default';
|
|
1544
|
+
readonly name: string;
|
|
1545
|
+
readonly message: string;
|
|
1546
|
+
readonly cause: unknown;
|
|
1547
|
+
readonly outcome?: 'unavailable' | 'rejected' | 'refused';
|
|
1548
|
+
/** Whether this warning represents a raw fallback or absent counterpart. */
|
|
1549
|
+
readonly comparison: 'raw' | 'unpaired';
|
|
1550
|
+
/** Present when the default could not be paired with the opposite model side. */
|
|
1551
|
+
readonly side?: 'desired' | 'database';
|
|
1552
|
+
}
|
|
1553
|
+
type ExpressionCanonicalizationWarning = CheckConstraintCanonicalizationWarning | ColumnDefaultCanonicalizationWarning;
|
|
1554
|
+
interface CanonicalizeCheckConstraintsOptions {
|
|
1555
|
+
/** Database schema that owns the target tables and target-scoped enum types. */
|
|
1556
|
+
readonly schemaName?: string;
|
|
1557
|
+
/** Naming convention used when matching desired table names to DB table names. */
|
|
1558
|
+
readonly dbCasing?: DbCasing;
|
|
1559
|
+
/** Called when PostgreSQL CHECK canonicalisation fails and raw comparison is used. */
|
|
1560
|
+
readonly onWarning?: (warning: CheckConstraintCanonicalizationWarning) => void;
|
|
1561
|
+
/** Throw instead of falling back to raw comparison when canonicalisation fails. */
|
|
1562
|
+
readonly requireCanonicalization?: boolean;
|
|
1563
|
+
/** Skip CHECK scratch work when the caller's dialect does not support CHECK DDL. */
|
|
1564
|
+
readonly canonicalizeCheckConstraints?: boolean;
|
|
1565
|
+
}
|
|
1566
|
+
declare class CheckConstraintCanonicalizationError extends Error {
|
|
1567
|
+
readonly table: string;
|
|
1568
|
+
readonly constraints: readonly string[];
|
|
1569
|
+
readonly cause: unknown;
|
|
1570
|
+
constructor(table: string, constraints: readonly string[], cause: unknown);
|
|
1571
|
+
}
|
|
1572
|
+
declare class ColumnDefaultCanonicalizationError extends Error {
|
|
1573
|
+
readonly table: string;
|
|
1574
|
+
readonly column: string;
|
|
1575
|
+
readonly cause: unknown;
|
|
1576
|
+
constructor(table: string, column: string, cause: unknown);
|
|
1577
|
+
}
|
|
1578
|
+
/**
|
|
1579
|
+
* Canonicalise PostgreSQL CHECK constraint expressions in a desired model.
|
|
1580
|
+
*/
|
|
1581
|
+
declare function canonicalizeCheckConstraints(adapter: RollbackOnlyPgsqlScope, desired: ModelIR, dbModel: ModelIR, options?: CanonicalizeCheckConstraintsOptions): Promise<ModelIR>;
|
|
1519
1582
|
|
|
1520
1583
|
/**
|
|
1521
1584
|
* Schema Comparison Engine (DDL-PROV Block 1)
|
|
@@ -1586,13 +1649,16 @@ interface CompareSchemataOptions {
|
|
|
1586
1649
|
*
|
|
1587
1650
|
* `compareSchemata()` is intentionally pure and cannot ask PostgreSQL to
|
|
1588
1651
|
* canonicalise raw-SQL expression surfaces. By default it keeps the historic
|
|
1589
|
-
* best-effort
|
|
1590
|
-
* predicates, and index expressions. Set this flag to throw when either model
|
|
1652
|
+
* best-effort verbatim comparison for column defaults, CHECK expressions,
|
|
1653
|
+
* partial-index predicates, and index expressions. Set this flag to throw when either model
|
|
1591
1654
|
* contains one of those surfaces so a caller cannot accidentally rely on a
|
|
1592
1655
|
* compile-only diff for a convergence-sensitive check.
|
|
1593
1656
|
*
|
|
1594
1657
|
* Live PostgreSQL callers should use `comparePgsqlDatabaseSchema()`, which
|
|
1595
|
-
* canonicalises CHECK constraint expressions before calling this function.
|
|
1658
|
+
* canonicalises CHECK constraint expressions and column defaults before calling this function.
|
|
1659
|
+
* Under that live mode, every default surface considered under this option is
|
|
1660
|
+
* either canonicalised as a pair or explicitly refused. This does not prove
|
|
1661
|
+
* that the resulting migration is executable.
|
|
1596
1662
|
* Partial-index predicates and index expressions are not canonicalised by the
|
|
1597
1663
|
* live helper and are rejected there when this strict flag is set.
|
|
1598
1664
|
*/
|
|
@@ -1614,36 +1680,44 @@ declare function compareSchemata(schema: ModelIR, db: ModelIR, options?: Compare
|
|
|
1614
1680
|
|
|
1615
1681
|
interface ComparePgsqlDatabaseSchemaOptions extends CompareSchemataOptions, SchemaScopeOptions {
|
|
1616
1682
|
/**
|
|
1617
|
-
* Whether to canonicalise PostgreSQL CHECK constraint expressions before
|
|
1683
|
+
* Whether to canonicalise PostgreSQL CHECK constraint expressions and column defaults before
|
|
1618
1684
|
* comparing. Defaults to `true`. Set to `false` only for compatibility with
|
|
1619
1685
|
* legacy raw-string live diffs.
|
|
1620
1686
|
*
|
|
1621
|
-
* Live canonicalisation creates temporary scratch tables
|
|
1622
|
-
*
|
|
1623
|
-
*
|
|
1624
|
-
*
|
|
1625
|
-
*
|
|
1626
|
-
* falls back to best-effort raw string comparison for the affected CHECK
|
|
1627
|
-
* constraints.
|
|
1687
|
+
* Live canonicalisation creates temporary scratch tables inside an adapter
|
|
1688
|
+
* scratch scope whose successful cleanup is rollback. The database role needs
|
|
1689
|
+
* permission to create temporary tables and use the scratch column types. If
|
|
1690
|
+
* PostgreSQL refuses that scratch DDL, non-strict mode warns and falls back to
|
|
1691
|
+
* best-effort raw string comparison for the affected expression surfaces.
|
|
1628
1692
|
*/
|
|
1629
1693
|
readonly canonicalizeExpressions?: boolean;
|
|
1630
1694
|
/**
|
|
1631
|
-
* Receives live
|
|
1695
|
+
* Receives live expression canonicalisation warnings. Defaults to console.warn.
|
|
1632
1696
|
*/
|
|
1633
1697
|
readonly onWarning?: (message: string) => void;
|
|
1698
|
+
/** Receives the identity-bearing canonicalisation warning before its string form. */
|
|
1699
|
+
readonly onExpressionCanonicalizationWarning?: (warning: ExpressionCanonicalizationWarning) => void;
|
|
1634
1700
|
/**
|
|
1635
1701
|
* Diff that the caller just applied before this live re-diff. Used only when
|
|
1636
|
-
* CHECK expressions are compared by raw text to fail loudly if the exact same
|
|
1702
|
+
* CHECK expressions or column defaults are compared by raw text to fail loudly if the exact same
|
|
1637
1703
|
* expression-surface drift appears again after re-introspection.
|
|
1638
1704
|
*/
|
|
1639
1705
|
readonly previouslyAppliedDiff?: SchemaDiff;
|
|
1640
1706
|
}
|
|
1641
|
-
|
|
1707
|
+
type NonConvergentSchemaDiffSurface = {
|
|
1708
|
+
readonly kind: 'check_constraint';
|
|
1642
1709
|
readonly table: string;
|
|
1643
1710
|
readonly constraint: string;
|
|
1644
|
-
|
|
1645
|
-
readonly
|
|
1646
|
-
|
|
1711
|
+
} | {
|
|
1712
|
+
readonly kind: 'column_default';
|
|
1713
|
+
readonly table: string;
|
|
1714
|
+
readonly column: string;
|
|
1715
|
+
};
|
|
1716
|
+
declare class NonConvergentSchemaDiffError extends Error {
|
|
1717
|
+
readonly surface: NonConvergentSchemaDiffSurface;
|
|
1718
|
+
readonly desiredExpressionHash: string;
|
|
1719
|
+
readonly databaseExpressionHash: string;
|
|
1720
|
+
constructor(surface: NonConvergentSchemaDiffSurface, desiredExpressionHash: string, databaseExpressionHash: string);
|
|
1647
1721
|
}
|
|
1648
1722
|
/** An enum value this diff adds, reported as a candidate cause — never asserted. */
|
|
1649
1723
|
interface AddedEnumValue {
|
|
@@ -1654,11 +1728,12 @@ declare class CheckConstraintNewEnumValueError extends Error {
|
|
|
1654
1728
|
readonly table: string;
|
|
1655
1729
|
readonly constraint: string;
|
|
1656
1730
|
readonly addedEnumValues: readonly AddedEnumValue[];
|
|
1657
|
-
|
|
1731
|
+
readonly surfaceKind: 'CHECK constraint' | 'column default';
|
|
1732
|
+
constructor(table: string, constraint: string, addedEnumValues: readonly AddedEnumValue[], surfaceKind?: 'CHECK constraint' | 'column default');
|
|
1658
1733
|
}
|
|
1659
1734
|
/**
|
|
1660
1735
|
* Live PostgreSQL schema diff: introspect, canonicalise desired CHECK
|
|
1661
|
-
* constraint expressions through PostgreSQL, then call the pure synchronous
|
|
1736
|
+
* constraint expressions and column defaults through PostgreSQL, then call the pure synchronous
|
|
1662
1737
|
* schema comparator.
|
|
1663
1738
|
*
|
|
1664
1739
|
* If CHECK canonicalisation falls back while the same diff adds a plausibly
|
|
@@ -1673,7 +1748,7 @@ declare class CheckConstraintNewEnumValueError extends Error {
|
|
|
1673
1748
|
* diffs reject them.
|
|
1674
1749
|
*/
|
|
1675
1750
|
declare function comparePgsqlDatabaseSchema(adapter: PgsqlAdapter, desired: ModelIR, options?: ComparePgsqlDatabaseSchemaOptions): Promise<SchemaDiff>;
|
|
1676
|
-
declare function assertNoRepeatedExpressionSurfaceDrift(previouslyAppliedDiff: SchemaDiff, currentDiff: SchemaDiff,
|
|
1751
|
+
declare function assertNoRepeatedExpressionSurfaceDrift(previouslyAppliedDiff: SchemaDiff, currentDiff: SchemaDiff, rawExpressionSurfaces?: ReadonlySet<string>): void;
|
|
1677
1752
|
|
|
1678
1753
|
/**
|
|
1679
1754
|
* Migration SQL Generator (DDL-PROV Block 1)
|
|
@@ -1965,59 +2040,6 @@ declare function getRowEstimates(plans: ExplainPlan[]): {
|
|
|
1965
2040
|
actual: number;
|
|
1966
2041
|
};
|
|
1967
2042
|
|
|
1968
|
-
interface CheckConstraintCanonicalizationWarning {
|
|
1969
|
-
readonly table: string;
|
|
1970
|
-
readonly constraint: string;
|
|
1971
|
-
readonly message: string;
|
|
1972
|
-
readonly cause: unknown;
|
|
1973
|
-
}
|
|
1974
|
-
interface CanonicalizeCheckConstraintsOptions {
|
|
1975
|
-
/** Database schema that owns the target tables and target-scoped enum types. */
|
|
1976
|
-
readonly schemaName?: string;
|
|
1977
|
-
/** Naming convention used when matching desired table names to DB table names. */
|
|
1978
|
-
readonly dbCasing?: DbCasing;
|
|
1979
|
-
/** Called when PostgreSQL CHECK canonicalisation fails and raw comparison is used. */
|
|
1980
|
-
readonly onWarning?: (warning: CheckConstraintCanonicalizationWarning) => void;
|
|
1981
|
-
/** Throw instead of falling back to raw comparison when canonicalisation fails. */
|
|
1982
|
-
readonly requireCanonicalization?: boolean;
|
|
1983
|
-
}
|
|
1984
|
-
type PgsqlCanonicalizationScope = Pick<Adapter, 'executeRaw' | 'transaction'>;
|
|
1985
|
-
declare class CheckConstraintCanonicalizationError extends Error {
|
|
1986
|
-
readonly table: string;
|
|
1987
|
-
readonly constraints: readonly string[];
|
|
1988
|
-
readonly cause: unknown;
|
|
1989
|
-
constructor(table: string, constraints: readonly string[], cause: unknown);
|
|
1990
|
-
}
|
|
1991
|
-
/**
|
|
1992
|
-
* Canonicalise PostgreSQL CHECK constraint expressions in a desired model.
|
|
1993
|
-
*
|
|
1994
|
-
* CHECK constraints are canonicalised by creating a transaction-local temp table
|
|
1995
|
-
* with the desired table's column definitions (borrowing live database type
|
|
1996
|
-
* detail for existing columns when the desired model omits it), adding the
|
|
1997
|
-
* authored CHECK constraints to that temp table, and reading PostgreSQL's
|
|
1998
|
-
* `pg_get_constraintdef()` rendering. The caller must provide a rollback-only
|
|
1999
|
-
* scratch scope; that rollback is cleanup for dbsp-created scratch objects, not
|
|
2000
|
-
* a sandbox for arbitrary session effects.
|
|
2001
|
-
* Missing desired enum types are also created inside that scratch scope before
|
|
2002
|
-
* scratch tables.
|
|
2003
|
-
* Scratch columns include only names and types; defaults, identity, uniqueness,
|
|
2004
|
-
* nullability, and other table-shape clauses are deliberately omitted.
|
|
2005
|
-
*
|
|
2006
|
-
* The returned expression is the full `CHECK (...)` clause. Bare authored
|
|
2007
|
-
* predicates are accepted and become full CHECK clauses.
|
|
2008
|
-
*
|
|
2009
|
-
* PostgreSQL does not allow an enum value added by `ALTER TYPE ... ADD VALUE`
|
|
2010
|
-
* to be used in the same transaction that added it. Because dbsp currently
|
|
2011
|
-
* emits and applies each migration in one transaction, the live diff layer
|
|
2012
|
-
* deliberately refuses CHECK constraints that fall back while the same diff adds
|
|
2013
|
-
* a plausibly referenced enum value. Splitting that into multiple transaction
|
|
2014
|
-
* phases is a separate migration-runner feature.
|
|
2015
|
-
*
|
|
2016
|
-
* This does not canonicalise partial-index predicates or index expressions, so
|
|
2017
|
-
* those surfaces may still compare by raw text in non-strict diffs.
|
|
2018
|
-
*/
|
|
2019
|
-
declare function canonicalizeCheckConstraints(adapter: PgsqlCanonicalizationScope, desired: ModelIR, dbModel: ModelIR, options?: CanonicalizeCheckConstraintsOptions): Promise<ModelIR>;
|
|
2020
|
-
|
|
2021
2043
|
/**
|
|
2022
2044
|
* ParadeDB Extension Wrappers
|
|
2023
2045
|
*
|
|
@@ -2759,6 +2781,7 @@ declare const ENUM_ADD_VALUE_RULE_ID = "postgresql.enum.add-value";
|
|
|
2759
2781
|
declare const LOGICAL_IDENTITY_ADOPTION_RULE_ID = "postgresql.logical-identity.adopt";
|
|
2760
2782
|
declare const DBSP_META_SCHEMA = "dbsp_meta";
|
|
2761
2783
|
declare const DBSP_TRANSITION_RUN_TABLE = "dbsp_transition_run";
|
|
2784
|
+
declare const DBSP_TRANSITION_RUN_PLAN_TABLE = "dbsp_transition_run_plan";
|
|
2762
2785
|
declare const DBSP_TRANSITION_JOURNAL_TABLE = "dbsp_transition_journal";
|
|
2763
2786
|
declare const DBSP_LOGICAL_IDENTITY_TABLE = "dbsp_logical_identity";
|
|
2764
2787
|
declare const COLUMN_EXISTS_OBSERVATION = "postgresql.column.exists";
|
|
@@ -2769,6 +2792,40 @@ declare const ENGINE_VERSION_OBSERVATION = "postgresql.engine.version-supported"
|
|
|
2769
2792
|
declare const LOGICAL_IDENTITY_CARRIER_OBSERVATION = "postgresql.logical-identity.carrier-state";
|
|
2770
2793
|
declare const NO_NULLS_GUARD = "NO_NULLS";
|
|
2771
2794
|
|
|
2795
|
+
/**
|
|
2796
|
+
* A proven operation may still be ineligible for a durable execution contract
|
|
2797
|
+
* when its reviewed requirements cannot be derived. The CLI renders this as a
|
|
2798
|
+
* blocked assessment rather than treating it as an operational failure.
|
|
2799
|
+
*/
|
|
2800
|
+
declare class PgExecutionContractDerivationError extends Error {
|
|
2801
|
+
readonly operationRef: string;
|
|
2802
|
+
readonly operationName: string;
|
|
2803
|
+
constructor(operationRef: string, operationName: string, detail: string);
|
|
2804
|
+
}
|
|
2805
|
+
/**
|
|
2806
|
+
* Compare namespace identities by name, rather than the incidental order in
|
|
2807
|
+
* which PostgreSQL or a persisted JSON document happened to return them.
|
|
2808
|
+
*/
|
|
2809
|
+
declare function pgTargetIdentityMismatch(expected: PostgreSqlObservationTargetIdentity, observed: PostgreSqlObservationTargetIdentity): string | undefined;
|
|
2810
|
+
/**
|
|
2811
|
+
* Name resolution is only used to locate the namespace OID. The resulting
|
|
2812
|
+
* contract never treats the name itself as identity.
|
|
2813
|
+
*/
|
|
2814
|
+
declare function readPgExecutionTargetFromClient(target: TransitionSessionClient, namespaceNames: readonly string[]): Promise<{
|
|
2815
|
+
readonly identity: PostgreSqlObservationTargetIdentity;
|
|
2816
|
+
readonly sessionProvenance: Readonly<Record<'search_path' | 'client_encoding' | 'TimeZone', string>>;
|
|
2817
|
+
}>;
|
|
2818
|
+
/** Build the versioned canonical document once, while the plan is minted. */
|
|
2819
|
+
declare function createPgExecutionContract(plan: ProvenPlanShape, identity: PostgreSqlObservationTargetIdentity, _sessionProvenance: Readonly<Record<'search_path' | 'client_encoding' | 'TimeZone', string>>): ExecutionContract;
|
|
2820
|
+
/** Evaluate the stored document on the leased executor, before it renders SQL. */
|
|
2821
|
+
declare function evaluatePgExecutionContract(target: TransitionSessionClient, contract: ExecutionContract): Promise<{
|
|
2822
|
+
readonly ok: true;
|
|
2823
|
+
} | {
|
|
2824
|
+
readonly ok: false;
|
|
2825
|
+
readonly clause: string;
|
|
2826
|
+
readonly detail: string;
|
|
2827
|
+
}>;
|
|
2828
|
+
|
|
2772
2829
|
type QueryResultLike = {
|
|
2773
2830
|
readonly rows: readonly Record<string, unknown>[];
|
|
2774
2831
|
};
|
|
@@ -2778,8 +2835,42 @@ type TransitionJournalQueryable = {
|
|
|
2778
2835
|
declare function renderCreateDbspMetaSchemaSql(): string;
|
|
2779
2836
|
declare function renderCreateTransitionRunTableSql(): string;
|
|
2780
2837
|
declare function renderCreateTransitionJournalTableSql(): string;
|
|
2838
|
+
declare function renderCreateTransitionRunPlanTableSql(): string;
|
|
2781
2839
|
declare function ensureTransitionJournal(executor: TransitionJournalQueryable): Promise<void>;
|
|
2782
|
-
declare function
|
|
2840
|
+
declare function createPgTransitionRunPersister(executor: TransitionJournalQueryable): TransitionRunPersister;
|
|
2841
|
+
declare function readTransitionJournal(executor: TransitionJournalQueryable, runId: string): Promise<TransitionRunJournal & {
|
|
2842
|
+
readonly plan: ProvenPlanShape;
|
|
2843
|
+
}>;
|
|
2844
|
+
|
|
2845
|
+
type PgTransitionClientLease = {
|
|
2846
|
+
readonly client: PoolClient;
|
|
2847
|
+
query(sql: string, params?: unknown): Promise<{
|
|
2848
|
+
readonly rows: readonly Record<string, unknown>[];
|
|
2849
|
+
}>;
|
|
2850
|
+
release(error?: unknown): void;
|
|
2851
|
+
};
|
|
2852
|
+
/**
|
|
2853
|
+
* Declare a pg Pool as a source of transition leases.
|
|
2854
|
+
*
|
|
2855
|
+
* The typed Pool argument and this explicit factory call are the declaration.
|
|
2856
|
+
* Neither check below infers ownership; each rejects a declaration that
|
|
2857
|
+
* contradicts itself.
|
|
2858
|
+
*
|
|
2859
|
+
* A pg Pool and a pg Client are structurally identical — both expose connect(),
|
|
2860
|
+
* query() and end(), and neither exposes release() — so the argument cannot be
|
|
2861
|
+
* classified on sight. What connect() returns can be: a Pool leases a
|
|
2862
|
+
* PoolClient, which carries release(); a Client resolves to itself, which does
|
|
2863
|
+
* not. The lease is therefore checked at the first acquisition, which costs one
|
|
2864
|
+
* connection to learn and is why the constructor cannot report it.
|
|
2865
|
+
*
|
|
2866
|
+
* This deliberately avoids `instanceof Client`, which would be sound but
|
|
2867
|
+
* requires importing pg at runtime. Nothing else in this package does, so the
|
|
2868
|
+
* compiler and the SQL renderer work without a driver, and one guard is not
|
|
2869
|
+
* worth spending that.
|
|
2870
|
+
*/
|
|
2871
|
+
declare function createPgTransitionLessor(pool: Pool): TransitionLessor;
|
|
2872
|
+
/** Acquire a UTF-8-configured PostgreSQL client for direct planning paths. */
|
|
2873
|
+
declare function acquirePgTransitionClient(pool: Pool): Promise<PgTransitionClientLease>;
|
|
2783
2874
|
|
|
2784
2875
|
type ObservationTarget = {
|
|
2785
2876
|
readonly table: string;
|
|
@@ -2793,8 +2884,11 @@ type EnumObservationTarget = {
|
|
|
2793
2884
|
readonly label?: string;
|
|
2794
2885
|
readonly schema?: string;
|
|
2795
2886
|
};
|
|
2887
|
+
/** Acquire one lease, issue the observation, then release that lease. */
|
|
2888
|
+
declare function executePgObservationFromLessor(lessor: TransitionLessor, request: ObservationRequest, context: ObservationContext): Promise<EvidenceObservation>;
|
|
2889
|
+
/** Acquire one lease, read context, then release that lease. */
|
|
2890
|
+
declare function readPgObservationContextFromLessor(lessor: TransitionLessor, schema?: string, observationTarget?: ObservationTarget | EnumObservationTarget, expectedTargetIdentity?: ObservationContext['postgresqlTargetIdentity']): Promise<ObservationContext>;
|
|
2796
2891
|
declare function createPgObservationIssuer(): ObservationIssuer;
|
|
2797
|
-
declare function readPgObservationContext(target: unknown, schema?: string, observationTarget?: ObservationTarget | EnumObservationTarget): Promise<ObservationContext>;
|
|
2798
2892
|
|
|
2799
2893
|
interface SetNotNullColumnShapeExpectation {
|
|
2800
2894
|
readonly kind: 'postgresql.set-not-null.column-shape.v1';
|
|
@@ -2829,7 +2923,7 @@ type AlterColumnSetNotNullPayload = {
|
|
|
2829
2923
|
readonly expectedColumnShape?: SetNotNullColumnShapeExpectation;
|
|
2830
2924
|
};
|
|
2831
2925
|
type TransitionExecutionClient$3 = {
|
|
2832
|
-
readonly opaqueClient:
|
|
2926
|
+
readonly opaqueClient: TransitionSessionClient;
|
|
2833
2927
|
};
|
|
2834
2928
|
declare function renderAlterColumnSetNotNullSql(payload: AlterColumnSetNotNullPayload, context: ObservationContext): string;
|
|
2835
2929
|
declare function renderSetNotNullLockSql(payload: AlterColumnSetNotNullPayload, context: ObservationContext): string;
|
|
@@ -2840,11 +2934,14 @@ declare function beforeAfterFingerprints$3(operation: PhysicalOperation, evidenc
|
|
|
2840
2934
|
};
|
|
2841
2935
|
declare function createAlterColumnSetNotNullOperationRuntime(): {
|
|
2842
2936
|
artifact: _dbsp_types.SemanticArtifactRef;
|
|
2937
|
+
operationKind: _dbsp_types.OperationKindRef;
|
|
2938
|
+
executionContractEligibility: {
|
|
2939
|
+
readonly eligible: true;
|
|
2940
|
+
};
|
|
2843
2941
|
supportsOperation(operation: PhysicalOperation): boolean;
|
|
2942
|
+
renderPlanSql(operation: PhysicalOperation, context: ObservationContext): string;
|
|
2844
2943
|
effectsOf(operation: PhysicalOperation, context: ObservationContext): OperationEffectAssessment;
|
|
2845
2944
|
buildFingerprints: typeof beforeAfterFingerprints$3;
|
|
2846
|
-
checkout(target: unknown): Promise<TransitionExecutionClient$3>;
|
|
2847
|
-
release(client: TransitionExecutionClient$3, error?: unknown): void;
|
|
2848
2945
|
writeIntentJournal(client: TransitionExecutionClient$3, record: DurableIntentRecord): Promise<void>;
|
|
2849
2946
|
begin(client: TransitionExecutionClient$3): Promise<void>;
|
|
2850
2947
|
setLockTimeout(client: TransitionExecutionClient$3, maxWaitMs: number): Promise<void>;
|
|
@@ -2878,7 +2975,7 @@ type AlterTypeAddValuePayload = {
|
|
|
2878
2975
|
readonly expectedAfter: readonly string[];
|
|
2879
2976
|
};
|
|
2880
2977
|
type TransitionExecutionClient$2 = {
|
|
2881
|
-
readonly opaqueClient:
|
|
2978
|
+
readonly opaqueClient: TransitionSessionClient;
|
|
2882
2979
|
};
|
|
2883
2980
|
declare function renderAlterTypeAddValueSql(payload: AlterTypeAddValuePayload, context: ObservationContext): string;
|
|
2884
2981
|
declare function beforeAfterFingerprints$2(operation: PhysicalOperation, evidence: readonly EvidenceObservation[], context: ObservationContext): {
|
|
@@ -2888,11 +2985,17 @@ declare function beforeAfterFingerprints$2(operation: PhysicalOperation, evidenc
|
|
|
2888
2985
|
declare function createAlterTypeAddValueOperationRuntime(): {
|
|
2889
2986
|
artifact: _dbsp_types.SemanticArtifactRef;
|
|
2890
2987
|
operationKind: _dbsp_types.OperationKindRef;
|
|
2988
|
+
executionContractEligibility: {
|
|
2989
|
+
readonly eligible: true;
|
|
2990
|
+
};
|
|
2991
|
+
rendererSessionRequirements: readonly [{
|
|
2992
|
+
readonly setting: "standard_conforming_strings";
|
|
2993
|
+
readonly value: "on";
|
|
2994
|
+
}];
|
|
2891
2995
|
supportsOperation(operation: PhysicalOperation): boolean;
|
|
2996
|
+
renderPlanSql(operation: PhysicalOperation, context: ObservationContext): string;
|
|
2892
2997
|
effectsOf(operation: PhysicalOperation, context: ObservationContext): OperationEffectAssessment;
|
|
2893
2998
|
buildFingerprints: typeof beforeAfterFingerprints$2;
|
|
2894
|
-
checkout(target: unknown): Promise<TransitionExecutionClient$2>;
|
|
2895
|
-
release(client: TransitionExecutionClient$2, error?: unknown): void;
|
|
2896
2999
|
writeIntentJournal(client: TransitionExecutionClient$2, record: DurableIntentRecord): Promise<void>;
|
|
2897
3000
|
begin(client: TransitionExecutionClient$2): Promise<void>;
|
|
2898
3001
|
setLockTimeout(client: TransitionExecutionClient$2, maxWaitMs: number): Promise<void>;
|
|
@@ -2926,7 +3029,7 @@ type AttachLogicalIdentityPayload = {
|
|
|
2926
3029
|
readonly authenticated: false;
|
|
2927
3030
|
};
|
|
2928
3031
|
type TransitionExecutionClient$1 = {
|
|
2929
|
-
readonly opaqueClient:
|
|
3032
|
+
readonly opaqueClient: TransitionSessionClient;
|
|
2930
3033
|
};
|
|
2931
3034
|
declare function renderAttachLogicalIdentityLockSql(payload: AttachLogicalIdentityPayload): string;
|
|
2932
3035
|
declare function renderCreateLogicalIdentitySideTableSql(_schema: string): string;
|
|
@@ -2938,11 +3041,14 @@ declare function beforeAfterFingerprints$1(operation: PhysicalOperation, evidenc
|
|
|
2938
3041
|
};
|
|
2939
3042
|
declare function createAttachLogicalIdentityOperationRuntime(): {
|
|
2940
3043
|
artifact: _dbsp_types.SemanticArtifactRef;
|
|
3044
|
+
executionContractEligibility: {
|
|
3045
|
+
readonly eligible: false;
|
|
3046
|
+
readonly detail: "PostgreSQL AttachLogicalIdentity has no derivable execution requirements yet";
|
|
3047
|
+
};
|
|
2941
3048
|
supportsOperation(operation: PhysicalOperation): boolean;
|
|
3049
|
+
renderPlanSql(operation: PhysicalOperation): string;
|
|
2942
3050
|
effectsOf(operation: PhysicalOperation, context: ObservationContext): OperationEffectAssessment;
|
|
2943
3051
|
buildFingerprints: typeof beforeAfterFingerprints$1;
|
|
2944
|
-
checkout(target: unknown): Promise<TransitionExecutionClient$1>;
|
|
2945
|
-
release(client: TransitionExecutionClient$1, error?: unknown): void;
|
|
2946
3052
|
writeIntentJournal(client: TransitionExecutionClient$1, record: DurableIntentRecord): Promise<void>;
|
|
2947
3053
|
begin(client: TransitionExecutionClient$1): Promise<void>;
|
|
2948
3054
|
setLockTimeout(client: TransitionExecutionClient$1, maxWaitMs: number): Promise<void>;
|
|
@@ -2974,7 +3080,7 @@ type ManualSqlPayload = {
|
|
|
2974
3080
|
readonly postconditions: readonly ExecutableAssertion[];
|
|
2975
3081
|
};
|
|
2976
3082
|
type TransitionExecutionClient = {
|
|
2977
|
-
readonly opaqueClient:
|
|
3083
|
+
readonly opaqueClient: TransitionSessionClient;
|
|
2978
3084
|
};
|
|
2979
3085
|
declare function normalizeManualSqlPayload(payload: ManualSqlPayload, context: ObservationContext): ManualSqlPayload;
|
|
2980
3086
|
declare function beforeAfterFingerprints(operation: PhysicalOperation, _evidence: readonly EvidenceObservation[], context: ObservationContext): {
|
|
@@ -2984,11 +3090,14 @@ declare function beforeAfterFingerprints(operation: PhysicalOperation, _evidence
|
|
|
2984
3090
|
declare function createManualSqlOperationRuntime(): {
|
|
2985
3091
|
artifact: _dbsp_types.SemanticArtifactRef;
|
|
2986
3092
|
operationKind: _dbsp_types.OperationKindRef;
|
|
3093
|
+
executionContractEligibility: {
|
|
3094
|
+
readonly eligible: false;
|
|
3095
|
+
readonly detail: "PostgreSQL ManualSql has no derivable execution requirements because its statement has no declared schema target";
|
|
3096
|
+
};
|
|
2987
3097
|
supportsOperation(operation: PhysicalOperation): boolean;
|
|
3098
|
+
renderPlanSql(operation: PhysicalOperation, context: ObservationContext): string;
|
|
2988
3099
|
effectsOf(operation: PhysicalOperation, context: ObservationContext): OperationEffectAssessment;
|
|
2989
3100
|
buildFingerprints: typeof beforeAfterFingerprints;
|
|
2990
|
-
checkout(target: unknown): Promise<TransitionExecutionClient>;
|
|
2991
|
-
release(client: TransitionExecutionClient, error?: unknown): void;
|
|
2992
3101
|
writeIntentJournal(client: TransitionExecutionClient, record: DurableIntentRecord): Promise<void>;
|
|
2993
3102
|
begin(client: TransitionExecutionClient): Promise<void>;
|
|
2994
3103
|
setLockTimeout(_client: TransitionExecutionClient, _maxWaitMs: number): Promise<void>;
|
|
@@ -3091,164 +3200,220 @@ declare function createPgTransitionPack(options?: PgTransitionPackOptions): {
|
|
|
3091
3200
|
rules: (_dbsp_types.TransitionRule<AddCheckMatch> | _dbsp_types.TransitionRule<LogicalIdentityAdoptionMatch> | _dbsp_types.TransitionRule<CreateUniqueIndexConcurrentlyMatch> | _dbsp_types.TransitionRule<EnumAddValueMatch> | _dbsp_types.TransitionRule<SetNotNullMatch>)[];
|
|
3092
3201
|
operationSemantics: ({
|
|
3093
3202
|
artifact: _dbsp_types.SemanticArtifactRef;
|
|
3203
|
+
operationKind: _dbsp_types.OperationKindRef;
|
|
3204
|
+
executionContractEligibility: {
|
|
3205
|
+
readonly eligible: true;
|
|
3206
|
+
};
|
|
3094
3207
|
supportsOperation(operation: _dbsp_types.PhysicalOperation): boolean;
|
|
3208
|
+
renderPlanSql(operation: _dbsp_types.PhysicalOperation, context: _dbsp_types.ObservationContext): string;
|
|
3095
3209
|
effectsOf(operation: _dbsp_types.PhysicalOperation, context: _dbsp_types.ObservationContext): _dbsp_types.OperationEffectAssessment;
|
|
3096
3210
|
buildFingerprints: (operation: _dbsp_types.PhysicalOperation, evidence: readonly _dbsp_types.EvidenceObservation[], context: _dbsp_types.ObservationContext) => {
|
|
3097
3211
|
expectedBefore: _dbsp_types.FingerprintManifest;
|
|
3098
3212
|
expectedAfter: _dbsp_types.FingerprintManifest;
|
|
3099
3213
|
};
|
|
3100
|
-
checkout(target: unknown): Promise<{
|
|
3101
|
-
readonly opaqueClient: unknown;
|
|
3102
|
-
}>;
|
|
3103
|
-
release(client: {
|
|
3104
|
-
readonly opaqueClient: unknown;
|
|
3105
|
-
}, error?: unknown): void;
|
|
3106
3214
|
writeIntentJournal(client: {
|
|
3107
|
-
readonly opaqueClient:
|
|
3215
|
+
readonly opaqueClient: _dbsp_types.TransitionSessionClient;
|
|
3108
3216
|
}, record: _dbsp_types.DurableIntentRecord): Promise<void>;
|
|
3109
3217
|
begin(client: {
|
|
3110
|
-
readonly opaqueClient:
|
|
3218
|
+
readonly opaqueClient: _dbsp_types.TransitionSessionClient;
|
|
3111
3219
|
}): Promise<void>;
|
|
3112
3220
|
setLockTimeout(client: {
|
|
3113
|
-
readonly opaqueClient:
|
|
3221
|
+
readonly opaqueClient: _dbsp_types.TransitionSessionClient;
|
|
3114
3222
|
}, maxWaitMs: number): Promise<void>;
|
|
3115
3223
|
acquireLocks(client: {
|
|
3116
|
-
readonly opaqueClient:
|
|
3224
|
+
readonly opaqueClient: _dbsp_types.TransitionSessionClient;
|
|
3117
3225
|
}, operation: _dbsp_types.PhysicalOperation, _effects: _dbsp_types.OperationEffectAssessment, context: _dbsp_types.ObservationContext): Promise<void>;
|
|
3118
3226
|
observeContext(client: {
|
|
3119
|
-
readonly opaqueClient:
|
|
3227
|
+
readonly opaqueClient: _dbsp_types.TransitionSessionClient;
|
|
3120
3228
|
}, operation: _dbsp_types.PhysicalOperation, _proofContext: _dbsp_types.ObservationContext): Promise<_dbsp_types.ObservationContext>;
|
|
3121
3229
|
observeOperation(client: {
|
|
3122
|
-
readonly opaqueClient:
|
|
3230
|
+
readonly opaqueClient: _dbsp_types.TransitionSessionClient;
|
|
3123
3231
|
}, operation: _dbsp_types.PhysicalOperation, context: _dbsp_types.ObservationContext, _phase: "before" | "after", issuer: _dbsp_types.ObservationIssuer): Promise<{
|
|
3124
3232
|
observations: _dbsp_types.IssuedObservation[];
|
|
3125
3233
|
fingerprint: _dbsp_types.FingerprintManifest;
|
|
3126
3234
|
}>;
|
|
3127
3235
|
checkGuard(client: {
|
|
3128
|
-
readonly opaqueClient:
|
|
3236
|
+
readonly opaqueClient: _dbsp_types.TransitionSessionClient;
|
|
3129
3237
|
}, operation: _dbsp_types.PhysicalOperation, guard: _dbsp_types.ApplyGuard, context: _dbsp_types.ObservationContext): Promise<{
|
|
3130
3238
|
passed: boolean;
|
|
3131
3239
|
observations: _dbsp_types.AdvisoryObservation[];
|
|
3132
3240
|
recovery: readonly _dbsp_types.RecoveryArtefact[];
|
|
3133
3241
|
}>;
|
|
3134
3242
|
executeOperation(client: {
|
|
3135
|
-
readonly opaqueClient:
|
|
3243
|
+
readonly opaqueClient: _dbsp_types.TransitionSessionClient;
|
|
3136
3244
|
}, operation: _dbsp_types.PhysicalOperation, context: _dbsp_types.ObservationContext, duringGuards?: readonly _dbsp_types.ApplyGuard[]): Promise<{
|
|
3137
3245
|
kind: string;
|
|
3138
3246
|
}>;
|
|
3139
3247
|
writeCompletionJournal(client: {
|
|
3140
|
-
readonly opaqueClient:
|
|
3248
|
+
readonly opaqueClient: _dbsp_types.TransitionSessionClient;
|
|
3141
3249
|
}, operation: _dbsp_types.PhysicalOperation, record: _dbsp_types.TransactionalCompletionRecord): Promise<void>;
|
|
3142
3250
|
commit(client: {
|
|
3143
|
-
readonly opaqueClient:
|
|
3251
|
+
readonly opaqueClient: _dbsp_types.TransitionSessionClient;
|
|
3144
3252
|
}): Promise<void>;
|
|
3145
3253
|
rollback(client: {
|
|
3146
|
-
readonly opaqueClient:
|
|
3254
|
+
readonly opaqueClient: _dbsp_types.TransitionSessionClient;
|
|
3147
3255
|
}): Promise<void>;
|
|
3148
3256
|
writeObservedJournal(client: {
|
|
3149
|
-
readonly opaqueClient:
|
|
3257
|
+
readonly opaqueClient: _dbsp_types.TransitionSessionClient;
|
|
3150
3258
|
}, journal: _dbsp_types.StepJournal): Promise<void>;
|
|
3151
3259
|
isLockTimeout(error: unknown): boolean;
|
|
3152
3260
|
} | {
|
|
3153
3261
|
artifact: _dbsp_types.SemanticArtifactRef;
|
|
3154
3262
|
operationKind: _dbsp_types.OperationKindRef;
|
|
3263
|
+
executionContractEligibility: {
|
|
3264
|
+
readonly eligible: true;
|
|
3265
|
+
};
|
|
3266
|
+
rendererSessionRequirements: readonly [{
|
|
3267
|
+
readonly setting: "standard_conforming_strings";
|
|
3268
|
+
readonly value: "on";
|
|
3269
|
+
}];
|
|
3155
3270
|
supportsOperation(operation: _dbsp_types.PhysicalOperation): boolean;
|
|
3271
|
+
renderPlanSql(operation: _dbsp_types.PhysicalOperation, context: _dbsp_types.ObservationContext): string;
|
|
3156
3272
|
effectsOf(operation: _dbsp_types.PhysicalOperation, context: _dbsp_types.ObservationContext): _dbsp_types.OperationEffectAssessment;
|
|
3157
3273
|
buildFingerprints: (operation: _dbsp_types.PhysicalOperation, evidence: readonly _dbsp_types.EvidenceObservation[], context: _dbsp_types.ObservationContext) => {
|
|
3158
3274
|
expectedBefore: _dbsp_types.FingerprintManifest;
|
|
3159
3275
|
expectedAfter: _dbsp_types.FingerprintManifest;
|
|
3160
3276
|
};
|
|
3161
|
-
checkout(target: unknown): Promise<{
|
|
3162
|
-
readonly opaqueClient: unknown;
|
|
3163
|
-
}>;
|
|
3164
|
-
release(client: {
|
|
3165
|
-
readonly opaqueClient: unknown;
|
|
3166
|
-
}, error?: unknown): void;
|
|
3167
3277
|
writeIntentJournal(client: {
|
|
3168
|
-
readonly opaqueClient:
|
|
3278
|
+
readonly opaqueClient: _dbsp_types.TransitionSessionClient;
|
|
3169
3279
|
}, record: _dbsp_types.DurableIntentRecord): Promise<void>;
|
|
3170
3280
|
begin(client: {
|
|
3171
|
-
readonly opaqueClient:
|
|
3281
|
+
readonly opaqueClient: _dbsp_types.TransitionSessionClient;
|
|
3172
3282
|
}): Promise<void>;
|
|
3173
3283
|
setLockTimeout(client: {
|
|
3174
|
-
readonly opaqueClient:
|
|
3284
|
+
readonly opaqueClient: _dbsp_types.TransitionSessionClient;
|
|
3175
3285
|
}, maxWaitMs: number): Promise<void>;
|
|
3176
3286
|
acquireLocks(client: {
|
|
3177
|
-
readonly opaqueClient:
|
|
3287
|
+
readonly opaqueClient: _dbsp_types.TransitionSessionClient;
|
|
3178
3288
|
}, operation: _dbsp_types.PhysicalOperation): Promise<void>;
|
|
3179
3289
|
observeContext(client: {
|
|
3180
|
-
readonly opaqueClient:
|
|
3290
|
+
readonly opaqueClient: _dbsp_types.TransitionSessionClient;
|
|
3181
3291
|
}, operation: _dbsp_types.PhysicalOperation, _proofContext: _dbsp_types.ObservationContext): Promise<_dbsp_types.ObservationContext>;
|
|
3182
3292
|
observeOperation(client: {
|
|
3183
|
-
readonly opaqueClient:
|
|
3293
|
+
readonly opaqueClient: _dbsp_types.TransitionSessionClient;
|
|
3184
3294
|
}, operation: _dbsp_types.PhysicalOperation, context: _dbsp_types.ObservationContext, _phase: "before" | "after", issuer: _dbsp_types.ObservationIssuer): Promise<{
|
|
3185
3295
|
observations: _dbsp_types.IssuedObservation[];
|
|
3186
3296
|
fingerprint: _dbsp_types.FingerprintManifest;
|
|
3187
3297
|
}>;
|
|
3188
3298
|
checkGuard(client: {
|
|
3189
|
-
readonly opaqueClient:
|
|
3299
|
+
readonly opaqueClient: _dbsp_types.TransitionSessionClient;
|
|
3190
3300
|
}, operation: _dbsp_types.PhysicalOperation, guard: _dbsp_types.ApplyGuard, context: _dbsp_types.ObservationContext): Promise<{
|
|
3191
3301
|
passed: boolean;
|
|
3192
3302
|
observations: _dbsp_types.EvidenceObservation[];
|
|
3193
3303
|
recovery: readonly _dbsp_types.RecoveryArtefact[];
|
|
3194
3304
|
}>;
|
|
3195
3305
|
executeOperation(client: {
|
|
3196
|
-
readonly opaqueClient:
|
|
3306
|
+
readonly opaqueClient: _dbsp_types.TransitionSessionClient;
|
|
3197
3307
|
}, operation: _dbsp_types.PhysicalOperation, context: _dbsp_types.ObservationContext, duringGuards?: readonly _dbsp_types.ApplyGuard[]): Promise<{
|
|
3198
3308
|
kind: string;
|
|
3199
3309
|
}>;
|
|
3200
3310
|
writeCompletionJournal(client: {
|
|
3201
|
-
readonly opaqueClient:
|
|
3311
|
+
readonly opaqueClient: _dbsp_types.TransitionSessionClient;
|
|
3202
3312
|
}, operation: _dbsp_types.PhysicalOperation, record: _dbsp_types.TransactionalCompletionRecord): Promise<void>;
|
|
3203
3313
|
commit(client: {
|
|
3204
|
-
readonly opaqueClient:
|
|
3314
|
+
readonly opaqueClient: _dbsp_types.TransitionSessionClient;
|
|
3205
3315
|
}): Promise<void>;
|
|
3206
3316
|
rollback(client: {
|
|
3207
|
-
readonly opaqueClient:
|
|
3317
|
+
readonly opaqueClient: _dbsp_types.TransitionSessionClient;
|
|
3208
3318
|
}): Promise<void>;
|
|
3209
3319
|
writeObservedJournal(client: {
|
|
3210
|
-
readonly opaqueClient:
|
|
3320
|
+
readonly opaqueClient: _dbsp_types.TransitionSessionClient;
|
|
3211
3321
|
}, journal: _dbsp_types.StepJournal): Promise<void>;
|
|
3212
3322
|
isLockTimeout(error: unknown): boolean;
|
|
3213
3323
|
} | {
|
|
3214
3324
|
artifact: _dbsp_types.SemanticArtifactRef;
|
|
3215
|
-
|
|
3325
|
+
executionContractEligibility: {
|
|
3326
|
+
readonly eligible: false;
|
|
3327
|
+
readonly detail: "PostgreSQL AttachLogicalIdentity has no derivable execution requirements yet";
|
|
3328
|
+
};
|
|
3216
3329
|
supportsOperation(operation: _dbsp_types.PhysicalOperation): boolean;
|
|
3330
|
+
renderPlanSql(operation: _dbsp_types.PhysicalOperation): string;
|
|
3217
3331
|
effectsOf(operation: _dbsp_types.PhysicalOperation, context: _dbsp_types.ObservationContext): _dbsp_types.OperationEffectAssessment;
|
|
3218
3332
|
buildFingerprints: (operation: _dbsp_types.PhysicalOperation, evidence: readonly _dbsp_types.EvidenceObservation[], context: _dbsp_types.ObservationContext) => {
|
|
3219
3333
|
expectedBefore: _dbsp_types.FingerprintManifest;
|
|
3220
3334
|
expectedAfter: _dbsp_types.FingerprintManifest;
|
|
3221
3335
|
};
|
|
3222
|
-
|
|
3223
|
-
readonly opaqueClient:
|
|
3336
|
+
writeIntentJournal(client: {
|
|
3337
|
+
readonly opaqueClient: _dbsp_types.TransitionSessionClient;
|
|
3338
|
+
}, record: _dbsp_types.DurableIntentRecord): Promise<void>;
|
|
3339
|
+
begin(client: {
|
|
3340
|
+
readonly opaqueClient: _dbsp_types.TransitionSessionClient;
|
|
3341
|
+
}): Promise<void>;
|
|
3342
|
+
setLockTimeout(client: {
|
|
3343
|
+
readonly opaqueClient: _dbsp_types.TransitionSessionClient;
|
|
3344
|
+
}, maxWaitMs: number): Promise<void>;
|
|
3345
|
+
acquireLocks(client: {
|
|
3346
|
+
readonly opaqueClient: _dbsp_types.TransitionSessionClient;
|
|
3347
|
+
}, operation: _dbsp_types.PhysicalOperation): Promise<void>;
|
|
3348
|
+
observeContext(client: {
|
|
3349
|
+
readonly opaqueClient: _dbsp_types.TransitionSessionClient;
|
|
3350
|
+
}, operation: _dbsp_types.PhysicalOperation, _proofContext: _dbsp_types.ObservationContext): Promise<_dbsp_types.ObservationContext>;
|
|
3351
|
+
observeOperation(client: {
|
|
3352
|
+
readonly opaqueClient: _dbsp_types.TransitionSessionClient;
|
|
3353
|
+
}, operation: _dbsp_types.PhysicalOperation, context: _dbsp_types.ObservationContext, phase: "before" | "after", issuer: _dbsp_types.ObservationIssuer): Promise<{
|
|
3354
|
+
observations: _dbsp_types.IssuedObservation[];
|
|
3355
|
+
fingerprint: _dbsp_types.FingerprintManifest;
|
|
3356
|
+
}>;
|
|
3357
|
+
checkGuard(): Promise<{
|
|
3358
|
+
passed: boolean;
|
|
3359
|
+
observations: never[];
|
|
3360
|
+
recovery: never[];
|
|
3361
|
+
}>;
|
|
3362
|
+
executeOperation(client: {
|
|
3363
|
+
readonly opaqueClient: _dbsp_types.TransitionSessionClient;
|
|
3364
|
+
}, operation: _dbsp_types.PhysicalOperation): Promise<{
|
|
3365
|
+
kind: "completed";
|
|
3224
3366
|
}>;
|
|
3225
|
-
|
|
3226
|
-
readonly opaqueClient:
|
|
3227
|
-
},
|
|
3367
|
+
writeCompletionJournal(client: {
|
|
3368
|
+
readonly opaqueClient: _dbsp_types.TransitionSessionClient;
|
|
3369
|
+
}, operation: _dbsp_types.PhysicalOperation, record: _dbsp_types.TransactionalCompletionRecord): Promise<void>;
|
|
3370
|
+
commit(client: {
|
|
3371
|
+
readonly opaqueClient: _dbsp_types.TransitionSessionClient;
|
|
3372
|
+
}): Promise<void>;
|
|
3373
|
+
rollback(client: {
|
|
3374
|
+
readonly opaqueClient: _dbsp_types.TransitionSessionClient;
|
|
3375
|
+
}): Promise<void>;
|
|
3376
|
+
writeObservedJournal(client: {
|
|
3377
|
+
readonly opaqueClient: _dbsp_types.TransitionSessionClient;
|
|
3378
|
+
}, journal: _dbsp_types.StepJournal): Promise<void>;
|
|
3379
|
+
isLockTimeout(error: unknown): boolean;
|
|
3380
|
+
} | {
|
|
3381
|
+
artifact: _dbsp_types.SemanticArtifactRef;
|
|
3382
|
+
operationKind: _dbsp_types.OperationKindRef;
|
|
3383
|
+
executionContractEligibility: {
|
|
3384
|
+
readonly eligible: true;
|
|
3385
|
+
};
|
|
3386
|
+
supportsOperation(operation: _dbsp_types.PhysicalOperation): boolean;
|
|
3387
|
+
renderPlanSql(operation: _dbsp_types.PhysicalOperation): string;
|
|
3388
|
+
effectsOf(operation: _dbsp_types.PhysicalOperation, context: _dbsp_types.ObservationContext): _dbsp_types.OperationEffectAssessment;
|
|
3389
|
+
buildFingerprints: (operation: _dbsp_types.PhysicalOperation, evidence: readonly _dbsp_types.EvidenceObservation[], context: _dbsp_types.ObservationContext) => {
|
|
3390
|
+
expectedBefore: _dbsp_types.FingerprintManifest;
|
|
3391
|
+
expectedAfter: _dbsp_types.FingerprintManifest;
|
|
3392
|
+
};
|
|
3228
3393
|
writeIntentJournal(client: {
|
|
3229
|
-
readonly opaqueClient:
|
|
3394
|
+
readonly opaqueClient: _dbsp_types.TransitionSessionClient;
|
|
3230
3395
|
}, record: _dbsp_types.DurableIntentRecord): Promise<void>;
|
|
3231
3396
|
begin(_client: {
|
|
3232
|
-
readonly opaqueClient:
|
|
3397
|
+
readonly opaqueClient: _dbsp_types.TransitionSessionClient;
|
|
3233
3398
|
}): Promise<never>;
|
|
3234
3399
|
setLockTimeout(_client: {
|
|
3235
|
-
readonly opaqueClient:
|
|
3400
|
+
readonly opaqueClient: _dbsp_types.TransitionSessionClient;
|
|
3236
3401
|
}, _maxWaitMs: number): Promise<void>;
|
|
3237
3402
|
acquireLocks(): Promise<void>;
|
|
3238
3403
|
observeContext(client: {
|
|
3239
|
-
readonly opaqueClient:
|
|
3404
|
+
readonly opaqueClient: _dbsp_types.TransitionSessionClient;
|
|
3240
3405
|
}, operation: _dbsp_types.PhysicalOperation, _proofContext: _dbsp_types.ObservationContext): Promise<_dbsp_types.ObservationContext>;
|
|
3241
3406
|
observeOperation(client: {
|
|
3242
|
-
readonly opaqueClient:
|
|
3407
|
+
readonly opaqueClient: _dbsp_types.TransitionSessionClient;
|
|
3243
3408
|
}, operation: _dbsp_types.PhysicalOperation, context: _dbsp_types.ObservationContext, phase: "before" | "after", issuer: _dbsp_types.ObservationIssuer): Promise<{
|
|
3244
3409
|
observations: _dbsp_types.IssuedObservation[];
|
|
3245
3410
|
fingerprint: _dbsp_types.FingerprintManifest;
|
|
3246
3411
|
}>;
|
|
3247
3412
|
checkGuard(_client: {
|
|
3248
|
-
readonly opaqueClient:
|
|
3413
|
+
readonly opaqueClient: _dbsp_types.TransitionSessionClient;
|
|
3249
3414
|
}, _operation: _dbsp_types.PhysicalOperation, guard: _dbsp_types.ApplyGuard): Promise<never>;
|
|
3250
3415
|
executeOperation(client: {
|
|
3251
|
-
readonly opaqueClient:
|
|
3416
|
+
readonly opaqueClient: _dbsp_types.TransitionSessionClient;
|
|
3252
3417
|
}, operation: _dbsp_types.PhysicalOperation, context: _dbsp_types.ObservationContext, duringGuards?: readonly _dbsp_types.ApplyGuard[], executionTracker?: _dbsp_core.NonRollbackableExecutionTracker): Promise<{
|
|
3253
3418
|
kind: "partially-applied";
|
|
3254
3419
|
recovery: _dbsp_types.RecoveryArtefact[];
|
|
@@ -3265,16 +3430,72 @@ declare function createPgTransitionPack(options?: PgTransitionPackOptions): {
|
|
|
3265
3430
|
nonRollbackableFootprint: string;
|
|
3266
3431
|
}>;
|
|
3267
3432
|
writeCompletionJournal(client: {
|
|
3268
|
-
readonly opaqueClient:
|
|
3433
|
+
readonly opaqueClient: _dbsp_types.TransitionSessionClient;
|
|
3269
3434
|
}, operation: _dbsp_types.PhysicalOperation, record: _dbsp_types.TransactionalCompletionRecord): Promise<void>;
|
|
3270
3435
|
commit(_client: {
|
|
3271
|
-
readonly opaqueClient:
|
|
3436
|
+
readonly opaqueClient: _dbsp_types.TransitionSessionClient;
|
|
3272
3437
|
}): Promise<never>;
|
|
3273
3438
|
rollback(_client: {
|
|
3274
|
-
readonly opaqueClient:
|
|
3439
|
+
readonly opaqueClient: _dbsp_types.TransitionSessionClient;
|
|
3275
3440
|
}): Promise<never>;
|
|
3276
3441
|
writeObservedJournal(client: {
|
|
3277
|
-
readonly opaqueClient:
|
|
3442
|
+
readonly opaqueClient: _dbsp_types.TransitionSessionClient;
|
|
3443
|
+
}, journal: _dbsp_types.StepJournal): Promise<void>;
|
|
3444
|
+
isLockTimeout(error: unknown): boolean;
|
|
3445
|
+
} | {
|
|
3446
|
+
artifact: _dbsp_types.SemanticArtifactRef;
|
|
3447
|
+
operationKind: _dbsp_types.OperationKindRef;
|
|
3448
|
+
executionContractEligibility: {
|
|
3449
|
+
readonly eligible: false;
|
|
3450
|
+
readonly detail: "PostgreSQL ManualSql has no derivable execution requirements because its statement has no declared schema target";
|
|
3451
|
+
};
|
|
3452
|
+
supportsOperation(operation: _dbsp_types.PhysicalOperation): boolean;
|
|
3453
|
+
renderPlanSql(operation: _dbsp_types.PhysicalOperation, context: _dbsp_types.ObservationContext): string;
|
|
3454
|
+
effectsOf(operation: _dbsp_types.PhysicalOperation, context: _dbsp_types.ObservationContext): _dbsp_types.OperationEffectAssessment;
|
|
3455
|
+
buildFingerprints: (operation: _dbsp_types.PhysicalOperation, _evidence: readonly _dbsp_types.EvidenceObservation[], context: _dbsp_types.ObservationContext) => {
|
|
3456
|
+
expectedBefore: _dbsp_types.FingerprintManifest;
|
|
3457
|
+
expectedAfter: _dbsp_types.FingerprintManifest;
|
|
3458
|
+
};
|
|
3459
|
+
writeIntentJournal(client: {
|
|
3460
|
+
readonly opaqueClient: _dbsp_types.TransitionSessionClient;
|
|
3461
|
+
}, record: _dbsp_types.DurableIntentRecord): Promise<void>;
|
|
3462
|
+
begin(client: {
|
|
3463
|
+
readonly opaqueClient: _dbsp_types.TransitionSessionClient;
|
|
3464
|
+
}): Promise<void>;
|
|
3465
|
+
setLockTimeout(_client: {
|
|
3466
|
+
readonly opaqueClient: _dbsp_types.TransitionSessionClient;
|
|
3467
|
+
}, _maxWaitMs: number): Promise<void>;
|
|
3468
|
+
acquireLocks(): Promise<void>;
|
|
3469
|
+
observeContext(client: {
|
|
3470
|
+
readonly opaqueClient: _dbsp_types.TransitionSessionClient;
|
|
3471
|
+
}, _operation: _dbsp_types.PhysicalOperation, proofContext: _dbsp_types.ObservationContext): Promise<_dbsp_types.ObservationContext>;
|
|
3472
|
+
observeOperation(_client: {
|
|
3473
|
+
readonly opaqueClient: _dbsp_types.TransitionSessionClient;
|
|
3474
|
+
}, operation: _dbsp_types.PhysicalOperation, context: _dbsp_types.ObservationContext, phase: "before" | "after"): Promise<{
|
|
3475
|
+
observations: never[];
|
|
3476
|
+
fingerprint: _dbsp_types.FingerprintManifest;
|
|
3477
|
+
}>;
|
|
3478
|
+
checkGuard(): Promise<{
|
|
3479
|
+
passed: boolean;
|
|
3480
|
+
observations: never[];
|
|
3481
|
+
recovery: never[];
|
|
3482
|
+
}>;
|
|
3483
|
+
executeOperation(client: {
|
|
3484
|
+
readonly opaqueClient: _dbsp_types.TransitionSessionClient;
|
|
3485
|
+
}, operation: _dbsp_types.PhysicalOperation, context: _dbsp_types.ObservationContext): Promise<{
|
|
3486
|
+
kind: "completed";
|
|
3487
|
+
}>;
|
|
3488
|
+
writeCompletionJournal(client: {
|
|
3489
|
+
readonly opaqueClient: _dbsp_types.TransitionSessionClient;
|
|
3490
|
+
}, operation: _dbsp_types.PhysicalOperation, record: _dbsp_types.TransactionalCompletionRecord): Promise<void>;
|
|
3491
|
+
commit(client: {
|
|
3492
|
+
readonly opaqueClient: _dbsp_types.TransitionSessionClient;
|
|
3493
|
+
}): Promise<void>;
|
|
3494
|
+
rollback(client: {
|
|
3495
|
+
readonly opaqueClient: _dbsp_types.TransitionSessionClient;
|
|
3496
|
+
}): Promise<void>;
|
|
3497
|
+
writeObservedJournal(client: {
|
|
3498
|
+
readonly opaqueClient: _dbsp_types.TransitionSessionClient;
|
|
3278
3499
|
}, journal: _dbsp_types.StepJournal): Promise<void>;
|
|
3279
3500
|
isLockTimeout(error: unknown): boolean;
|
|
3280
3501
|
})[];
|
|
@@ -3348,6 +3569,11 @@ declare function validateIdentifiers(identifiers: Record<string, 'table' | 'colu
|
|
|
3348
3569
|
* NOT for use in SQL - use validateIdentifier + AST helpers for that.
|
|
3349
3570
|
*/
|
|
3350
3571
|
declare function sanitizeForDisplay(value: string): string;
|
|
3572
|
+
/**
|
|
3573
|
+
* Preserve hostile diagnostic text as one printable line without losing which
|
|
3574
|
+
* control character was supplied. This is for diagnostics only, never SQL.
|
|
3575
|
+
*/
|
|
3576
|
+
declare function escapeDiagnosticText(value: string): string;
|
|
3351
3577
|
/**
|
|
3352
3578
|
* Validate a raw SQL expression used in DDL contexts (defaults, policy USING/CHECK).
|
|
3353
3579
|
* Rejects injection vectors: semicolons, line-comment markers, block-comment markers.
|
|
@@ -3359,4 +3585,4 @@ declare function sanitizeForDisplay(value: string): string;
|
|
|
3359
3585
|
*/
|
|
3360
3586
|
declare function validateSqlExpression(sql: string, context: string): void;
|
|
3361
3587
|
|
|
3362
|
-
export { ADD_CHECK_RULE_ID, ALTER_AUTHORITY_OBSERVATION, ALTER_COLUMN_SET_NOT_NULL_OPERATION_KIND, ALTER_TYPE_ADD_VALUE_OPERATION_KIND, ATTACH_LOGICAL_IDENTITY_OPERATION_KIND, type AddedEnumValue, type AlterColumnSetNotNullPayload, type AlterTypeAddValuePayload, type AttachLogicalIdentityPayload, type BatchValuesJoinDecision, COLUMN_EXISTS_OBSERVATION, CamelCaseNamingPlugin, type CanonicalizeCheckConstraintsOptions, type ChangeKind, CheckConstraintCanonicalizationError, type CheckConstraintCanonicalizationWarning, CheckConstraintNewEnumValueError, type ComparePgsqlDatabaseSchemaOptions, type CompareSchemataOptions, type CompiledResult, type CompilerContext, type CompilerOptions, type CompilerState, type ConflictAction, type ConflictTarget, type CursorHoldOption, type CursorOptions, type CursorScrollOption, DBSP_LOGICAL_IDENTITY_TABLE, DBSP_META_SCHEMA, DBSP_TRANSITION_JOURNAL_TABLE, DBSP_TRANSITION_RUN_TABLE, DEFAULT_PK_COLUMN, DEFAULT_REDACTION_PATTERNS, type Decision, type DeleteConfig, type DetectedHierarchy, type DiffSummary, ENGINE_VERSION_OBSERVATION, ENUM_ADD_VALUE_RULE_ID, ENUM_LABEL_VISIBLE_OBSERVATION, ENUM_TYPE_EXISTS_OBSERVATION, type EnumAddValueMatch, type EnumAddValueRuleOptions, type ExplainFormat, type ExplainOptions, type ExplainPlan, ExpressionCanonicalizationUnavailableError, type ExpressionHandler, type FetchDirection, type FetchOptions, type FkColumnDerivation, type GenerateDDLOptions, type IdentityAdoptionAsserter, IdentityNamingPlugin, type IncludeHandler, type IncludeResult, type IndexCapabilityContext, IndexFeatureUnsupportedError, type IndexRenderSpec, type InsertConfig, type IntrospectedModelIR, type IntrospectionOptions, InvalidIdentifierError, type JoinDecision, LOGICAL_IDENTITY_ADOPTION_RULE_ID, LOGICAL_IDENTITY_CARRIER_OBSERVATION, type LeafCompileFn, type LogicalIdentityAdoptionMatch, type LogicalIdentityAdoptionRuleOptions, MANUAL_SQL_OPERATION_KIND, type ManualSqlPayload, type MigrationRecord, type MigrationSQLOptions, NO_NULLS_GUARD, type NamingPlugin, NonConvergentSchemaDiffError, PG_INTROSPECTION_ARTIFACT, PG_OPERATION_PACK_ARTIFACT, PG_RULE_PACK_ARTIFACT, type ParamRefValidationResult, type ParsedMigrationFile, type PgAdvisoryLockKey, type PgAdvisoryLockResult, type PgTransitionPackOptions, PgsqlAdapter, type PgsqlAdapterOptions, PgsqlAdvisoryLockOptionsError, type PgsqlBorrowedClientAdapterOptions, PgsqlPinnedConnectionAbortSignalError, type PgsqlPoolAdapterOptions, PgsqlRawSqlTransactionControlError, PgsqlTransactionAbortSignalError, PgsqlTransactionAbortedCommitError, PgsqlTransactionAbortedError, PgsqlTransactionOptionsError, PgsqlTransactionTimeoutError, PlanCompiler, type PlanDecision, type PrecompiledJoinDecision, type RedactionConfig, type RedactionPattern, SET_NOT_NULL_RULE_ID, type SchemaChange, type SchemaDiff, type SchemaScopeOptions, type SetNotNullMatch, type SetNotNullRuleOptions, type SetOperationResult, type SimplifiedPlanReport, type StreamConfig, type UpdateConfig, type UpsertConfig, type WhereDispatcher, type WhereHandler, assertCreateIndexSupported, assertCreateIndexesSupported, assertNoRepeatedExpressionSurfaceDrift, bm25Search, booleanSearch, boost, buildCloseCursor, buildDeclareCursor, buildExplain, buildExplainAnalyzeJson, buildExplainPlan, buildExplainVerbose, buildFetch, buildFetchAll, buildFetchFirst, buildFetchForward, buildFetchNext, buildOnConflictClause, buildStreamingStatements, camelCaseNaming, canGenerateCreateIndex, canonicalizeCheckConstraints, collectAndValidateParamRefs, comparePgsqlDatabaseSchema, compareSchemata, compileDelete, compileInsert, compileMutation, compilePlan, compileSetOperation, compileUpdate, compileUpsert, conditionalUpdate, cosineDistance, createAlterColumnSetNotNullOperationRuntime, createAlterTypeAddValueOperationRuntime, createAnyExpr, createAttachLogicalIdentityOperationRuntime, createEnumAddValueRule, createEqualityExpr, createLeafCompileFn, createLogicalIdentityAdoptionRule, createManualSqlOperationRuntime, createParamRef, createPgObservationIssuer, createPgTransitionPack, createPgsqlAdapter, createPgsqlCompileOnlyAdapter, createSetNotNullRule, createTypeCastParamRef, defaultFkDerivation, derivePostgresqlCapabilitiesForVersion, ensureMigrationsTable, ensureTransitionJournal, excludedRef, generateCreateIndex, generateCursorName, generateDDL, generateDownSQL, generateMigrationFile, generateMigrationSQL, generateSeries, getAppliedMigrations, getNamingPluginForDbCasing, getNextSchemaVersion, getRowEstimates, getTotalExecutionTime, identityNaming, innerProduct, introspect, isBatchValuesJoinDecision, isDestructiveDown, isJoinDecision, isMigrationApplied, isPrecompiledJoinDecision, isReservedKeyword, l2Distance, mapColumnType, mapOnDeleteAction, nextval, normalizeManualSqlPayload, parse, parseExplainJson, parseMigrationFile, rawDistance,
|
|
3588
|
+
export { ADD_CHECK_RULE_ID, ALTER_AUTHORITY_OBSERVATION, ALTER_COLUMN_SET_NOT_NULL_OPERATION_KIND, ALTER_TYPE_ADD_VALUE_OPERATION_KIND, ATTACH_LOGICAL_IDENTITY_OPERATION_KIND, type AddedEnumValue, type AlterColumnSetNotNullPayload, type AlterTypeAddValuePayload, type AttachLogicalIdentityPayload, type BatchValuesJoinDecision, COLUMN_EXISTS_OBSERVATION, CamelCaseNamingPlugin, type CanonicalizeCheckConstraintsOptions, type ChangeKind, CheckConstraintCanonicalizationError, type CheckConstraintCanonicalizationWarning, CheckConstraintNewEnumValueError, ColumnDefaultCanonicalizationError, type ColumnDefaultCanonicalizationWarning, type ComparePgsqlDatabaseSchemaOptions, type CompareSchemataOptions, type CompiledResult, type CompilerContext, type CompilerOptions, type CompilerState, type ConflictAction, type ConflictTarget, type CursorHoldOption, type CursorOptions, type CursorScrollOption, DBSP_LOGICAL_IDENTITY_TABLE, DBSP_META_SCHEMA, DBSP_TRANSITION_JOURNAL_TABLE, DBSP_TRANSITION_RUN_PLAN_TABLE, DBSP_TRANSITION_RUN_TABLE, DEFAULT_PK_COLUMN, DEFAULT_REDACTION_PATTERNS, type Decision, type DeleteConfig, type DetectedHierarchy, type DiffSummary, ENGINE_VERSION_OBSERVATION, ENUM_ADD_VALUE_RULE_ID, ENUM_LABEL_VISIBLE_OBSERVATION, ENUM_TYPE_EXISTS_OBSERVATION, type EnumAddValueMatch, type EnumAddValueRuleOptions, type ExplainFormat, type ExplainOptions, type ExplainPlan, ExpressionCanonicalizationUnavailableError, type ExpressionCanonicalizationWarning, type ExpressionHandler, type FetchDirection, type FetchOptions, type FkColumnDerivation, type GenerateDDLOptions, type IdentityAdoptionAsserter, IdentityNamingPlugin, type IncludeHandler, type IncludeResult, type IndexCapabilityContext, IndexFeatureUnsupportedError, type IndexRenderSpec, type InsertConfig, type IntrospectedModelIR, type IntrospectionOptions, InvalidIdentifierError, type JoinDecision, LOGICAL_IDENTITY_ADOPTION_RULE_ID, LOGICAL_IDENTITY_CARRIER_OBSERVATION, type LeafCompileFn, type LogicalIdentityAdoptionMatch, type LogicalIdentityAdoptionRuleOptions, MANUAL_SQL_OPERATION_KIND, type ManualSqlPayload, type MigrationRecord, type MigrationSQLOptions, NO_NULLS_GUARD, type NamingPlugin, NonConvergentSchemaDiffError, type NonConvergentSchemaDiffSurface, PG_INTROSPECTION_ARTIFACT, PG_OPERATION_PACK_ARTIFACT, PG_RULE_PACK_ARTIFACT, type ParamRefValidationResult, type ParsedMigrationFile, type PgAdvisoryLockKey, type PgAdvisoryLockResult, PgExecutionContractDerivationError, type PgTransitionClientLease, type PgTransitionPackOptions, PgsqlAdapter, type PgsqlAdapterOptions, PgsqlAdvisoryLockOptionsError, type PgsqlBorrowedClientAdapterOptions, PgsqlPinnedConnectionAbortSignalError, type PgsqlPoolAdapterOptions, PgsqlRawSqlTransactionControlError, PgsqlTransactionAbortSignalError, PgsqlTransactionAbortedCommitError, PgsqlTransactionAbortedError, PgsqlTransactionOptionsError, PgsqlTransactionTimeoutError, PlanCompiler, type PlanDecision, type PrecompiledJoinDecision, type RedactionConfig, type RedactionPattern, type RollbackOnlyPgsqlScope, SET_NOT_NULL_RULE_ID, type SchemaChange, type SchemaDiff, type SchemaScopeOptions, type SetNotNullMatch, type SetNotNullRuleOptions, type SetOperationResult, type SimplifiedPlanReport, type StreamConfig, type UpdateConfig, type UpsertConfig, type WhereDispatcher, type WhereHandler, acquirePgTransitionClient, assertCreateIndexSupported, assertCreateIndexesSupported, assertNoRepeatedExpressionSurfaceDrift, bm25Search, booleanSearch, boost, buildCloseCursor, buildDeclareCursor, buildExplain, buildExplainAnalyzeJson, buildExplainPlan, buildExplainVerbose, buildFetch, buildFetchAll, buildFetchFirst, buildFetchForward, buildFetchNext, buildOnConflictClause, buildStreamingStatements, camelCaseNaming, canGenerateCreateIndex, canonicalizeCheckConstraints, collectAndValidateParamRefs, comparePgsqlDatabaseSchema, compareSchemata, compileDelete, compileInsert, compileMutation, compilePlan, compileSetOperation, compileUpdate, compileUpsert, conditionalUpdate, cosineDistance, createAlterColumnSetNotNullOperationRuntime, createAlterTypeAddValueOperationRuntime, createAnyExpr, createAttachLogicalIdentityOperationRuntime, createEnumAddValueRule, createEqualityExpr, createLeafCompileFn, createLogicalIdentityAdoptionRule, createManualSqlOperationRuntime, createParamRef, createPgExecutionContract, createPgObservationIssuer, createPgTransitionLessor, createPgTransitionPack, createPgTransitionRunPersister, createPgsqlAdapter, createPgsqlCompileOnlyAdapter, createSetNotNullRule, createTypeCastParamRef, defaultFkDerivation, derivePostgresqlCapabilitiesForVersion, ensureMigrationsTable, ensureTransitionJournal, escapeDiagnosticText, evaluatePgExecutionContract, excludedRef, executePgObservationFromLessor, generateCreateIndex, generateCursorName, generateDDL, generateDownSQL, generateMigrationFile, generateMigrationSQL, generateSeries, getAppliedMigrations, getNamingPluginForDbCasing, getNextSchemaVersion, getRowEstimates, getTotalExecutionTime, identityNaming, innerProduct, introspect, isBatchValuesJoinDecision, isDestructiveDown, isJoinDecision, isMigrationApplied, isPrecompiledJoinDecision, isReservedKeyword, l2Distance, mapColumnType, mapOnDeleteAction, nextval, normalizeManualSqlPayload, parse, parseExplainJson, parseMigrationFile, pgTargetIdentityMismatch, rawDistance, readPgExecutionTargetFromClient, readPgObservationContextFromLessor, readTransitionJournal, recordMigration, redactParams, removeMigrationRecord, renderAlterColumnSetNotNullSql, renderAlterTypeAddValueSql, renderAttachLogicalIdentityLockSql, renderCreateDbspMetaSchemaSql, renderCreateIndex, renderCreateLogicalIdentityIndexesSql, renderCreateLogicalIdentitySideTableSql, renderCreateTransitionJournalTableSql, renderCreateTransitionRunPlanTableSql, renderCreateTransitionRunTableSql, renderInsertLogicalIdentitySql, renderNoNullsCheckSql, renderSetNotNullLockSql, resolveLogicalName, sanitizeForDisplay, score, validateIdentifier, validateIdentifiers, validateParamRef, validateQualifiedIdentifier, validateSqlExpression, vectorDims, withMigrationLock };
|