@dbsp/adapter-pgsql 3.0.0 → 3.1.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/dist/index.d.ts CHANGED
@@ -1,7 +1,8 @@
1
- import { IndexInfo, TruncateOptions, VacuumOptions, AlterColumnOptions, CreateIndexOptions, DropIndexOptions, ExpressionRef, ModelIR as ModelIR$1 } from '@dbsp/core';
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
3
  export { normalizeSQL } from '@dbsp/core';
3
4
  import * as _dbsp_types from '@dbsp/types';
4
- 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, CompileOnlyAdapter, ColumnIR, MutationReturningItem, WhereIntent, QueryIntent } 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, CompileOnlyAdapter, ColumnIR, MutationReturningItem, WhereIntent, OutputDescriptor, QueryIntent, OperationKindRef, SemanticArtifactRef, TransitionRunJournal, ObservationIssuer, ObservationContext, TypeRef, ExpressionValue, CollationRef, LogicalIdentity, PhysicalOperation, OperationEffectAssessment, EvidenceObservation, FingerprintManifest, DurableIntentRecord, IssuedObservation, ApplyGuard, AdvisoryObservation, TransactionalCompletionRecord, StepJournal, UnsafeNativeFragment, ResourceAddress, ExecutableAssertion, Assumption, TransitionRule, TransitionCompositionFact, TrustRoot, RequiredEnumLabelIR } from '@dbsp/types';
5
6
  import * as _pgsql_types from '@pgsql/types';
6
7
  import { Node, OnConflictClause, ParamRef } from '@pgsql/types';
7
8
  import { Pool, PoolClient } from 'pg';
@@ -727,6 +728,39 @@ declare class PlanCompiler {
727
728
  */
728
729
  declare function compilePlan(plan: SimplifiedPlanReport, options?: CompilerOptions): CompiledResult;
729
730
 
731
+ type IndexRenderKey = {
732
+ readonly column?: string | undefined;
733
+ readonly expression?: string | undefined;
734
+ readonly opclass?: string | undefined;
735
+ };
736
+ type IndexRenderSpec = {
737
+ readonly name: string;
738
+ readonly table: string;
739
+ readonly schema?: string | undefined;
740
+ readonly unique: boolean;
741
+ readonly method?: string | undefined;
742
+ readonly keys: readonly IndexRenderKey[];
743
+ readonly include?: readonly string[] | undefined;
744
+ readonly nullsNotDistinct?: boolean | undefined;
745
+ readonly with?: Readonly<Record<string, unknown>> | undefined;
746
+ readonly where?: string | undefined;
747
+ readonly concurrently?: boolean | undefined;
748
+ readonly ifNotExists?: boolean | undefined;
749
+ };
750
+ type IndexCapabilityContext = {
751
+ readonly caps: DialectCapabilities;
752
+ readonly targetVersion?: string | undefined;
753
+ };
754
+ type IndexFeature = 'INCLUDE' | 'PARTIAL INDEX' | 'EXPRESSION INDEX' | 'INDEX METHOD' | 'OPCLASS' | 'NULLS NOT DISTINCT';
755
+ declare class IndexFeatureUnsupportedError extends Error {
756
+ readonly indexName: string;
757
+ readonly unsupportedFeatures: readonly IndexFeature[];
758
+ constructor(indexName: string, unsupportedFeatures: readonly IndexFeature[], message: string);
759
+ }
760
+ declare function assertCreateIndexSupported(spec: IndexRenderSpec, ctx?: IndexCapabilityContext): void;
761
+ declare function assertCreateIndexesSupported(specs: readonly IndexRenderSpec[], ctx?: IndexCapabilityContext): void;
762
+ declare function renderCreateIndex(spec: IndexRenderSpec, ctx?: IndexCapabilityContext): string;
763
+
730
764
  /**
731
765
  * DDL Generator - Generates PostgreSQL DDL statements from ModelIR
732
766
  *
@@ -753,7 +787,7 @@ interface GenerateDDLOptions {
753
787
  readonly fkAutoIndex?: boolean;
754
788
  /** Naming plugin for identifier transformation */
755
789
  readonly naming?: NamingPlugin;
756
- /** Dialect capabilities — DDL passes for unsupported features will be skipped */
790
+ /** Dialect capabilities — unsupported index features throw during DDL generation */
757
791
  readonly dialectCapabilities?: DialectCapabilities;
758
792
  }
759
793
  /**
@@ -769,7 +803,7 @@ interface GenerateDDLOptions {
769
803
  * @returns Array of DDL statements in dependency order
770
804
  */
771
805
  declare function generateDDL(schema: ModelIR, options?: GenerateDDLOptions): string[];
772
- declare function generateCreateIndex(tableName: string, idx: IndexIR, schemaName: string | undefined, naming: NamingPlugin): string;
806
+ declare function generateCreateIndex(tableName: string, idx: IndexIR, schemaName: string | undefined, naming: NamingPlugin, context?: IndexCapabilityContext): string;
773
807
  /**
774
808
  * Returns whether the PostgreSQL DDL generator can emit this IndexIR.
775
809
  *
@@ -980,7 +1014,7 @@ declare class PgsqlAdapter<DB = unknown> implements Adapter<DB> {
980
1014
  private requireNqlCompileModel;
981
1015
  private assertNqlBindingNamesDisjointFromTables;
982
1016
  private compileNqlMutation;
983
- private compileNqlBundleLeaf;
1017
+ private compileNqlBundleLeafEnvelope;
984
1018
  private compileNqlBundle;
985
1019
  /**
986
1020
  * Returns the pool/client executor, or throws if in compile-only mode.
@@ -1030,7 +1064,7 @@ declare class PgsqlAdapter<DB = unknown> implements Adapter<DB> {
1030
1064
  * @param expr - ExpressionIntent to evaluate
1031
1065
  * @returns Compiled SQL and parameters
1032
1066
  */
1033
- compileSelectExpression(expr: ExpressionIntent): CompiledQuery;
1067
+ compileSelectExpression<T = unknown>(expr: ExpressionIntent): CompiledQuery<T>;
1034
1068
  /**
1035
1069
  * Compile an insert intent to executable SQL.
1036
1070
  *
@@ -1075,7 +1109,7 @@ declare class PgsqlAdapter<DB = unknown> implements Adapter<DB> {
1075
1109
  * Compile a recursive CTE plan to executable SQL.
1076
1110
  * Supports adjacency-list and edge-table traversal modes.
1077
1111
  */
