@dbsp/adapter-pgsql 1.0.2 → 1.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 +42 -3
- package/dist/index.js +7121 -6224
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -167,6 +167,16 @@ interface PlanDecision {
|
|
|
167
167
|
readonly joinRarg?: Node;
|
|
168
168
|
readonly joinOnNode?: Node;
|
|
169
169
|
readonly batchValuesParams?: readonly unknown[];
|
|
170
|
+
/**
|
|
171
|
+
* Provenance: the ORIGINAL QueryIntent before lowering.
|
|
172
|
+
* Carried through every lowering site (convertIn, convertSubquery,
|
|
173
|
+
* normalizeToDecision, dispatchWhere, mapInSubqueryCondition) so that
|
|
174
|
+
* `buildPredicateSubquerySelect` can validate the true caller intent.
|
|
175
|
+
*
|
|
176
|
+
* Required for IN / scalar / inSubquery / notInSubquery decisions.
|
|
177
|
+
* Optional on other decision types.
|
|
178
|
+
*/
|
|
179
|
+
readonly subqueryIntent?: _dbsp_types.QueryIntent;
|
|
170
180
|
}
|
|
171
181
|
/**
|
|
172
182
|
* Any decision of type 'join'.
|
|
@@ -282,15 +292,22 @@ declare class PlanCompiler {
|
|
|
282
292
|
*/
|
|
283
293
|
private dispatchWhere;
|
|
284
294
|
/**
|
|
285
|
-
* Recursively convert a PlanDecision (potentially with nested in+subquery
|
|
286
|
-
*
|
|
295
|
+
* Recursively convert a PlanDecision (potentially with nested in+subquery
|
|
296
|
+
* or a logical group whose children contain in+subquery nodes) into a
|
|
297
|
+
* HandlerDecision suitable for the WHERE dispatcher.
|
|
287
298
|
*
|
|
288
299
|
* When a PlanDecision has operator='in'/'notIn' with a subquery object,
|
|
289
300
|
* mapToHandlerDecision loses the subquery because HandlerDecision has no
|
|
290
301
|
* `subquery` field. This method detects that pattern and converts it to the
|
|
291
302
|
* inSubquery/notInSubquery form that buildScalarSubquery expects.
|
|
292
303
|
*
|
|
293
|
-
*
|
|
304
|
+
* When the node is a logical group (whereAnd / whereOr / whereNot), each
|
|
305
|
+
* child in `conditions` / `condition` is mapped recursively so that nested
|
|
306
|
+
* IN+subquery nodes at any depth are guarded and remapped correctly, rather
|
|
307
|
+
* than falling through to mapToHandlerDecision which would silently drop the
|
|
308
|
+
* subquery and produce a malformed plain-IN binding.
|
|
309
|
+
*
|
|
310
|
+
* Called recursively so 2+ levels of nesting all work.
|
|
294
311
|
*/
|
|
295
312
|
private mapInSubqueryCondition;
|
|
296
313
|
/**
|
|
@@ -487,6 +504,17 @@ interface CompareSchemataOptions {
|
|
|
487
504
|
dbCasing?: DbCasing;
|
|
488
505
|
/** Dialect capabilities — comparisons for unsupported features will be skipped */
|
|
489
506
|
readonly dialectCapabilities?: DialectCapabilities;
|
|
507
|
+
/**
|
|
508
|
+
* When `true`, extensions present in the live DB but absent from the model
|
|
509
|
+
* schema are silently ignored — no `drop_extension` change is emitted for them.
|
|
510
|
+
* Only extensions explicitly declared in the model are managed (created if missing).
|
|
511
|
+
*
|
|
512
|
+
* Use this when the database image pre-installs extensions that the application
|
|
513
|
+
* schema does not own (e.g. pgvector, pg_search bundled in a custom Postgres image).
|
|
514
|
+
* Default: `false` (full-sync behaviour — unmanaged DB extensions produce a
|
|
515
|
+
* `drop_extension` entry).
|
|
516
|
+
*/
|
|
517
|
+
readonly ignoreUnmanagedExtensions?: boolean;
|
|
490
518
|
}
|
|
491
519
|
/**
|
|
492
520
|
* Compare two ModelIRs and produce a structured diff.
|
|
@@ -1122,6 +1150,17 @@ interface Decision {
|
|
|
1122
1150
|
readonly filterWhere?: _pgsql_types.Node;
|
|
1123
1151
|
readonly expressionIntent?: unknown;
|
|
1124
1152
|
readonly escape?: string;
|
|
1153
|
+
/**
|
|
1154
|
+
* Provenance: the ORIGINAL QueryIntent before lowering.
|
|
1155
|
+
* Set by every lowering site (convertIn, convertSubquery, normalizeToDecision,
|
|
1156
|
+
* dispatchWhere, mapInSubqueryCondition) so that `buildPredicateSubquerySelect`
|
|
1157
|
+
* (subquery-emission.ts) can validate the true caller intent rather than the
|
|
1158
|
+
* stripped-down lowered decision fields.
|
|
1159
|
+
*
|
|
1160
|
+
* Required for IN / scalar / inSubquery / notInSubquery decisions.
|
|
1161
|
+
* Optional on other decision types.
|
|
1162
|
+
*/
|
|
1163
|
+
readonly subqueryIntent?: _dbsp_types.QueryIntent;
|
|
1125
1164
|
}
|
|
1126
1165
|
/**
|
|
1127
1166
|
* Handler for WHERE clause conditions.
|