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