@dbsp/adapter-pgsql 8.0.0 → 8.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.
|
@@ -17538,8 +17538,13 @@ function createConditionCompiler(createWhereDispatcher2, buildCustomFnFilter3) {
|
|
|
17538
17538
|
exprIntent.value
|
|
17539
17539
|
);
|
|
17540
17540
|
if (nullComparison) return nullComparison;
|
|
17541
|
+
const value = exprIntent.value;
|
|
17542
|
+
if (typeof value === "object" && value !== null) {
|
|
17543
|
+
const rightNode2 = compileExpressionValue(value, ctx, handlerCtx, true);
|
|
17544
|
+
if (rightNode2 !== null) return compileComparison2(leftNode, rightNode2);
|
|
17545
|
+
}
|
|
17541
17546
|
const idx = ++ctx.paramState.paramIndex;
|
|
17542
|
-
ctx.paramState.parameters.push(unwrapParamIntent(
|
|
17547
|
+
ctx.paramState.parameters.push(unwrapParamIntent(value));
|
|
17543
17548
|
const rightNode = createParamRef(idx);
|
|
17544
17549
|
return compileComparison2(leftNode, rightNode);
|
|
17545
17550
|
}
|
|
@@ -17812,37 +17817,38 @@ function createConditionCompiler(createWhereDispatcher2, buildCustomFnFilter3) {
|
|
|
17812
17817
|
if (ctx.directRootWhere && cmpIntent.jsonPath !== void 0) return null;
|
|
17813
17818
|
const v = cmpIntent.value;
|
|
17814
17819
|
if (v === null || typeof v !== "object") return null;
|
|
17820
|
+
const rightNode = compileExpressionValue(v, ctx, handlerCtx);
|
|
17821
|
+
if (rightNode === null) return null;
|
|
17822
|
+
return compileMappedComparison(cmpIntent.operator)(
|
|
17823
|
+
// buildColumnRef handles dotted field names like 'table.col' by splitting them.
|
|
17824
|
+
buildColumnRef(cmpIntent.field, handlerCtx),
|
|
17825
|
+
rightNode
|
|
17826
|
+
);
|
|
17827
|
+
}
|
|
17828
|
+
function compileExpressionValue(v, ctx, handlerCtx, skipParam = false) {
|
|
17815
17829
|
const rec = v;
|
|
17816
17830
|
if (isOuterRef(v)) {
|
|
17817
|
-
return
|
|
17818
|
-
|
|
17819
|
-
|
|
17820
|
-
|
|
17821
|
-
handlerCtx,
|
|
17822
|
-
ctx.paramState
|
|
17823
|
-
)
|
|
17831
|
+
return compileValueOrFieldRef(
|
|
17832
|
+
{ kind: "fieldRef", scope: "outer", column: rec.column },
|
|
17833
|
+
handlerCtx,
|
|
17834
|
+
ctx.paramState
|
|
17824
17835
|
);
|
|
17825
17836
|
}
|
|
17826
17837
|
if (EXPRESSION_BRAND2 in v && v[EXPRESSION_BRAND2] === true) {
|
|
17827
|
-
const compileComparison2 = compileMappedComparison(cmpIntent.operator);
|
|
17828
17838
|
const exprRef = v;
|
|
17829
|
-
|
|
17830
|
-
|
|
17839
|
+
if (skipParam && exprRef.intent.kind === "param") return null;
|
|
17840
|
+
return compileExpressionIntent(
|
|
17831
17841
|
exprRef.intent,
|
|
17832
17842
|
handlerCtx,
|
|
17833
17843
|
ctx.paramState
|
|
17834
17844
|
);
|
|
17835
|
-
return compileComparison2(leftNode, rightNode);
|
|
17836
17845
|
}
|
|
17837
17846
|
if (REF_BRAND in v && v[REF_BRAND] === "ref" && typeof rec.target === "string") {
|
|
17838
|
-
|
|
17839
|
-
const leftNode = buildColumnRef(cmpIntent.field, handlerCtx);
|
|
17840
|
-
const rightNode = compileExpressionIntent(
|
|
17847
|
+
return compileExpressionIntent(
|
|
17841
17848
|
{ kind: "ref", column: rec.target },
|
|
17842
17849
|
handlerCtx,
|
|
17843
17850
|
ctx.paramState
|
|
17844
17851
|
);
|
|
17845
|
-
return compileComparison2(leftNode, rightNode);
|
|
17846
17852
|
}
|
|
17847
17853
|
return null;
|
|
17848
17854
|
}
|
|
@@ -59851,4 +59857,4 @@ export {
|
|
|
59851
59857
|
planPgTransitionRun,
|
|
59852
59858
|
applyPgTransitionRun
|
|
59853
59859
|
};
|
|
59854
|
-
//# sourceMappingURL=chunk-
|
|
59860
|
+
//# sourceMappingURL=chunk-PCACNA4G.js.map
|