pqb 0.38.8 → 0.39.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 +6 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4512,8 +4512,10 @@ const maybeUnNameColumn = (column, isSubQuery) => {
|
|
|
4512
4512
|
return isSubQuery && (column == null ? void 0 : column.data.name) ? orchidCore.setColumnData(column, "name", void 0) : column;
|
|
4513
4513
|
};
|
|
4514
4514
|
function _querySelect(q, args) {
|
|
4515
|
+
var _a, _b;
|
|
4515
4516
|
const len = args.length;
|
|
4516
4517
|
if (!len) {
|
|
4518
|
+
(_b = (_a = q.q).select) != null ? _b : _a.select = [];
|
|
4517
4519
|
return q;
|
|
4518
4520
|
}
|
|
4519
4521
|
const as = q.q.as || q.table;
|
|
@@ -4806,7 +4808,9 @@ function queryJson(self, coalesce) {
|
|
|
4806
4808
|
}
|
|
4807
4809
|
|
|
4808
4810
|
const pushSelectSql = (ctx, table, query, quotedAs) => {
|
|
4809
|
-
|
|
4811
|
+
const sql = selectToSql(ctx, table, query, quotedAs);
|
|
4812
|
+
if (sql)
|
|
4813
|
+
ctx.sql.push(sql);
|
|
4810
4814
|
};
|
|
4811
4815
|
const selectToSql = (ctx, table, query, quotedAs, hookSelect = query.hookSelect) => {
|
|
4812
4816
|
var _a, _b;
|
|
@@ -4917,7 +4921,7 @@ const selectToSql = (ctx, table, query, quotedAs, hookSelect = query.hookSelect)
|
|
|
4917
4921
|
list.push(sql);
|
|
4918
4922
|
}
|
|
4919
4923
|
}
|
|
4920
|
-
return list.length ? list.join(", ") : selectAllSql(table, query, quotedAs);
|
|
4924
|
+
return list.length ? list.join(", ") : query.select ? "" : selectAllSql(table, query, quotedAs);
|
|
4921
4925
|
};
|
|
4922
4926
|
function selectedObjectToSQL(ctx, quotedAs, item) {
|
|
4923
4927
|
const sql = item.toSQL(ctx, quotedAs);
|