@dbsp/adapter-pgsql 7.2.0 → 7.3.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/{chunk-WGJ4IBEN.js → chunk-CQSIDXP5.js} +305 -87
- package/dist/chunk-CQSIDXP5.js.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/internal.d.ts +15 -5
- package/dist/internal.js +1 -1
- package/dist/{outcome-protocol-D-nihcUJ.d.ts → outcome-protocol-BhYhYQPC.d.ts} +16 -1
- package/package.json +3 -3
- package/dist/chunk-WGJ4IBEN.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as ChangeKind, G as GeneratedPostconditionSession, S as SqlIdentifier, a as CompilerContext, b as CompilerState, D as Decision, P as ProjectionEnvelope, T as TransitionJournalQueryable, c as PgLockedRun, d as PgOutcomeCheckpointObserver, e as ConvergePgOptions$1, f as PgPhysicalModel, g as PgConvergeResult, h as PgConvergeCheckResult, i as PgLedgerScopeCurrency, r as readTransitionJournal } from './outcome-protocol-
|
|
2
|
-
export { A as AddedEnumValue, j as AutoIncrementTransitionUnsupportedError, k as CanonicalizeCheckConstraintsOptions, l as CheckConstraintCanonicalizationError, m as CheckConstraintCanonicalizationWarning, n as CheckConstraintNewEnumValueError, o as ColumnDefaultCanonicalizationError, p as ColumnDefaultCanonicalizationWarning, q as ComparePgDatabaseSchemaOptions, s as CompareSchemataOptions, t as DEFAULT_PK_COLUMN, u as DetectedHierarchy, v as DiffSummary, E as ExpressionCanonicalizationUnavailableError, w as ExpressionCanonicalizationWarning, x as ExpressionHandler, y as ExpressionKeyedIndexPredicateCanonicalizationUnsupportedError, F as FkColumnDerivation, z as GenerateDDLOptions, B as GeneratedPostcondition, H as GeneratedPostconditionBindingAddress, I as GeneratedPostconditionBindingResolutionError, J as GeneratedPostconditionProofInFlightError, K as GeneratedPostconditionReplanRequiredError, L as GeneratedPostconditionSessionDeactivatedError, M as GeneratedPostconditionWorkInFlightError, N as IncludeHandler, O as IncludeResult, Q as IndexCapabilityContext, R as IndexFeatureUnsupportedError, U as IndexPredicateCanonicalizationError, V as IndexRenderSpec, W as IntrospectedModelIR, X as IntrospectionOptions, Y as MigrationSQLOptions, Z as NonConvergentSchemaDiffError, _ as NonConvergentSchemaDiffSurface, $ as PG_LEDGER_SHAPE_VERSION, a0 as PartialIndexPredicateNewEnumValueError, a1 as PgAdapter, a2 as PgAdapterOptions, a3 as PgAdmittedOperation, a4 as PgAdmittedOperationResult, a5 as PgAdvisoryLockKey, a6 as PgAdvisoryLockOptionsError, a7 as PgAdvisoryLockResult, a8 as PgApplicationStepOwnedState, a9 as PgApplicationStepTx, aa as PgBorrowedClientAdapterOptions, ab as PgCatalogueIdentityQueryable, ac as PgCompileOnlyAdapterOptions, ad as PgConvergeApplicationStep, ae as PgConvergeAssertStep, af as PgConvergeInitializationFailure, ag as PgConvergeOnceStep, ah as PgConvergePlannedStep, ai as PgConvergeRefusal, aj as PgConvergeRefusalChange, ak as PgConvergeRefusalError, al as PgLedgerLockResult, am as PgLedgerStorageUnsupportedError, an as PgLedgerTarget, ao as PgOutcomeCheckpoint, ap as PgOutcomeClaimRequest, aq as PgOutcomeExecutionRequest, ar as PgOutcomeNonTransactionalRequest, as as PgOutcomeReadBackFactory, at as PgOutcomeRecoveryRequest, au as PgOutcomeRecoveryResult, av as PgOutcomeResolution, aw as PgOutcomeResolutionAppendResult, ax as PgOutcomeResult, ay as PgOutcomeTransactionalRequest, az as PgOwnedCheckState, aA as PgPhysicalModelInput, aB as PgPhysicalModelInputError, aC as PgPhysicalNameClaim, aD as PgPhysicalNameCollision, aE as PgPhysicalNameCollisionError, aF as PgPhysicalNamespace, aG as PgPinnedConnectionAbortSignalError, aH as PgPoolAdapterOptions, aI as PgPreparedStatementReplayError, aJ as PgPreparedStatementsOptions, aK as PgRawSqlTransactionControlError, aL as PgReinitializePreflightOptions, aM as PgReinitializePreflightPool, aN as PgRollbackOnlyScope, aO as PgSchemaDiff, aP as PgTransactionAbortSignalError, aQ as PgTransactionAbortedCommitError, aR as PgTransactionAbortedError, aS as PgTransactionOptionsError, aT as PgTransactionTimeoutError, aU as RawIndexPredicateFallbackError, aV as ReferencedKeyKind, aW as ReferencedKeyRemovalConflict, aX as ReferencedKeyRemovalError, aY as SchemaChange, aZ as SchemaDiff, a_ as SchemaScopeOptions, a$ as TransitionRunIdentityMismatchError, b0 as WhereDispatcher, b1 as WhereHandler, b2 as acquirePgLedgerLocks, b3 as appendIntentJournal, b4 as appendTransitionAuthorization, b5 as assertCreateIndexSupported, b6 as assertCreateIndexesSupported, b7 as assertDeclarableChangeKind, b8 as assertGeneratedPostconditionSession, b9 as assertNoRepeatedExpressionSurfaceDrift, ba as canGenerateCreateIndex, bb as canonicalizeCheckConstraints, bc as comparePgDatabaseSchema, bd as compareSchemata, be as createPgAdapter, bf as createPgCompileOnlyAdapter, bg as createPgGeneratedManagedStep, bh as createPgPhysicalModel, bi as createPgTransitionRunPersister, bj as decodeGeneratedPostcondition, bk as decodeGeneratedPostconditionPayload, bl as defaultFkDerivation, bm as ensureDbspMetaLedger, bn as ensurePgLedger, bo as ensurePgLedgerStorageVersion, bp as ensureTransitionJournal, bq as executePgAdmittedOperation, br as generateCreateIndex, bs as generateDDL, bt as generateDownSQL, bu as generateMigrationSQL, bv as generatedPostconditionDigest, bw as generatedPostconditionForChange, bx as introspect, by as readPgCatalogueIdentity, bz as readPgLedgerMarker, bA as readPgLedgerReservationsForExecution, bB as readPgLedgerScopeCurrency, bC as readPgOutcomeRecoveryReadBack, bD as readVerifiedPgLedgerReservationsForPair, bE as recordPgLedgerIdentity, bF as renderCreateDbspMetaSchemaSql, bG as renderCreateIndex, bH as renderCreateLedgerEventTableSql, bI as renderCreateLedgerIdentityTableSql, bJ as renderCreateLedgerImmutabilityFunctionSql, bK as renderCreateLedgerImmutabilityTriggerSql, bL as renderCreateLedgerMarkerTableSql, bM as renderCreateLedgerReservationTableSql, bN as renderCreateLedgerTerminalMemberIndexSql, bO as renderCreateTransitionAuthorizationTableSql, bP as renderCreateTransitionJournalTableSql, bQ as renderCreateTransitionRunPlanTableSql, bR as renderCreateTransitionRunTableSql, bS as runPgReinitializePreflight, bT as toGeneratedPostconditionBindingAddress, bU as validatePgLedgerRuntimeIntegrity, bV as verifyGeneratedCheckPostcondition, bW as verifyGeneratedColumnPostcondition, bX as verifyGeneratedIdentityPostcondition, bY as verifyGeneratedIndexPostcondition, bZ as verifyGeneratedTablePostcondition, b_ as withGeneratedPostconditionSession } from './outcome-protocol-
|
|
1
|
+
import { C as ChangeKind, G as GeneratedPostconditionSession, S as SqlIdentifier, a as CompilerContext, b as CompilerState, D as Decision, P as ProjectionEnvelope, T as TransitionJournalQueryable, c as PgLockedRun, d as PgOutcomeCheckpointObserver, e as ConvergePgOptions$1, f as PgPhysicalModel, g as PgConvergeResult, h as PgConvergeCheckResult, i as PgLedgerScopeCurrency, r as readTransitionJournal } from './outcome-protocol-BhYhYQPC.js';
|
|
2
|
+
export { A as AddedEnumValue, j as AutoIncrementTransitionUnsupportedError, k as CanonicalizeCheckConstraintsOptions, l as CheckConstraintCanonicalizationError, m as CheckConstraintCanonicalizationWarning, n as CheckConstraintNewEnumValueError, o as ColumnDefaultCanonicalizationError, p as ColumnDefaultCanonicalizationWarning, q as ComparePgDatabaseSchemaOptions, s as CompareSchemataOptions, t as DEFAULT_PK_COLUMN, u as DetectedHierarchy, v as DiffSummary, E as ExpressionCanonicalizationUnavailableError, w as ExpressionCanonicalizationWarning, x as ExpressionHandler, y as ExpressionKeyedIndexPredicateCanonicalizationUnsupportedError, F as FkColumnDerivation, z as GenerateDDLOptions, B as GeneratedPostcondition, H as GeneratedPostconditionBindingAddress, I as GeneratedPostconditionBindingResolutionError, J as GeneratedPostconditionProofInFlightError, K as GeneratedPostconditionReplanRequiredError, L as GeneratedPostconditionSessionDeactivatedError, M as GeneratedPostconditionWorkInFlightError, N as IncludeHandler, O as IncludeResult, Q as IndexCapabilityContext, R as IndexFeatureUnsupportedError, U as IndexPredicateCanonicalizationError, V as IndexRenderSpec, W as IntrospectedModelIR, X as IntrospectionOptions, Y as MigrationSQLOptions, Z as NonConvergentSchemaDiffError, _ as NonConvergentSchemaDiffSurface, $ as PG_LEDGER_SHAPE_VERSION, a0 as PartialIndexPredicateNewEnumValueError, a1 as PgAdapter, a2 as PgAdapterOptions, a3 as PgAdmittedOperation, a4 as PgAdmittedOperationResult, a5 as PgAdvisoryLockKey, a6 as PgAdvisoryLockOptionsError, a7 as PgAdvisoryLockResult, a8 as PgApplicationStepOwnedState, a9 as PgApplicationStepTx, aa as PgBorrowedClientAdapterOptions, ab as PgCatalogueIdentityQueryable, ac as PgCompileOnlyAdapterOptions, ad as PgConvergeApplicationStep, ae as PgConvergeAssertStep, af as PgConvergeInitializationFailure, ag as PgConvergeOnceStep, ah as PgConvergePlannedStep, ai as PgConvergeRefusal, aj as PgConvergeRefusalChange, ak as PgConvergeRefusalError, al as PgLedgerLockResult, am as PgLedgerStorageUnsupportedError, an as PgLedgerTarget, ao as PgOutcomeCheckpoint, ap as PgOutcomeClaimRequest, aq as PgOutcomeExecutionRequest, ar as PgOutcomeNonTransactionalRequest, as as PgOutcomeReadBackFactory, at as PgOutcomeRecoveryRequest, au as PgOutcomeRecoveryResult, av as PgOutcomeResolution, aw as PgOutcomeResolutionAppendResult, ax as PgOutcomeResult, ay as PgOutcomeTransactionalRequest, az as PgOwnedCheckState, aA as PgPhysicalModelInput, aB as PgPhysicalModelInputError, aC as PgPhysicalNameClaim, aD as PgPhysicalNameCollision, aE as PgPhysicalNameCollisionError, aF as PgPhysicalNamespace, aG as PgPinnedConnectionAbortSignalError, aH as PgPoolAdapterOptions, aI as PgPreparedStatementReplayError, aJ as PgPreparedStatementsOptions, aK as PgRawSqlTransactionControlError, aL as PgReinitializePreflightOptions, aM as PgReinitializePreflightPool, aN as PgRollbackOnlyScope, aO as PgSchemaDiff, aP as PgTransactionAbortSignalError, aQ as PgTransactionAbortedCommitError, aR as PgTransactionAbortedError, aS as PgTransactionOptionsError, aT as PgTransactionTimeoutError, aU as RawIndexPredicateFallbackError, aV as ReferencedKeyKind, aW as ReferencedKeyRemovalConflict, aX as ReferencedKeyRemovalError, aY as SchemaChange, aZ as SchemaDiff, a_ as SchemaScopeOptions, a$ as TransitionRunIdentityMismatchError, b0 as WhereDispatcher, b1 as WhereHandler, b2 as acquirePgLedgerLocks, b3 as appendIntentJournal, b4 as appendTransitionAuthorization, b5 as assertCreateIndexSupported, b6 as assertCreateIndexesSupported, b7 as assertDeclarableChangeKind, b8 as assertGeneratedPostconditionSession, b9 as assertNoRepeatedExpressionSurfaceDrift, ba as canGenerateCreateIndex, bb as canonicalizeCheckConstraints, bc as comparePgDatabaseSchema, bd as compareSchemata, be as createPgAdapter, bf as createPgCompileOnlyAdapter, bg as createPgGeneratedManagedStep, bh as createPgPhysicalModel, bi as createPgTransitionRunPersister, bj as decodeGeneratedPostcondition, bk as decodeGeneratedPostconditionPayload, bl as defaultFkDerivation, bm as ensureDbspMetaLedger, bn as ensurePgLedger, bo as ensurePgLedgerStorageVersion, bp as ensureTransitionJournal, bq as executePgAdmittedOperation, br as generateCreateIndex, bs as generateDDL, bt as generateDownSQL, bu as generateMigrationSQL, bv as generatedPostconditionDigest, bw as generatedPostconditionForChange, bx as introspect, by as readPgCatalogueIdentity, bz as readPgLedgerMarker, bA as readPgLedgerReservationsForExecution, bB as readPgLedgerScopeCurrency, bC as readPgOutcomeRecoveryReadBack, bD as readVerifiedPgLedgerReservationsForPair, bE as recordPgLedgerIdentity, bF as renderCreateDbspMetaSchemaSql, bG as renderCreateIndex, bH as renderCreateLedgerEventTableSql, bI as renderCreateLedgerIdentityTableSql, bJ as renderCreateLedgerImmutabilityFunctionSql, bK as renderCreateLedgerImmutabilityTriggerSql, bL as renderCreateLedgerMarkerTableSql, bM as renderCreateLedgerReservationTableSql, bN as renderCreateLedgerTerminalMemberIndexSql, bO as renderCreateTransitionAuthorizationTableSql, bP as renderCreateTransitionJournalTableSql, bQ as renderCreateTransitionRunPlanTableSql, bR as renderCreateTransitionRunTableSql, bS as runPgReinitializePreflight, bT as toGeneratedPostconditionBindingAddress, bU as validatePgLedgerRuntimeIntegrity, bV as verifyGeneratedCheckPostcondition, bW as verifyGeneratedColumnPostcondition, bX as verifyGeneratedIdentityPostcondition, bY as verifyGeneratedIndexPostcondition, bZ as verifyGeneratedTablePostcondition, b_ as withGeneratedPostconditionSession } from './outcome-protocol-BhYhYQPC.js';
|
|
3
3
|
import { ExpressionRef, ModelIR } from '@dbsp/core';
|
|
4
4
|
export { normalizeSQL } from '@dbsp/core';
|
|
5
5
|
import * as _dbsp_types from '@dbsp/types';
|
package/dist/index.js
CHANGED
|
@@ -234,7 +234,7 @@ import {
|
|
|
234
234
|
withGeneratedPostconditionSession,
|
|
235
235
|
withPgTransitionRunLock,
|
|
236
236
|
withPgTransitionTransaction
|
|
237
|
-
} from "./chunk-
|
|
237
|
+
} from "./chunk-CQSIDXP5.js";
|
|
238
238
|
|
|
239
239
|
// src/explain/explain.ts
|
|
240
240
|
function buildExplain(query, options = {}) {
|
package/dist/internal.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as _dbsp_types from '@dbsp/types';
|
|
2
2
|
import { TransitionRunMetadata, ProvenPlanShape, TransitionRunJournal, TransitionSessionClient, ModelIR, CompareOutcome, PlanAssessment, ObservationContext, ApplyResult, ApplyPolicy, ColumnListInput, ParamIntent, DialectCapabilities, WhereIntent, ExpressionIntent, NormalizedManagedStep } from '@dbsp/types';
|
|
3
3
|
import { Node } from '@pgsql/types';
|
|
4
|
-
import { an as PgLedgerTarget, T as TransitionJournalQueryable, b$ as PgOrderedLedgerLocks, c0 as PgLedgerShapeAllowance, c1 as PgLedgerPhysicalShapeOutcome, bB as readPgLedgerScopeCurrency, f as PgPhysicalModel, c2 as DeclaredNameResolver, F as FkColumnDerivation, c3 as BindingNameRegistry, c4 as QueryScope, c5 as RelationTargetProjectionRegistry, a as CompilerContext, c as PgLockedRun, d as PgOutcomeCheckpointObserver } from './outcome-protocol-
|
|
5
|
-
export {
|
|
4
|
+
import { an as PgLedgerTarget, T as TransitionJournalQueryable, b$ as PgOrderedLedgerLocks, c0 as PgLedgerShapeAllowance, c1 as PgLedgerPhysicalShapeOutcome, bB as readPgLedgerScopeCurrency, f as PgPhysicalModel, c2 as DeclaredNameResolver, F as FkColumnDerivation, c3 as BindingNameRegistry, c4 as QueryScope, c5 as RelationTargetProjectionRegistry, c6 as NestedSelectCompiler, a as CompilerContext, c as PgLockedRun, d as PgOutcomeCheckpointObserver } from './outcome-protocol-BhYhYQPC.js';
|
|
5
|
+
export { c7 as ComparePgDatabaseSchemaOptions, c8 as ComparePgDeclaredAdoptionSchemaInput, c9 as CompareSchemataOptions, ca as ConvergePgBaseOptions, cb as ConvergePgCheckOptions, e as ConvergePgOptions, cc as GenerateDDLOptions, cd as MigrationSQLOptions, ce as PgAdoptionComparisonExecutor, a9 as PgApplicationStepTx, cf as PgCommitAcknowledgementAmbiguousError, ad as PgConvergeApplicationStep, ae as PgConvergeAssertStep, h as PgConvergeCheckResult, af as PgConvergeInitializationFailure, ag as PgConvergeOnceStep, ah as PgConvergePlannedStep, aj as PgConvergeRefusalChange, ak as PgConvergeRefusalError, g as PgConvergeResult, cg as appendPgLedgerClaim, ch as appendPgLedgerClaimGroup, ci as appendPgLedgerProgress, cj as appendPgLedgerRelease, ck as appendPgLedgerResolution, cl as appendPgLedgerResolutionGroup, cm as appendPgOutcomeResolution, cn as classifyPgLedgerPhysicalShape, co as collectReferencedKeyRemovalConflicts, cp as comparePgDatabaseSchema, cq as comparePgDeclaredAdoptionSchema, cr as compareSchemata, cs as convergePg, ct as createPgDeclaredAdoptionStep, cu as createPgDeclaredSequenceAdoptionStep, cv as createPgLedgerShapeAllowance, cw as executePgDestructiveOutcome, cx as generateDDL, cy as generateDownSQL, cz as generateMigrationSQL, cA as lockPgJournalRun, cB as modelForDeclaredAdoption, cC as openPgOutcomeClaim, cD as openPgOutcomeClaimGroup, cE as pgDeclaredAdoptionDeclaration, cF as pgDeclaredSequenceAdoptionDeclaration, cG as readPgLedgerReservationsForPair, cH as recoverPgAdmittedReaddressPair, cI as recoverPgOutcomeClaim, cJ as resolvePgDestructiveOutcome, cK as resolvePgOutcomeClaimGroup } from './outcome-protocol-BhYhYQPC.js';
|
|
6
6
|
import { TransitionRunAuthorization, JsonAggOrderByEntry, ScopedApprovalSet } from '@dbsp/types/internal';
|
|
7
7
|
import { InProcessProvenPlan, ValidatedManagedStepManifest } from '@dbsp/core/internal';
|
|
8
8
|
import { Pool, PoolClient } from 'pg';
|
|
@@ -266,15 +266,15 @@ interface SimplifiedPlanReport {
|
|
|
266
266
|
}[];
|
|
267
267
|
readonly expressionSubqueries?: readonly {
|
|
268
268
|
readonly expression: ExpressionIntent;
|
|
269
|
-
readonly
|
|
270
|
-
use: 'scalar';
|
|
271
|
-
}>;
|
|
269
|
+
readonly select: _dbsp_types.ResolvedNestedSelect;
|
|
272
270
|
}[];
|
|
273
271
|
readonly rawHaving?: WhereIntent;
|
|
274
272
|
readonly directConditions?: boolean;
|
|
275
273
|
/** Set when the report carries core's execution: FILTER and NQL CASE conditions read the resolved nodes. */
|
|
276
274
|
readonly resolvedExecution?: boolean;
|
|
277
275
|
readonly enclosingRanges?: CompilerContext['enclosingRanges'];
|
|
276
|
+
/** A nested select: the emitted qualifier of each enclosing root range, by its core alias. */
|
|
277
|
+
readonly enclosingQualifiers?: ReadonlyMap<string, string>;
|
|
278
278
|
readonly rootAlias?: string;
|
|
279
279
|
readonly rootTable: string;
|
|
280
280
|
readonly decisions: readonly PlanDecision[];
|
|
@@ -316,6 +316,10 @@ interface CompilerOptions {
|
|
|
316
316
|
readonly bindingNames?: BindingNameRegistry;
|
|
317
317
|
readonly scope?: QueryScope;
|
|
318
318
|
readonly relationTargetProjections?: RelationTargetProjectionRegistry;
|
|
319
|
+
/** Compiles a scalar subquery body that core resolved as a nested select. */
|
|
320
|
+
readonly compileNestedSelect?: NestedSelectCompiler;
|
|
321
|
+
/** The compiler of a query-local-source body: bodies below it keep its route. */
|
|
322
|
+
readonly localSubtree?: boolean;
|
|
319
323
|
}
|
|
320
324
|
declare class PlanCompiler {
|
|
321
325
|
private readonly declaredNames;
|
|
@@ -328,10 +332,14 @@ declare class PlanCompiler {
|
|
|
328
332
|
private readonly bindingNames;
|
|
329
333
|
private readonly scope;
|
|
330
334
|
private readonly relationTargetProjections;
|
|
335
|
+
private readonly nestedSelectCompiler;
|
|
336
|
+
private readonly localSubtree;
|
|
331
337
|
/** Mutable state shared with extracted condition/value compilation functions */
|
|
332
338
|
private state;
|
|
333
339
|
/** Track root table for EXISTS FK correlation */
|
|
334
340
|
private currentRootTable;
|
|
341
|
+
/** The emitted alias of the root range when it differs from its table (a nested body). */
|
|
342
|
+
private currentRootAlias;
|
|
335
343
|
/** Pending JOINs registered by filter/include strategies (flushed in compileSelect) */
|
|
336
344
|
private pendingJoins;
|
|
337
345
|
/** Raw JOIN AST nodes from include handlers (e.g., LATERAL) */
|
|
@@ -418,6 +426,8 @@ declare class PlanCompiler {
|
|
|
418
426
|
/** Build a fresh HandlerCompilerState sharing the current parameter array. */
|
|
419
427
|
private createHandlerState;
|
|
420
428
|
private schemaForRangeVar;
|
|
429
|
+
/** A FROM name bound in this query to a local source (an NQL binding, a CTE or a BatchValues range). */
|
|
430
|
+
private isQueryLocalSource;
|
|
421
431
|
private isNqlBindingRoot;
|
|
422
432
|
/** Classify a FROM target before it reaches the typed AST façade. */
|
|
423
433
|
private tableIdentifier;
|
package/dist/internal.js
CHANGED
|
@@ -2019,6 +2019,16 @@ interface CompilerContext {
|
|
|
2019
2019
|
ast: Node;
|
|
2020
2020
|
parameters: readonly unknown[];
|
|
2021
2021
|
};
|
|
2022
|
+
/**
|
|
2023
|
+
* Compile a scalar subquery body that core resolved as a nested select, with
|
|
2024
|
+
* the root select compiler, inside `parent`. Its parameters are numbered from
|
|
2025
|
+
* $1; the caller renumbers them into its own sequence.
|
|
2026
|
+
*/
|
|
2027
|
+
readonly compileNestedSelect?: NestedSelectCompiler;
|
|
2028
|
+
/** In a nested select: the emitted qualifier of each enclosing root range, by its core alias. */
|
|
2029
|
+
readonly enclosingQualifiers?: ReadonlyMap<string, string>;
|
|
2030
|
+
/** In a nested select whose alias differs from its table: the core alias of its root range. */
|
|
2031
|
+
readonly rootRangeAlias?: string;
|
|
2022
2032
|
/**
|
|
2023
2033
|
* Optional recursive compiler for NQL-origin SELECT expression values nested
|
|
2024
2034
|
* inside handler arguments, such as coalesce(upper(name), :fallback) or
|
|
@@ -2242,6 +2252,11 @@ interface IncludeResult {
|
|
|
2242
2252
|
/** Subquery for LATERAL */
|
|
2243
2253
|
lateral?: Node;
|
|
2244
2254
|
}
|
|
2255
|
+
/** Compiles core's nested select of a scalar subquery body inside its enclosing context. */
|
|
2256
|
+
type NestedSelectCompiler = (select: _dbsp_types.ResolvedNestedSelect, parent: CompilerContext) => {
|
|
2257
|
+
ast: Node;
|
|
2258
|
+
parameters: readonly unknown[];
|
|
2259
|
+
};
|
|
2245
2260
|
|
|
2246
2261
|
/** Compilation position selects the migrated root WHERE, FILTER and recursive-anchor paths; other callers retain their lowering. */
|
|
2247
2262
|
type ConditionPosition = 'where' | 'having' | 'filter' | 'join-on' | 'recursive-anchor' | 'subquery' | 'case-when' | 'update-where' | 'delete-where' | 'upsert-guard';
|
|
@@ -3056,4 +3071,4 @@ declare function executePgAdmittedOperation(session: TransitionJournalQueryable,
|
|
|
3056
3071
|
*/
|
|
3057
3072
|
declare function recoverPgOutcomeClaim(executor: TransitionJournalQueryable, request: PgOutcomeRecoveryRequest): Promise<PgOutcomeRecoveryResult>;
|
|
3058
3073
|
|
|
3059
|
-
export { PG_LEDGER_SHAPE_VERSION as $, type AddedEnumValue as A, type GeneratedPostcondition as B, type ChangeKind as C, type Decision as D, ExpressionCanonicalizationUnavailableError as E, type FkColumnDerivation as F, type GeneratedPostconditionSession as G, type GeneratedPostconditionBindingAddress as H, GeneratedPostconditionBindingResolutionError as I, GeneratedPostconditionProofInFlightError as J, GeneratedPostconditionReplanRequiredError as K, GeneratedPostconditionSessionDeactivatedError as L, GeneratedPostconditionWorkInFlightError as M, type IncludeHandler as N, type IncludeResult as O, type ProjectionEnvelope as P, type IndexCapabilityContext as Q, IndexFeatureUnsupportedError as R, type SqlIdentifier as S, type TransitionJournalQueryable as T, IndexPredicateCanonicalizationError as U, type IndexRenderSpec as V, type IntrospectedModelIR as W, type IntrospectionOptions as X, type MigrationSQLOptions as Y, NonConvergentSchemaDiffError as Z, type NonConvergentSchemaDiffSurface as _, type CompilerContext as a, TransitionRunIdentityMismatchError as a$, PartialIndexPredicateNewEnumValueError as a0, PgAdapter as a1, type PgAdapterOptions as a2, type PgAdmittedOperation as a3, type PgAdmittedOperationResult as a4, type PgAdvisoryLockKey as a5, PgAdvisoryLockOptionsError as a6, type PgAdvisoryLockResult as a7, type PgApplicationStepOwnedState as a8, type PgApplicationStepTx as a9, type PgPhysicalModelInput as aA, PgPhysicalModelInputError as aB, type PgPhysicalNameClaim as aC, type PgPhysicalNameCollision as aD, PgPhysicalNameCollisionError as aE, type PgPhysicalNamespace as aF, PgPinnedConnectionAbortSignalError as aG, type PgPoolAdapterOptions as aH, PgPreparedStatementReplayError as aI, type PgPreparedStatementsOptions as aJ, PgRawSqlTransactionControlError as aK, type PgReinitializePreflightOptions as aL, type PgReinitializePreflightPool as aM, type PgRollbackOnlyScope as aN, type PgSchemaDiff as aO, PgTransactionAbortSignalError as aP, PgTransactionAbortedCommitError as aQ, PgTransactionAbortedError as aR, PgTransactionOptionsError as aS, PgTransactionTimeoutError as aT, RawIndexPredicateFallbackError as aU, type ReferencedKeyKind as aV, type ReferencedKeyRemovalConflict as aW, ReferencedKeyRemovalError as aX, type SchemaChange as aY, type SchemaDiff as aZ, type SchemaScopeOptions as a_, type PgBorrowedClientAdapterOptions as aa, type PgCatalogueIdentityQueryable as ab, type PgCompileOnlyAdapterOptions as ac, type PgConvergeApplicationStep as ad, type PgConvergeAssertStep as ae, type PgConvergeInitializationFailure as af, type PgConvergeOnceStep as ag, type PgConvergePlannedStep as ah, type PgConvergeRefusal as ai, type PgConvergeRefusalChange as aj, PgConvergeRefusalError as ak, type PgLedgerLockResult as al, PgLedgerStorageUnsupportedError as am, type PgLedgerTarget as an, type PgOutcomeCheckpoint as ao, type PgOutcomeClaimRequest as ap, type PgOutcomeExecutionRequest as aq, type PgOutcomeNonTransactionalRequest as ar, type PgOutcomeReadBackFactory as as, type PgOutcomeRecoveryRequest as at, type PgOutcomeRecoveryResult as au, type PgOutcomeResolution as av, type PgOutcomeResolutionAppendResult as aw, type PgOutcomeResult as ax, type PgOutcomeTransactionalRequest as ay, type PgOwnedCheckState as az, type CompilerState as b, type PgOrderedLedgerLocks as b$, type WhereDispatcher as b0, type WhereHandler as b1, acquirePgLedgerLocks as b2, appendIntentJournal as b3, appendTransitionAuthorization as b4, assertCreateIndexSupported as b5, assertCreateIndexesSupported as b6, assertDeclarableChangeKind as b7, assertGeneratedPostconditionSession as b8, assertNoRepeatedExpressionSurfaceDrift as b9, readPgLedgerReservationsForExecution as bA, readPgLedgerScopeCurrency as bB, readPgOutcomeRecoveryReadBack as bC, readVerifiedPgLedgerReservationsForPair as bD, recordPgLedgerIdentity as bE, renderCreateDbspMetaSchemaSql as bF, renderCreateIndex as bG, renderCreateLedgerEventTableSql as bH, renderCreateLedgerIdentityTableSql as bI, renderCreateLedgerImmutabilityFunctionSql as bJ, renderCreateLedgerImmutabilityTriggerSql as bK, renderCreateLedgerMarkerTableSql as bL, renderCreateLedgerReservationTableSql as bM, renderCreateLedgerTerminalMemberIndexSql as bN, renderCreateTransitionAuthorizationTableSql as bO, renderCreateTransitionJournalTableSql as bP, renderCreateTransitionRunPlanTableSql as bQ, renderCreateTransitionRunTableSql as bR, runPgReinitializePreflight as bS, toGeneratedPostconditionBindingAddress as bT, validatePgLedgerRuntimeIntegrity as bU, verifyGeneratedCheckPostcondition as bV, verifyGeneratedColumnPostcondition as bW, verifyGeneratedIdentityPostcondition as bX, verifyGeneratedIndexPostcondition as bY, verifyGeneratedTablePostcondition as bZ, withGeneratedPostconditionSession as b_, canGenerateCreateIndex as ba, canonicalizeCheckConstraints as bb, comparePgDatabaseSchema as bc, compareSchemata as bd, createPgAdapter as be, createPgCompileOnlyAdapter as bf, createPgGeneratedManagedStep as bg, createPgPhysicalModel as bh, createPgTransitionRunPersister as bi, decodeGeneratedPostcondition as bj, decodeGeneratedPostconditionPayload as bk, defaultFkDerivation as bl, ensureDbspMetaLedger as bm, ensurePgLedger as bn, ensurePgLedgerStorageVersion as bo, ensureTransitionJournal as bp, executePgAdmittedOperation as bq, generateCreateIndex as br, generateDDL as bs, generateDownSQL as bt, generateMigrationSQL as bu, generatedPostconditionDigest as bv, generatedPostconditionForChange as bw, introspect as bx, readPgCatalogueIdentity as by, readPgLedgerMarker as bz, type PgLockedRun as c, type PgLedgerShapeAllowance as c0, type PgLedgerPhysicalShapeOutcome as c1, type DeclaredNameResolver as c2, type BindingNameRegistry as c3, type QueryScope as c4, type RelationTargetProjectionRegistry as c5, type ComparePgDatabaseSchemaOptions$1 as
|
|
3074
|
+
export { PG_LEDGER_SHAPE_VERSION as $, type AddedEnumValue as A, type GeneratedPostcondition as B, type ChangeKind as C, type Decision as D, ExpressionCanonicalizationUnavailableError as E, type FkColumnDerivation as F, type GeneratedPostconditionSession as G, type GeneratedPostconditionBindingAddress as H, GeneratedPostconditionBindingResolutionError as I, GeneratedPostconditionProofInFlightError as J, GeneratedPostconditionReplanRequiredError as K, GeneratedPostconditionSessionDeactivatedError as L, GeneratedPostconditionWorkInFlightError as M, type IncludeHandler as N, type IncludeResult as O, type ProjectionEnvelope as P, type IndexCapabilityContext as Q, IndexFeatureUnsupportedError as R, type SqlIdentifier as S, type TransitionJournalQueryable as T, IndexPredicateCanonicalizationError as U, type IndexRenderSpec as V, type IntrospectedModelIR as W, type IntrospectionOptions as X, type MigrationSQLOptions as Y, NonConvergentSchemaDiffError as Z, type NonConvergentSchemaDiffSurface as _, type CompilerContext as a, TransitionRunIdentityMismatchError as a$, PartialIndexPredicateNewEnumValueError as a0, PgAdapter as a1, type PgAdapterOptions as a2, type PgAdmittedOperation as a3, type PgAdmittedOperationResult as a4, type PgAdvisoryLockKey as a5, PgAdvisoryLockOptionsError as a6, type PgAdvisoryLockResult as a7, type PgApplicationStepOwnedState as a8, type PgApplicationStepTx as a9, type PgPhysicalModelInput as aA, PgPhysicalModelInputError as aB, type PgPhysicalNameClaim as aC, type PgPhysicalNameCollision as aD, PgPhysicalNameCollisionError as aE, type PgPhysicalNamespace as aF, PgPinnedConnectionAbortSignalError as aG, type PgPoolAdapterOptions as aH, PgPreparedStatementReplayError as aI, type PgPreparedStatementsOptions as aJ, PgRawSqlTransactionControlError as aK, type PgReinitializePreflightOptions as aL, type PgReinitializePreflightPool as aM, type PgRollbackOnlyScope as aN, type PgSchemaDiff as aO, PgTransactionAbortSignalError as aP, PgTransactionAbortedCommitError as aQ, PgTransactionAbortedError as aR, PgTransactionOptionsError as aS, PgTransactionTimeoutError as aT, RawIndexPredicateFallbackError as aU, type ReferencedKeyKind as aV, type ReferencedKeyRemovalConflict as aW, ReferencedKeyRemovalError as aX, type SchemaChange as aY, type SchemaDiff as aZ, type SchemaScopeOptions as a_, type PgBorrowedClientAdapterOptions as aa, type PgCatalogueIdentityQueryable as ab, type PgCompileOnlyAdapterOptions as ac, type PgConvergeApplicationStep as ad, type PgConvergeAssertStep as ae, type PgConvergeInitializationFailure as af, type PgConvergeOnceStep as ag, type PgConvergePlannedStep as ah, type PgConvergeRefusal as ai, type PgConvergeRefusalChange as aj, PgConvergeRefusalError as ak, type PgLedgerLockResult as al, PgLedgerStorageUnsupportedError as am, type PgLedgerTarget as an, type PgOutcomeCheckpoint as ao, type PgOutcomeClaimRequest as ap, type PgOutcomeExecutionRequest as aq, type PgOutcomeNonTransactionalRequest as ar, type PgOutcomeReadBackFactory as as, type PgOutcomeRecoveryRequest as at, type PgOutcomeRecoveryResult as au, type PgOutcomeResolution as av, type PgOutcomeResolutionAppendResult as aw, type PgOutcomeResult as ax, type PgOutcomeTransactionalRequest as ay, type PgOwnedCheckState as az, type CompilerState as b, type PgOrderedLedgerLocks as b$, type WhereDispatcher as b0, type WhereHandler as b1, acquirePgLedgerLocks as b2, appendIntentJournal as b3, appendTransitionAuthorization as b4, assertCreateIndexSupported as b5, assertCreateIndexesSupported as b6, assertDeclarableChangeKind as b7, assertGeneratedPostconditionSession as b8, assertNoRepeatedExpressionSurfaceDrift as b9, readPgLedgerReservationsForExecution as bA, readPgLedgerScopeCurrency as bB, readPgOutcomeRecoveryReadBack as bC, readVerifiedPgLedgerReservationsForPair as bD, recordPgLedgerIdentity as bE, renderCreateDbspMetaSchemaSql as bF, renderCreateIndex as bG, renderCreateLedgerEventTableSql as bH, renderCreateLedgerIdentityTableSql as bI, renderCreateLedgerImmutabilityFunctionSql as bJ, renderCreateLedgerImmutabilityTriggerSql as bK, renderCreateLedgerMarkerTableSql as bL, renderCreateLedgerReservationTableSql as bM, renderCreateLedgerTerminalMemberIndexSql as bN, renderCreateTransitionAuthorizationTableSql as bO, renderCreateTransitionJournalTableSql as bP, renderCreateTransitionRunPlanTableSql as bQ, renderCreateTransitionRunTableSql as bR, runPgReinitializePreflight as bS, toGeneratedPostconditionBindingAddress as bT, validatePgLedgerRuntimeIntegrity as bU, verifyGeneratedCheckPostcondition as bV, verifyGeneratedColumnPostcondition as bW, verifyGeneratedIdentityPostcondition as bX, verifyGeneratedIndexPostcondition as bY, verifyGeneratedTablePostcondition as bZ, withGeneratedPostconditionSession as b_, canGenerateCreateIndex as ba, canonicalizeCheckConstraints as bb, comparePgDatabaseSchema as bc, compareSchemata as bd, createPgAdapter as be, createPgCompileOnlyAdapter as bf, createPgGeneratedManagedStep as bg, createPgPhysicalModel as bh, createPgTransitionRunPersister as bi, decodeGeneratedPostcondition as bj, decodeGeneratedPostconditionPayload as bk, defaultFkDerivation as bl, ensureDbspMetaLedger as bm, ensurePgLedger as bn, ensurePgLedgerStorageVersion as bo, ensureTransitionJournal as bp, executePgAdmittedOperation as bq, generateCreateIndex as br, generateDDL as bs, generateDownSQL as bt, generateMigrationSQL as bu, generatedPostconditionDigest as bv, generatedPostconditionForChange as bw, introspect as bx, readPgCatalogueIdentity as by, readPgLedgerMarker as bz, type PgLockedRun as c, type PgLedgerShapeAllowance as c0, type PgLedgerPhysicalShapeOutcome as c1, type DeclaredNameResolver as c2, type BindingNameRegistry as c3, type QueryScope as c4, type RelationTargetProjectionRegistry as c5, type NestedSelectCompiler as c6, type ComparePgDatabaseSchemaOptions$1 as c7, type ComparePgDeclaredAdoptionSchemaInput as c8, type CompareSchemataOptions$1 as c9, lockPgJournalRun as cA, modelForDeclaredAdoption as cB, openPgOutcomeClaim as cC, openPgOutcomeClaimGroup as cD, pgDeclaredAdoptionDeclaration as cE, pgDeclaredSequenceAdoptionDeclaration as cF, readPgLedgerReservationsForPair as cG, recoverPgAdmittedReaddressPair as cH, recoverPgOutcomeClaim as cI, resolvePgDestructiveOutcome as cJ, resolvePgOutcomeClaimGroup as cK, type ConvergePgBaseOptions as ca, type ConvergePgCheckOptions as cb, type GenerateDDLOptions$1 as cc, type MigrationSQLOptions$1 as cd, type PgAdoptionComparisonExecutor as ce, PgCommitAcknowledgementAmbiguousError as cf, appendPgLedgerClaim as cg, appendPgLedgerClaimGroup as ch, appendPgLedgerProgress as ci, appendPgLedgerRelease as cj, appendPgLedgerResolution as ck, appendPgLedgerResolutionGroup as cl, appendPgOutcomeResolution as cm, classifyPgLedgerPhysicalShape as cn, collectReferencedKeyRemovalConflicts as co, comparePgDatabaseSchema$1 as cp, comparePgDeclaredAdoptionSchema as cq, compareSchemata$1 as cr, convergePg as cs, createPgDeclaredAdoptionStep as ct, createPgDeclaredSequenceAdoptionStep as cu, createPgLedgerShapeAllowance as cv, executePgDestructiveOutcome as cw, generateDDL$1 as cx, generateDownSQL$1 as cy, generateMigrationSQL$1 as cz, type PgOutcomeCheckpointObserver as d, type ConvergePgOptions as e, type PgPhysicalModel as f, type PgConvergeResult as g, type PgConvergeCheckResult as h, type PgLedgerScopeCurrency as i, AutoIncrementTransitionUnsupportedError as j, type CanonicalizeCheckConstraintsOptions as k, CheckConstraintCanonicalizationError as l, type CheckConstraintCanonicalizationWarning as m, CheckConstraintNewEnumValueError as n, ColumnDefaultCanonicalizationError as o, type ColumnDefaultCanonicalizationWarning as p, type ComparePgDatabaseSchemaOptions as q, readTransitionJournal as r, type CompareSchemataOptions as s, DEFAULT_PK_COLUMN as t, type DetectedHierarchy as u, type DiffSummary as v, type ExpressionCanonicalizationWarning as w, type ExpressionHandler as x, ExpressionKeyedIndexPredicateCanonicalizationUnsupportedError as y, type GenerateDDLOptions as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dbsp/adapter-pgsql",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.3.0",
|
|
4
4
|
"description": "PostgreSQL adapter for db-semantic-planner — compiles query intents to optimized parameterized SQL",
|
|
5
5
|
"author": "Olivier Orabona <oorabona@users.noreply.github.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"dist"
|
|
46
46
|
],
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@dbsp/core": "6.
|
|
49
|
-
"@dbsp/types": "^6.
|
|
48
|
+
"@dbsp/core": "6.3.0",
|
|
49
|
+
"@dbsp/types": "^6.3.0",
|
|
50
50
|
"@pgsql/types": "18.0.0",
|
|
51
51
|
"pg": "^8.21.0"
|
|
52
52
|
},
|