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