pqb 0.35.4 → 0.35.6
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 +2 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1850,10 +1850,7 @@ const columnWithDotToSql = (ctx, data, shape, column, index, quotedAs, select) =
|
|
|
1850
1850
|
const table = column.slice(0, index);
|
|
1851
1851
|
const key = column.slice(index + 1);
|
|
1852
1852
|
if (key === "*") {
|
|
1853
|
-
|
|
1854
|
-
return select ? `row_to_json("${table}".*)` : `"${table}".r`;
|
|
1855
|
-
}
|
|
1856
|
-
return column;
|
|
1853
|
+
return ((_a = data.joinedShapes) == null ? void 0 : _a[table]) ? select ? `row_to_json("${table}".*)` : `"${table}".*` : column;
|
|
1857
1854
|
}
|
|
1858
1855
|
const tableName = ((_b = data.joinOverrides) == null ? void 0 : _b[table]) || table;
|
|
1859
1856
|
const quoted = `"${table}"`;
|
|
@@ -6331,7 +6328,7 @@ class FnExpression extends orchidCore.Expression {
|
|
|
6331
6328
|
sql.push(
|
|
6332
6329
|
this.args.map((arg) => {
|
|
6333
6330
|
if (typeof arg === "string") {
|
|
6334
|
-
return arg === "*" ? "*" : columnToSql(ctx, this.q, this.q.shape, arg, quotedAs
|
|
6331
|
+
return arg === "*" ? "*" : columnToSql(ctx, this.q, this.q.shape, arg, quotedAs);
|
|
6335
6332
|
} else if (arg instanceof orchidCore.Expression) {
|
|
6336
6333
|
return arg.toSQL(ctx, quotedAs);
|
|
6337
6334
|
} else if ("pairs" in arg) {
|