1078
- compileRecursive(report: RecursivePlanReport, model: ModelIR, options?: CompileOptions): CompiledQuery;
1112
+ compileRecursive<T = unknown>(report: RecursivePlanReport, model: ModelIR, options?: CompileOptions): CompiledQuery<T>;
1079
1113
  /**
1080
1114
  * Compile a CTE query backed by unnest() arrays (BATCH-001 Block 5).
1081
1115
  *
@@ -1083,11 +1117,11 @@ declare class PgsqlAdapter<DB = unknown> implements Adapter<DB> {
1083
1117
  * independently (parameters starting at $1), then renumber outer params
1084
1118
  * to start after CTE params and prepend WITH clause.
1085
1119
  */
1086
- compileCteQuery(intent: CteQueryIntent, options?: CompileOptions): CompiledQuery;
1120
+ compileCteQuery<T = unknown>(intent: CteQueryIntent, options?: CompileOptions): CompiledQuery<T>;
1087
1121
  /**
1088
1122
  * Compile a set operation (UNION / INTERSECT / EXCEPT) to SQL.
1089
1123
  */
1090
- compileSetOperation(intent: SetOperationIntent, model: ModelIR, options?: CompileOptions): CompiledQuery;
1124
+ compileSetOperation<T = unknown>(intent: SetOperationIntent, model: ModelIR, options?: CompileOptions): CompiledQuery<T>;
1091
1125
  private compileSetOperationWithBindings;
1092
1126
  /**
1093
1127
  * Create a dump for observability.
@@ -1123,6 +1157,9 @@ declare class PgsqlAdapter<DB = unknown> implements Adapter<DB> {
1123
1157
  * @returns AsyncIterableIterator that yields rows one by one
1124
1158
  */
1125
1159
  stream<T>(query: CompiledQuery<T>, options?: AdapterStreamOptions): AsyncIterableIterator<T>;
1160
+ /** Stream raw SQL directly using the same cursor machinery as stream(). */
1161
+ streamRaw<T = unknown>(sql: string, parameters?: readonly unknown[], options?: AdapterStreamOptions): AsyncIterableIterator<T>;
1162
+ private streamCursor;
1126
1163
  /**
1127
1164
  * Internal: Stream with an existing client using cursors.
1128
1165
  */
@@ -1562,7 +1599,7 @@ interface MigrationSQLOptions {
1562
1599
  readonly includeDestructive?: boolean;
1563
1600
  /** Automatically create indexes on FK columns for new tables (default: true) */
1564
1601
  readonly fkAutoIndex?: boolean;
1565
- /** Dialect capabilities — migration SQL for unsupported features will be filtered */
1602
+ /** Dialect capabilities — unsupported index features throw during migration SQL generation */
1566
1603
  readonly dialectCapabilities?: DialectCapabilities;
1567
1604
  }
1568
1605
  /**
@@ -2341,6 +2378,8 @@ declare function collectAndValidateParamRefs(node: unknown): {
2341
2378
  allValid: boolean;
2342
2379
  };
2343
2380
 
2381
+ declare function derivePostgresqlCapabilitiesForVersion(version: string): DialectCapabilities;
2382
+
2344
2383
  /**
2345
2384
  * Redact sensitive values in a query dump's `params` array before logging.
2346
2385
  *
@@ -2371,6 +2410,28 @@ declare const DEFAULT_REDACTION_PATTERNS: ReadonlyArray<RegExp>;
2371
2410
  */
2372
2411
  declare function redactParams(params: readonly unknown[], config: RedactionConfig): readonly unknown[];
2373
2412
 
2413
+ declare const projectionEnvelopeBrand: unique symbol;
2414
+ type ProjectionEnvelope<T = unknown> = {
2415
+ readonly [projectionEnvelopeBrand]: true;
2416
+ readonly sql: string;
2417
+ readonly parameters: readonly unknown[];
2418
+ readonly ast?: Node;
2419
+ readonly projection: ProjectionState;
2420
+ readonly hydrationPlan?: PlanReport;
2421
+ readonly __resultType?: T;
2422
+ };
2423
+ type ProjectionState = {
2424
+ readonly kind: 'known';
2425
+ readonly outputs: ReadonlyMap<string, OutputProjection>;
2426
+ } | {
2427
+ readonly kind: 'dropped';
2428
+ readonly reason: ProjectionDropReason;
2429
+ readonly hadConvertibleSource: boolean;
2430
+ };
2431
+ type OutputProjection = OutputDescriptor;
2432
+
2433
+ type ProjectionDropReason = 'set-operation-positional-merge' | 'raw-recursive-cte-positional-merge' | 'unknown-raw-sql' | 'unsupported-source';
2434
+
2374
2435
  /**
2375
2436
  * Set operation compiler (UNION / INTERSECT / EXCEPT)
2376
2437
  *
@@ -2379,37 +2440,33 @@ declare function redactParams(params: readonly unknown[], config: RedactionConfi
2379
2440
  */
2380
2441
 
2381
2442
  /**
2382
- * Compiled SQL with positional parameters.
2443
+ * Compiled set-operation SQL with positional parameters.
2383
2444
  */
2384
- interface SetOperationResult {
2385
- readonly sql: string;
2386
- readonly parameters: readonly unknown[];
2387
- }
2445
+ type SetOperationResult<T = unknown> = CompiledQuery<T>;
2388
2446
  /**
2389
- * Function that compiles a single QueryIntent leaf to SQL + parameters.
2447
+ * Function that compiles a single QueryIntent leaf to a projection envelope, or
2448
+ * a compiled query that can be bridged into one.
2390
2449
  * Provided by the caller to decouple from adapter internals.
2391
2450
  */
