pqb 0.24.0 → 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 +5 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -5
- 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,
|
|
@@ -1985,7 +1985,7 @@ const addColumnToShapeFromSelect = (q, arg, shape, query, result, isSubQuery, ke
|
|
|
1985
1985
|
}
|
|
1986
1986
|
};
|
|
1987
1987
|
const maybeUnNameColumn = (column, isSubQuery) => {
|
|
1988
|
-
return isSubQuery && column.data.name ? orchidCore.setColumnData(column, "name", void 0) : column;
|
|
1988
|
+
return isSubQuery && (column == null ? void 0 : column.data.name) ? orchidCore.setColumnData(column, "name", void 0) : column;
|
|
1989
1989
|
};
|
|
1990
1990
|
function _querySelect(q, args) {
|
|
1991
1991
|
if (!args.length) {
|
|
@@ -10696,7 +10696,7 @@ class Db {
|
|
|
10696
10696
|
}
|
|
10697
10697
|
}
|
|
10698
10698
|
[node_util.inspect.custom]() {
|
|
10699
|
-
return `
|
|
10699
|
+
return `Query<${this.table}>`;
|
|
10700
10700
|
}
|
|
10701
10701
|
/**
|
|
10702
10702
|
* Use `query` to perform raw SQL queries.
|