pqb 0.24.1 → 0.25.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.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -877,10 +877,10 @@ const processWhere = (ands, ctx, table, query, data, quotedAs) => {
|
|
|
877
877
|
qb.q = getClonedQueryData(query);
|
|
878
878
|
qb.q.and = qb.q.or = void 0;
|
|
879
879
|
qb.q.isSubQuery = true;
|
|
880
|
-
const res =
|
|
880
|
+
const res = resolveSubQueryCallback(qb, data);
|
|
881
881
|
const expr = res instanceof orchidCore.Expression ? res : res.q.expr;
|
|
882
882
|
if (!(res instanceof orchidCore.Expression) && res.q.expr) {
|
|
883
|
-
const q =
|
|
883
|
+
const q = joinSubQuery(table, res);
|
|
884
884
|
q.q.select = [expr];
|
|
885
885
|
ands.push(`(${makeSQL(q, ctx).text})`);
|
|
886
886
|
} else {
|
|
@@ -1454,7 +1454,7 @@ const _joinLateral = (self, type, arg, cb, as) => {
|
|
|
1454
1454
|
const query = arg;
|
|
1455
1455
|
query.q.joinTo = q;
|
|
1456
1456
|
((_c = (_b = query.q).joinedShapes) != null ? _c : _b.joinedShapes = {})[getQueryAs(q)] = q.q.shape;
|
|
1457
|
-
let result =
|
|
1457
|
+
let result = resolveSubQueryCallback(query, cb);
|
|
1458
1458
|
if (relation) {
|
|
1459
1459
|
result = relation.relationConfig.joinQuery(
|
|
1460
1460
|
result,
|