2392
- type LeafCompileFn = (query: QueryIntent) => {
2393
- sql: string;
2394
- parameters: readonly unknown[];
2395
- };
2451
+ type LeafCompileResult = ProjectionEnvelope | CompiledQuery;
2452
+ type LeafCompileFn = (query: QueryIntent) => LeafCompileResult;
2396
2453
  /**
2397
2454
  * Recursively compile a SetOperationIntent to SQL with merged parameters.
2398
2455
  *
2399
- * Each leaf QueryIntent is compiled via `compileFn`. When merging left and
2400
- * right branches, the right side's `$N` placeholders are renumbered so they
2401
- * don't collide with the left side's parameters.
2456
+ * Each leaf QueryIntent is compiled via `compileFn` to a projection envelope.
2457
+ * When merging left and right branches, the right side's `$N` placeholders are
2458
+ * renumbered so they don't collide with the left side's parameters. The final
2459
+ * set operation drops positional projection provenance through the envelope so
2460
+ * `finalizeEnvelope` owns the set-operation `js` fail-loud behavior.
2402
2461
  *
2403
2462
  * @param intent - The set operation intent (recursive tree)
2404
- * @param compileFn - Compiles a single QueryIntent to SQL + params
2463
+ * @param compileFn - Compiles a single QueryIntent to an envelope-compatible result
2405
2464
  * @returns Combined SQL string and merged parameter array
2406
2465
  *
2407
2466
  * @example
2408
2467
  * ```typescript
2409
- * const result = compileSetOperation(setOpIntent, (query) => {
2410
- * const planReport = plan(query, model, { dialectCapabilities });
2411
- * return adapter.compile(planReport, { model });
2412
- * });
2468
+ * const compileFn = createLeafCompileFn(adapter, model, plan);
2469
+ * const result = compileSetOperation(setOpIntent, compileFn);
2413
2470
  * console.log(result.sql); // (SELECT ...) UNION (SELECT ...)
2414
2471
  * console.log(result.parameters); // [...leftParams, ...rightParams]
2415
2472
  * ```
@@ -2428,10 +2485,7 @@ declare function compileSetOperation(intent: SetOperationIntent, compileFn: Leaf
2428
2485
  declare function createLeafCompileFn(adapter: {
2429
2486
  compile(plan: PlanReport, options: CompileOptions & {
2430
2487
  model: ModelIR$1;
2431
- }): {
2432
- sql: string;
2433
- parameters: readonly unknown[];
2434
- };
2488
+ }): CompiledQuery;
2435
2489
  dialectCapabilities: DialectCapabilities;
2436
2490
  }, model: ModelIR$1, planFn: (intent: QueryIntent, model: ModelIR$1, options: {
2437
2491
  dialectCapabilities: DialectCapabilities;
@@ -2593,6 +2647,550 @@ declare function buildStreamingStatements(query: Node, config?: StreamConfig): {
2593
2647
  close: Node;
2594
2648
  };
2595
2649
 
2650
+ declare const PG_OPERATION_PACK_ARTIFACT: SemanticArtifactRef;
2651
+ declare const PG_RULE_PACK_ARTIFACT: SemanticArtifactRef;
2652
+ declare const PG_INTROSPECTION_ARTIFACT: SemanticArtifactRef;
2653
+ declare const ALTER_COLUMN_SET_NOT_NULL_OPERATION_KIND: OperationKindRef;
2654
+ declare const ALTER_TYPE_ADD_VALUE_OPERATION_KIND: OperationKindRef;
2655
+ declare const ATTACH_LOGICAL_IDENTITY_OPERATION_KIND: OperationKindRef;
2656
+ declare const MANUAL_SQL_OPERATION_KIND: OperationKindRef;
2657
+ declare const SET_NOT_NULL_RULE_ID = "postgresql.column.set-not-null";
2658
+ declare const ADD_CHECK_RULE_ID = "postgresql.table.add-check";
2659
+ declare const ENUM_ADD_VALUE_RULE_ID = "postgresql.enum.add-value";
2660
+ declare const LOGICAL_IDENTITY_ADOPTION_RULE_ID = "postgresql.logical-identity.adopt";
2661
+ declare const DBSP_META_SCHEMA = "dbsp_meta";
2662
+ declare const DBSP_TRANSITION_RUN_TABLE = "dbsp_transition_run";
2663
+ declare const DBSP_TRANSITION_JOURNAL_TABLE = "dbsp_transition_journal";
2664
+ declare const DBSP_LOGICAL_IDENTITY_TABLE = "dbsp_logical_identity";
2665
+ declare const COLUMN_EXISTS_OBSERVATION = "postgresql.column.exists";
2666
+ declare const ENUM_TYPE_EXISTS_OBSERVATION = "postgresql.enum-type.exists";
2667
+ declare const ENUM_LABEL_VISIBLE_OBSERVATION = "postgresql.enum-label.visible";
2668
+ declare const ALTER_AUTHORITY_OBSERVATION = "postgresql.table.alter-authority";
2669
+ declare const ENGINE_VERSION_OBSERVATION = "postgresql.engine.version-supported";
2670
+ declare const LOGICAL_IDENTITY_CARRIER_OBSERVATION = "postgresql.logical-identity.carrier-state";
2671
+ declare const NO_NULLS_GUARD = "NO_NULLS";
2672
+
2673
+ type QueryResultLike = {
2674
+ readonly rows: readonly Record<string, unknown>[];
2675
+ };
2676
+ type TransitionJournalQueryable = {
2677
+ query(sql: string, params?: readonly unknown[]): Promise<QueryResultLike>;
2678
+ };
2679
+ declare function renderCreateDbspMetaSchemaSql(): string;
2680
+ declare function renderCreateTransitionRunTableSql(): string;
2681
+ declare function renderCreateTransitionJournalTableSql(): string;
2682
+ declare function ensureTransitionJournal(executor: TransitionJournalQueryable): Promise<void>;
2683
+ declare function readTransitionJournal(executor: TransitionJournalQueryable, runId: string): Promise<TransitionRunJournal>;
2684
+
2685
+ type ObservationTarget = {
2686
+ readonly table: string;
2687
+ readonly column?: string;
2688
+ readonly constraint?: string;
2689
+ readonly index?: string;
2690
+ readonly schema?: string;
2691
+ };
2692
+ type EnumObservationTarget = {
2693
+ readonly type: string;
2694
+ readonly label?: string;
2695
+ readonly schema?: string;
2696
+ };
2697
+ declare function createPgObservationIssuer(): ObservationIssuer;
2698
+ declare function readPgObservationContext(target: unknown, schema?: string, observationTarget?: ObservationTarget | EnumObservationTarget): Promise<ObservationContext>;
2699
+
2700
+ interface SetNotNullColumnShapeExpectation {
2701
+ readonly kind: 'postgresql.set-not-null.column-shape.v1';
2702
+ readonly name: string;
2703
+ readonly nullability: {
2704
+ readonly from: true;
2705
+ readonly to: boolean;
2706
+ };
2707
+ readonly type: TypeRef;
2708
+ readonly default: ExpressionValue | null;
2709
+ readonly collation: CollationRef;
2710
+ readonly identity: 'always' | 'byDefault' | null;
2711
+ readonly generated: string | null;
2712
+ readonly autoIncrement: boolean;
2713
+ readonly unique: boolean;
2714
+ readonly uniqueConstraintName: string | null;
2715
+ readonly logicalIdentity?: LogicalIdentity | null;
2716
+ readonly comment: string | null;
2717
+ readonly target?: ColumnDefaultAttestationTarget;
2718
+ }
2719
+ interface ColumnDefaultAttestationTarget {
2720
+ readonly database?: string;
2721
+ readonly schema?: string;
2722
+ readonly table: string;
2723
+ readonly column: string;
2724
+ }
2725
+
2726
+ type AlterColumnSetNotNullPayload = {
2727
+ readonly table: string;
2728
+ readonly column: string;
2729
+ readonly schema?: string;
2730
+ readonly expectedColumnShape?: SetNotNullColumnShapeExpectation;
2731
+ };
2732
+ type TransitionExecutionClient$3 = {
2733
+ readonly opaqueClient: unknown;
2734
+ };
2735
+ declare function renderAlterColumnSetNotNullSql(payload: AlterColumnSetNotNullPayload, context: ObservationContext): string;
2736
+ declare function renderSetNotNullLockSql(payload: AlterColumnSetNotNullPayload, context: ObservationContext): string;
2737
+ declare function renderNoNullsCheckSql(payload: AlterColumnSetNotNullPayload, context: ObservationContext): string;
2738
+ declare function beforeAfterFingerprints$3(operation: PhysicalOperation, evidence: readonly EvidenceObservation[], context: ObservationContext): {
2739
+ expectedBefore: FingerprintManifest;
2740
+ expectedAfter: FingerprintManifest;
2741
+ };
2742
+ declare function createAlterColumnSetNotNullOperationRuntime(): {
2743
+ artifact: _dbsp_types.SemanticArtifactRef;
2744
+ supportsOperation(operation: PhysicalOperation): boolean;
2745
+ effectsOf(operation: PhysicalOperation, context: ObservationContext): OperationEffectAssessment;
2746
+ buildFingerprints: typeof beforeAfterFingerprints$3;
2747
+ checkout(target: unknown): Promise<TransitionExecutionClient$3>;
2748
+ release(client: TransitionExecutionClient$3, error?: unknown): void;
2749
+ writeIntentJournal(client: TransitionExecutionClient$3, record: DurableIntentRecord): Promise<void>;
2750
+ begin(client: TransitionExecutionClient$3): Promise<void>;
2751
+ setLockTimeout(client: TransitionExecutionClient$3, maxWaitMs: number): Promise<void>;
2752
+ acquireLocks(client: TransitionExecutionClient$3, operation: PhysicalOperation, _effects: OperationEffectAssessment, context: ObservationContext): Promise<void>;
2753
+ observeContext(client: TransitionExecutionClient$3, operation: PhysicalOperation, _proofContext: ObservationContext): Promise<ObservationContext>;
2754
+ observeOperation(client: TransitionExecutionClient$3, operation: PhysicalOperation, context: ObservationContext, _phase: "before" | "after", issuer: ObservationIssuer): Promise<{
2755
+ observations: IssuedObservation[];
2756
+ fingerprint: FingerprintManifest;
2757
+ }>;
2758
+ checkGuard(client: TransitionExecutionClient$3, operation: PhysicalOperation, guard: ApplyGuard, context: ObservationContext): Promise<{
2759
+ passed: boolean;
2760
+ observations: AdvisoryObservation[];
2761
+ recovery: readonly _dbsp_types.RecoveryArtefact[];
2762
+ }>;
2763
+ executeOperation(client: TransitionExecutionClient$3, operation: PhysicalOperation, context: ObservationContext, duringGuards?: readonly ApplyGuard[]): Promise<{
2764
+ kind: string;
2765
+ }>;
2766
+ writeCompletionJournal(client: TransitionExecutionClient$3, operation: PhysicalOperation, record: TransactionalCompletionRecord): Promise<void>;
2767
+ commit(client: TransitionExecutionClient$3): Promise<void>;
2768
+ rollback(client: TransitionExecutionClient$3): Promise<void>;
2769
+ writeObservedJournal(client: TransitionExecutionClient$3, journal: StepJournal): Promise<void>;
2770
+ isLockTimeout(error: unknown): boolean;
2771
+ };
2772
+
2773
+ type AlterTypeAddValuePayload = {
2774
+ readonly schema: string;
2775
+ readonly type: string;
2776
+ readonly label: string;
2777
+ readonly after?: string;
2778
+ readonly expectedBefore: readonly string[];
2779
+ readonly expectedAfter: readonly string[];
2780
+ };
2781
+ type TransitionExecutionClient$2 = {
2782
+ readonly opaqueClient: unknown;
2783
+ };
2784
+ declare function renderAlterTypeAddValueSql(payload: AlterTypeAddValuePayload, context: ObservationContext): string;
2785
+ declare function beforeAfterFingerprints$2(operation: PhysicalOperation, evidence: readonly EvidenceObservation[], context: ObservationContext): {
2786
+ expectedBefore: FingerprintManifest;
2787
+ expectedAfter: FingerprintManifest;
2788
+ };
2789
+ declare function createAlterTypeAddValueOperationRuntime(): {
2790
+ artifact: _dbsp_types.SemanticArtifactRef;
2791
+ operationKind: _dbsp_types.OperationKindRef;
2792
+ supportsOperation(operation: PhysicalOperation): boolean;
2793
+ effectsOf(operation: PhysicalOperation, context: ObservationContext): OperationEffectAssessment;
2794
+ buildFingerprints: typeof beforeAfterFingerprints$2;
2795
+ checkout(target: unknown): Promise<TransitionExecutionClient$2>;
2796
+ release(client: TransitionExecutionClient$2, error?: unknown): void;
2797
+ writeIntentJournal(client: TransitionExecutionClient$2, record: DurableIntentRecord): Promise<void>;
2798
+ begin(client: TransitionExecutionClient$2): Promise<void>;
2799
+ setLockTimeout(client: TransitionExecutionClient$2, maxWaitMs: number): Promise<void>;
2800
+ acquireLocks(client: TransitionExecutionClient$2, operation: PhysicalOperation): Promise<void>;
2801
+ observeContext(client: TransitionExecutionClient$2, operation: PhysicalOperation, _proofContext: ObservationContext): Promise<ObservationContext>;
2802
+ observeOperation(client: TransitionExecutionClient$2, operation: PhysicalOperation, context: ObservationContext, _phase: "before" | "after", issuer: ObservationIssuer): Promise<{
2803
+ observations: IssuedObservation[];
2804
+ fingerprint: FingerprintManifest;
2805
+ }>;
2806
+ checkGuard(client: TransitionExecutionClient$2, operation: PhysicalOperation, guard: ApplyGuard, context: ObservationContext): Promise<{
2807
+ passed: boolean;
2808
+ observations: EvidenceObservation[];
2809
+ recovery: readonly _dbsp_types.RecoveryArtefact[];
2810
+ }>;
2811
+ executeOperation(client: TransitionExecutionClient$2, operation: PhysicalOperation, context: ObservationContext, duringGuards?: readonly ApplyGuard[]): Promise<{
2812
+ kind: string;
2813
+ }>;
2814
+ writeCompletionJournal(client: TransitionExecutionClient$2, operation: PhysicalOperation, record: TransactionalCompletionRecord): Promise<void>;
2815
+ commit(client: TransitionExecutionClient$2): Promise<void>;
2816
+ rollback(client: TransitionExecutionClient$2): Promise<void>;
2817
+ writeObservedJournal(client: TransitionExecutionClient$2, journal: StepJournal): Promise<void>;
2818
+ isLockTimeout(error: unknown): boolean;
2819
+ };
2820
+
2821
+ type AttachLogicalIdentityPayload = {
2822
+ readonly schema: string;
2823
+ readonly table: string;
2824
+ readonly column?: string;
2825
+ readonly logicalId: string;
2826
+ readonly carrierKind: 'postgresql-side-table';
2827
+ readonly authenticated: false;
2828
+ };
2829
+ type TransitionExecutionClient$1 = {
2830
+ readonly opaqueClient: unknown;
2831
+ };
2832
+ declare function renderAttachLogicalIdentityLockSql(payload: AttachLogicalIdentityPayload): string;
2833
+ declare function renderCreateLogicalIdentitySideTableSql(_schema: string): string;
2834
+ declare function renderCreateLogicalIdentityIndexesSql(_schema: string): readonly string[];
2835
+ declare function renderInsertLogicalIdentitySql(_schema: string): string;
2836
+ declare function beforeAfterFingerprints$1(operation: PhysicalOperation, evidence: readonly EvidenceObservation[], context: ObservationContext): {
2837
+ expectedBefore: FingerprintManifest;
2838
+ expectedAfter: FingerprintManifest;
2839
+ };
2840
+ declare function createAttachLogicalIdentityOperationRuntime(): {
2841
+ artifact: _dbsp_types.SemanticArtifactRef;
2842
+ supportsOperation(operation: PhysicalOperation): boolean;
2843
+ effectsOf(operation: PhysicalOperation, context: ObservationContext): OperationEffectAssessment;
2844
+ buildFingerprints: typeof beforeAfterFingerprints$1;
2845
+ checkout(target: unknown): Promise<TransitionExecutionClient$1>;
2846
+ release(client: TransitionExecutionClient$1, error?: unknown): void;
2847
+ writeIntentJournal(client: TransitionExecutionClient$1, record: DurableIntentRecord): Promise<void>;
2848
+ begin(client: TransitionExecutionClient$1): Promise<void>;
2849
+ setLockTimeout(client: TransitionExecutionClient$1, maxWaitMs: number): Promise<void>;
2850
+ acquireLocks(client: TransitionExecutionClient$1, operation: PhysicalOperation): Promise<void>;
2851
+ observeContext(client: TransitionExecutionClient$1, operation: PhysicalOperation, _proofContext: ObservationContext): Promise<ObservationContext>;
2852
+ observeOperation(client: TransitionExecutionClient$1, operation: PhysicalOperation, context: ObservationContext, phase: "before" | "after", issuer: ObservationIssuer): Promise<{
2853
+ observations: IssuedObservation[];
2854
+ fingerprint: FingerprintManifest;
2855
+ }>;
2856
+ checkGuard(): Promise<{
2857
+ passed: boolean;
2858
+ observations: never[];
2859
+ recovery: never[];
2860
+ }>;
2861
+ executeOperation(client: TransitionExecutionClient$1, operation: PhysicalOperation): Promise<{
2862
+ kind: "completed";
2863
+ }>;
2864
+ writeCompletionJournal(client: TransitionExecutionClient$1, operation: PhysicalOperation, record: TransactionalCompletionRecord): Promise<void>;
2865
+ commit(client: TransitionExecutionClient$1): Promise<void>;
2866
+ rollback(client: TransitionExecutionClient$1): Promise<void>;
2867
+ writeObservedJournal(client: TransitionExecutionClient$1, journal: StepJournal): Promise<void>;
2868
+ isLockTimeout(error: unknown): boolean;
2869
+ };
2870
+
2871
+ type ManualSqlPayload = {
2872
+ readonly statement: UnsafeNativeFragment;
2873
+ readonly blastRadius: readonly ResourceAddress[];
2874
+ readonly preconditions: readonly ExecutableAssertion[];
2875
+ readonly postconditions: readonly ExecutableAssertion[];
2876
+ };
2877
+ type TransitionExecutionClient = {
2878
+ readonly opaqueClient: unknown;
2879
+ };
2880
+ declare function normalizeManualSqlPayload(payload: ManualSqlPayload, context: ObservationContext): ManualSqlPayload;
2881
+ declare function beforeAfterFingerprints(operation: PhysicalOperation, _evidence: readonly EvidenceObservation[], context: ObservationContext): {
2882
+ expectedBefore: FingerprintManifest;
2883
+ expectedAfter: FingerprintManifest;
2884
+ };
2885
+ declare function createManualSqlOperationRuntime(): {
2886
+ artifact: _dbsp_types.SemanticArtifactRef;
2887
+ operationKind: _dbsp_types.OperationKindRef;
2888
+ supportsOperation(operation: PhysicalOperation): boolean;
2889
+ effectsOf(operation: PhysicalOperation, context: ObservationContext): OperationEffectAssessment;
2890
+ buildFingerprints: typeof beforeAfterFingerprints;
2891
+ checkout(target: unknown): Promise<TransitionExecutionClient>;
2892
+ release(client: TransitionExecutionClient, error?: unknown): void;
2893
+ writeIntentJournal(client: TransitionExecutionClient, record: DurableIntentRecord): Promise<void>;
2894
+ begin(client: TransitionExecutionClient): Promise<void>;
2895
+ setLockTimeout(_client: TransitionExecutionClient, _maxWaitMs: number): Promise<void>;
2896
+ acquireLocks(): Promise<void>;
2897
+ observeContext(client: TransitionExecutionClient, _operation: PhysicalOperation, proofContext: ObservationContext): Promise<ObservationContext>;
2898
+ observeOperation(_client: TransitionExecutionClient, operation: PhysicalOperation, context: ObservationContext, phase: "before" | "after"): Promise<{
2899
+ observations: never[];
2900
+ fingerprint: FingerprintManifest;
2901
+ }>;
2902
+ checkGuard(): Promise<{
2903
+ passed: boolean;
2904
+ observations: never[];
2905
+ recovery: never[];
2906
+ }>;
2907
+ executeOperation(client: TransitionExecutionClient, operation: PhysicalOperation, context: ObservationContext): Promise<{
2908
+ kind: "completed";
2909
+ }>;
2910
+ writeCompletionJournal(client: TransitionExecutionClient, operation: PhysicalOperation, record: TransactionalCompletionRecord): Promise<void>;
2911
+ commit(client: TransitionExecutionClient): Promise<void>;
2912
+ rollback(client: TransitionExecutionClient): Promise<void>;
2913
+ writeObservedJournal(client: TransitionExecutionClient, journal: StepJournal): Promise<void>;
2914
+ isLockTimeout(error: unknown): boolean;
2915
+ };
2916
+
2917
+ interface SetNotNullMatch {
2918
+ readonly schema?: string;
2919
+ readonly database?: string;
2920
+ readonly table: string;
2921
+ readonly column: string;
2922
+ readonly expectedColumnShape: SetNotNullColumnShapeExpectation;
2923
+ readonly assumptions?: readonly Assumption[];
2924
+ }
2925
+ interface SetNotNullRuleOptions {
2926
+ readonly naming?: NamingPlugin;
2927
+ }
2928
+ declare function createSetNotNullRule(options?: SetNotNullRuleOptions): TransitionRule<SetNotNullMatch>;
2929
+
2930
+ interface EnumAddValueMatch {
2931
+ readonly schema?: string;
2932
+ readonly database?: string;
2933
+ readonly type: string;
2934
+ readonly label: string;
2935
+ readonly after?: string;
2936
+ readonly expectedBefore: readonly string[];
2937
+ readonly expectedAfter: readonly string[];
2938
+ readonly assumptions?: readonly Assumption[];
2939
+ }
2940
+ interface EnumAddValueRuleOptions {
2941
+ readonly naming?: NamingPlugin;
2942
+ }
2943
+ declare function satisfiesPgEnumLabelVisibleCompositionFact(fact: TransitionCompositionFact, current: ModelIR, _context: ObservationContext): boolean;
2944
+ declare function createEnumAddValueRule(options?: EnumAddValueRuleOptions): TransitionRule<EnumAddValueMatch>;
2945
+
2946
+ interface CreateUniqueIndexConcurrentlyMatch {
2947
+ readonly schema?: string;
2948
+ readonly database?: string;
2949
+ readonly table: string;
2950
+ readonly index: string;
2951
+ readonly columns: readonly string[];
2952
+ readonly assumptions?: readonly Assumption[];
2953
+ }
2954
+
2955
+ type IdentityAdoptionAsserter = Exclude<TrustRoot, {
2956
+ readonly kind: 'pack';
2957
+ }>;
2958
+ interface LogicalIdentityAdoptionMatch {
2959
+ readonly schema?: string;
2960
+ readonly database?: string;
2961
+ readonly table: string;
2962
+ readonly column?: string;
2963
+ readonly logicalId: string;
2964
+ readonly carrierKind: 'postgresql-side-table';
2965
+ readonly authenticated: false;
2966
+ readonly selectionBasis: string;
2967
+ }
2968
+ interface LogicalIdentityAdoptionRuleOptions {
2969
+ readonly naming?: NamingPlugin;
2970
+ readonly asserter?: IdentityAdoptionAsserter;
2971
+ readonly selectionBasis?: string;
2972
+ }
2973
+ declare function createLogicalIdentityAdoptionRule(options?: LogicalIdentityAdoptionRuleOptions): TransitionRule<LogicalIdentityAdoptionMatch>;
2974
+
2975
+ interface AddCheckMatch {
2976
+ readonly schema?: string;
2977
+ readonly database?: string;
2978
+ readonly table: string;
2979
+ readonly constraint: string;
2980
+ readonly expression: string;
2981
+ readonly requiresEnumLabels?: readonly RequiredEnumLabelIR[];
2982
+ readonly assumptions?: readonly Assumption[];
2983
+ }
2984
+
2985
+ interface PgTransitionPackOptions {
2986
+ readonly dbCasing?: DbCasing;
2987
+ readonly naming?: NamingPlugin;
2988
+ readonly identityAdoptionAsserter?: IdentityAdoptionAsserter;
2989
+ readonly identityAdoptionSelectionBasis?: string;
2990
+ }
2991
+ declare function createPgTransitionPack(options?: PgTransitionPackOptions): {
2992
+ rules: (_dbsp_types.TransitionRule<AddCheckMatch> | _dbsp_types.TransitionRule<LogicalIdentityAdoptionMatch> | _dbsp_types.TransitionRule<CreateUniqueIndexConcurrentlyMatch> | _dbsp_types.TransitionRule<EnumAddValueMatch> | _dbsp_types.TransitionRule<SetNotNullMatch>)[];
2993
+ operationSemantics: ({
2994
+ artifact: _dbsp_types.SemanticArtifactRef;
2995
+ supportsOperation(operation: _dbsp_types.PhysicalOperation): boolean;
2996
+ effectsOf(operation: _dbsp_types.PhysicalOperation, context: _dbsp_types.ObservationContext): _dbsp_types.OperationEffectAssessment;
2997
+ buildFingerprints: (operation: _dbsp_types.PhysicalOperation, evidence: readonly _dbsp_types.EvidenceObservation[], context: _dbsp_types.ObservationContext) => {
2998
+ expectedBefore: _dbsp_types.FingerprintManifest;
2999
+ expectedAfter: _dbsp_types.FingerprintManifest;
3000
+ };
3001
+ checkout(target: unknown): Promise<{
3002
+ readonly opaqueClient: unknown;
3003
+ }>;
3004
+ release(client: {
3005
+ readonly opaqueClient: unknown;
3006
+ }, error?: unknown): void;
3007
+ writeIntentJournal(client: {
3008
+ readonly opaqueClient: unknown;
3009
+ }, record: _dbsp_types.DurableIntentRecord): Promise<void>;
3010
+ begin(client: {
3011
+ readonly opaqueClient: unknown;
3012
+ }): Promise<void>;
3013
+ setLockTimeout(client: {
3014
+ readonly opaqueClient: unknown;
3015
+ }, maxWaitMs: number): Promise<void>;
3016
+ acquireLocks(client: {
3017
+ readonly opaqueClient: unknown;
3018
+ }, operation: _dbsp_types.PhysicalOperation, _effects: _dbsp_types.OperationEffectAssessment, context: _dbsp_types.ObservationContext): Promise<void>;
3019
+ observeContext(client: {
3020
+ readonly opaqueClient: unknown;
3021
+ }, operation: _dbsp_types.PhysicalOperation, _proofContext: _dbsp_types.ObservationContext): Promise<_dbsp_types.ObservationContext>;
3022
+ observeOperation(client: {
3023
+ readonly opaqueClient: unknown;
3024
+ }, operation: _dbsp_types.PhysicalOperation, context: _dbsp_types.ObservationContext, _phase: "before" | "after", issuer: _dbsp_types.ObservationIssuer): Promise<{
3025
+ observations: _dbsp_types.IssuedObservation[];
3026
+ fingerprint: _dbsp_types.FingerprintManifest;
3027
+ }>;
3028
+ checkGuard(client: {
3029
+ readonly opaqueClient: unknown;
3030
+ }, operation: _dbsp_types.PhysicalOperation, guard: _dbsp_types.ApplyGuard, context: _dbsp_types.ObservationContext): Promise<{
3031
+ passed: boolean;
3032
+ observations: _dbsp_types.AdvisoryObservation[];
3033
+ recovery: readonly _dbsp_types.RecoveryArtefact[];
3034
+ }>;
3035
+ executeOperation(client: {
3036
+ readonly opaqueClient: unknown;
3037
+ }, operation: _dbsp_types.PhysicalOperation, context: _dbsp_types.ObservationContext, duringGuards?: readonly _dbsp_types.ApplyGuard[]): Promise<{
3038
+ kind: string;
3039
+ }>;
3040
+ writeCompletionJournal(client: {
3041
+ readonly opaqueClient: unknown;
3042
+ }, operation: _dbsp_types.PhysicalOperation, record: _dbsp_types.TransactionalCompletionRecord): Promise<void>;
3043
+ commit(client: {
3044
+ readonly opaqueClient: unknown;
3045
+ }): Promise<void>;
3046
+ rollback(client: {
3047
+ readonly opaqueClient: unknown;
3048
+ }): Promise<void>;
3049
+ writeObservedJournal(client: {
3050
+ readonly opaqueClient: unknown;
3051
+ }, journal: _dbsp_types.StepJournal): Promise<void>;
3052
+ isLockTimeout(error: unknown): boolean;
3053
+ } | {
3054
+ artifact: _dbsp_types.SemanticArtifactRef;
3055
+ operationKind: _dbsp_types.OperationKindRef;
3056
+ supportsOperation(operation: _dbsp_types.PhysicalOperation): boolean;
3057
+ effectsOf(operation: _dbsp_types.PhysicalOperation, context: _dbsp_types.ObservationContext): _dbsp_types.OperationEffectAssessment;
3058
+ buildFingerprints: (operation: _dbsp_types.PhysicalOperation, evidence: readonly _dbsp_types.EvidenceObservation[], context: _dbsp_types.ObservationContext) => {
3059
+ expectedBefore: _dbsp_types.FingerprintManifest;
3060
+ expectedAfter: _dbsp_types.FingerprintManifest;
3061
+ };
3062
+ checkout(target: unknown): Promise<{
3063
+ readonly opaqueClient: unknown;
3064
+ }>;
3065
+ release(client: {
3066
+ readonly opaqueClient: unknown;
3067
+ }, error?: unknown): void;
3068
+ writeIntentJournal(client: {
3069
+ readonly opaqueClient: unknown;
3070
+ }, record: _dbsp_types.DurableIntentRecord): Promise<void>;
3071
+ begin(client: {
3072
+ readonly opaqueClient: unknown;
3073
+ }): Promise<void>;
3074
+ setLockTimeout(client: {
3075
+ readonly opaqueClient: unknown;
3076
+ }, maxWaitMs: number): Promise<void>;
3077
+ acquireLocks(client: {
3078
+ readonly opaqueClient: unknown;
3079
+ }, operation: _dbsp_types.PhysicalOperation): Promise<void>;
3080
+ observeContext(client: {
3081
+ readonly opaqueClient: unknown;
3082
+ }, operation: _dbsp_types.PhysicalOperation, _proofContext: _dbsp_types.ObservationContext): Promise<_dbsp_types.ObservationContext>;
3083
+ observeOperation(client: {
3084
+ readonly opaqueClient: unknown;
3085
+ }, operation: _dbsp_types.PhysicalOperation, context: _dbsp_types.ObservationContext, _phase: "before" | "after", issuer: _dbsp_types.ObservationIssuer): Promise<{
3086
+ observations: _dbsp_types.IssuedObservation[];
3087
+ fingerprint: _dbsp_types.FingerprintManifest;
3088
+ }>;
3089
+ checkGuard(client: {
3090
+ readonly opaqueClient: unknown;
3091
+ }, operation: _dbsp_types.PhysicalOperation, guard: _dbsp_types.ApplyGuard, context: _dbsp_types.ObservationContext): Promise<{
3092
+ passed: boolean;
3093
+ observations: _dbsp_types.EvidenceObservation[];
3094
+ recovery: readonly _dbsp_types.RecoveryArtefact[];
3095
+ }>;
3096
+ executeOperation(client: {
3097
+ readonly opaqueClient: unknown;
3098
+ }, operation: _dbsp_types.PhysicalOperation, context: _dbsp_types.ObservationContext, duringGuards?: readonly _dbsp_types.ApplyGuard[]): Promise<{
3099
+ kind: string;
3100
+ }>;
3101
+ writeCompletionJournal(client: {
3102
+ readonly opaqueClient: unknown;
3103
+ }, operation: _dbsp_types.PhysicalOperation, record: _dbsp_types.TransactionalCompletionRecord): Promise<void>;
3104
+ commit(client: {
3105
+ readonly opaqueClient: unknown;
3106
+ }): Promise<void>;
3107
+ rollback(client: {
3108
+ readonly opaqueClient: unknown;
3109
+ }): Promise<void>;
3110
+ writeObservedJournal(client: {
3111
+ readonly opaqueClient: unknown;
3112
+ }, journal: _dbsp_types.StepJournal): Promise<void>;
3113
+ isLockTimeout(error: unknown): boolean;
3114
+ } | {
3115
+ artifact: _dbsp_types.SemanticArtifactRef;
3116
+ operationKind: _dbsp_types.OperationKindRef;
3117
+ supportsOperation(operation: _dbsp_types.PhysicalOperation): boolean;
3118
+ effectsOf(operation: _dbsp_types.PhysicalOperation, context: _dbsp_types.ObservationContext): _dbsp_types.OperationEffectAssessment;
3119
+ buildFingerprints: (operation: _dbsp_types.PhysicalOperation, evidence: readonly _dbsp_types.EvidenceObservation[], context: _dbsp_types.ObservationContext) => {
3120
+ expectedBefore: _dbsp_types.FingerprintManifest;
3121
+ expectedAfter: _dbsp_types.FingerprintManifest;
3122
+ };
3123
+ checkout(target: unknown): Promise<{
3124
+ readonly opaqueClient: unknown;
3125
+ }>;
3126
+ release(client: {
3127
+ readonly opaqueClient: unknown;
3128
+ }, error?: unknown): void;
3129
+ writeIntentJournal(client: {
3130
+ readonly opaqueClient: unknown;
3131
+ }, record: _dbsp_types.DurableIntentRecord): Promise<void>;
3132
+ begin(_client: {
3133
+ readonly opaqueClient: unknown;
3134
+ }): Promise<never>;
3135
+ setLockTimeout(_client: {
3136
+ readonly opaqueClient: unknown;
3137
+ }, _maxWaitMs: number): Promise<void>;
3138
+ acquireLocks(): Promise<void>;
3139
+ observeContext(client: {
3140
+ readonly opaqueClient: unknown;
3141
+ }, operation: _dbsp_types.PhysicalOperation, _proofContext: _dbsp_types.ObservationContext): Promise<_dbsp_types.ObservationContext>;
3142
+ observeOperation(client: {
3143
+ readonly opaqueClient: unknown;
3144
+ }, operation: _dbsp_types.PhysicalOperation, context: _dbsp_types.ObservationContext, phase: "before" | "after", issuer: _dbsp_types.ObservationIssuer): Promise<{
3145
+ observations: _dbsp_types.IssuedObservation[];
3146
+ fingerprint: _dbsp_types.FingerprintManifest;
3147
+ }>;
3148
+ checkGuard(_client: {
3149
+ readonly opaqueClient: unknown;
3150
+ }, _operation: _dbsp_types.PhysicalOperation, guard: _dbsp_types.ApplyGuard): Promise<never>;
3151
+ executeOperation(client: {
3152
+ readonly opaqueClient: unknown;
3153
+ }, operation: _dbsp_types.PhysicalOperation, context: _dbsp_types.ObservationContext, duringGuards?: readonly _dbsp_types.ApplyGuard[], executionTracker?: _dbsp_core.NonRollbackableExecutionTracker): Promise<{
3154
+ kind: "partially-applied";
3155
+ recovery: _dbsp_types.RecoveryArtefact[];
3156
+ detail: string;
3157
+ } | {
3158
+ kind: string;
3159
+ guard?: never;
3160
+ recovery?: never;
3161
+ nonRollbackableFootprint?: never;
3162
+ } | {
3163
+ kind: string;
3164
+ guard: _dbsp_types.ApplyGuard;
3165
+ recovery: never[];
3166
+ nonRollbackableFootprint: string;
3167
+ }>;
3168
+ writeCompletionJournal(client: {
3169
+ readonly opaqueClient: unknown;
3170
+ }, operation: _dbsp_types.PhysicalOperation, record: _dbsp_types.TransactionalCompletionRecord): Promise<void>;
3171
+ commit(_client: {
3172
+ readonly opaqueClient: unknown;
3173
+ }): Promise<never>;
3174
+ rollback(_client: {
3175
+ readonly opaqueClient: unknown;
3176
+ }): Promise<never>;
3177
+ writeObservedJournal(client: {
3178
+ readonly opaqueClient: unknown;
3179
+ }, journal: _dbsp_types.StepJournal): Promise<void>;
3180
+ isLockTimeout(error: unknown): boolean;
3181
+ })[];
3182
+ issuer: _dbsp_types.ObservationIssuer;
3183
+ executionCoordinator: ExecutionCoordinator;
3184
+ transactionDomain: string;
3185
+ equivalence: _dbsp_types.EquivalenceCapability;
3186
+ capabilityDescriptors: readonly CapabilityDescriptor[];
3187
+ comparatorNameNormalizer: {
3188
+ normalizeCurrentIdentifier: (identifier: string) => string;
3189
+ };
3190
+ compositionFactKinds: string[];
3191
+ satisfiesCompositionFact: typeof satisfiesPgEnumLabelVisibleCompositionFact;
3192
+ };
3193
+
2596
3194
  /**
2597
3195
  * Identifier Validation for adapter-pgsql
2598
3196
  *
@@ -2662,4 +3260,4 @@ declare function sanitizeForDisplay(value: string): string;
2662
3260
  */
2663
3261
  declare function validateSqlExpression(sql: string, context: string): void;
2664
3262
 
2665
- export { type AddedEnumValue, type BatchValuesJoinDecision, 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, DEFAULT_PK_COLUMN, DEFAULT_REDACTION_PATTERNS, type Decision, type DeleteConfig, type DetectedHierarchy, type DiffSummary, type ExplainFormat, type ExplainOptions, type ExplainPlan, ExpressionCanonicalizationUnavailableError, type ExpressionHandler, type FetchDirection, type FetchOptions, type FkColumnDerivation, type GenerateDDLOptions, IdentityNamingPlugin, type IncludeHandler, type IncludeResult, type InsertConfig, type IntrospectedModelIR, type IntrospectionOptions, InvalidIdentifierError, type JoinDecision, type LeafCompileFn, type MigrationRecord, type MigrationSQLOptions, type NamingPlugin, NonConvergentSchemaDiffError, type ParamRefValidationResult, type ParsedMigrationFile, PgsqlAdapter, type PgsqlAdapterOptions, type PgsqlBorrowedClientAdapterOptions, type PgsqlPoolAdapterOptions, PgsqlRawSqlTransactionControlError, PgsqlTransactionAbortedCommitError, PgsqlTransactionAbortedError, PlanCompiler, type PlanDecision, type PrecompiledJoinDecision, type RedactionConfig, type RedactionPattern, type SchemaChange, type SchemaDiff, type SchemaScopeOptions, type SetOperationResult, type SimplifiedPlanReport, type StreamConfig, type UpdateConfig, type UpsertConfig, type WhereDispatcher, type WhereHandler, 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, createAnyExpr, createEqualityExpr, createLeafCompileFn, createParamRef, createPgsqlAdapter, createPgsqlCompileOnlyAdapter, createTypeCastParamRef, defaultFkDerivation, ensureMigrationsTable, 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, parse, parseExplainJson, parseMigrationFile, rawDistance, recordMigration, redactParams, removeMigrationRecord, resolveLogicalName, sanitizeForDisplay, score, validateIdentifier, validateIdentifiers, validateParamRef, validateQualifiedIdentifier, validateSqlExpression, vectorDims, withMigrationLock };
3263
+ 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 PgTransitionPackOptions, PgsqlAdapter, type PgsqlAdapterOptions, type PgsqlBorrowedClientAdapterOptions, type PgsqlPoolAdapterOptions, PgsqlRawSqlTransactionControlError, PgsqlTransactionAbortedCommitError, PgsqlTransactionAbortedError, 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, readPgObservationContext, readTransitionJournal, recordMigration, redactParams, removeMigrationRecord, renderAlterColumnSetNotNullSql, renderAlterTypeAddValueSql, renderAttachLogicalIdentityLockSql, renderCreateDbspMetaSchemaSql, renderCreateIndex, renderCreateLogicalIdentityIndexesSql, renderCreateLogicalIdentitySideTableSql, renderCreateTransitionJournalTableSql, renderCreateTransitionRunTableSql, renderInsertLogicalIdentitySql, renderNoNullsCheckSql, renderSetNotNullLockSql, resolveLogicalName, sanitizeForDisplay, score, validateIdentifier, validateIdentifiers, validateParamRef, validateQualifiedIdentifier, validateSqlExpression, vectorDims, withMigrationLock };