pqb 0.71.0 → 0.71.1
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.d.ts +35 -9
- package/dist/index.js +4 -14
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -14
- package/dist/index.mjs.map +1 -1
- package/dist/internal.d.ts +35 -9
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1413,6 +1413,7 @@ const indexInnerToCode = (index, t) => {
|
|
|
1413
1413
|
"name",
|
|
1414
1414
|
"using",
|
|
1415
1415
|
"nullsNotDistinct",
|
|
1416
|
+
"deferrable",
|
|
1416
1417
|
"include",
|
|
1417
1418
|
"with",
|
|
1418
1419
|
"tablespace",
|
|
@@ -1594,6 +1595,7 @@ const columnIndexesToCode = (items) => {
|
|
|
1594
1595
|
options.using && `using: ${singleQuote(options.using)},`,
|
|
1595
1596
|
options.include && `include: ${typeof options.include === "string" ? singleQuote(options.include) : `[${options.include.map(singleQuote).join(", ")}]`},`,
|
|
1596
1597
|
options.nullsNotDistinct && `nullsNotDistinct: true,`,
|
|
1598
|
+
options.deferrable && `deferrable: ${singleQuote(options.deferrable)},`,
|
|
1597
1599
|
options.with && `with: ${singleQuote(options.with)},`,
|
|
1598
1600
|
options.tablespace && `tablespace: ${singleQuote(options.tablespace)},`,
|
|
1599
1601
|
options.where && `where: ${singleQuote(options.where)},`
|
|
@@ -5596,20 +5598,7 @@ const processJoinArgs = (joinTo, first, args, joinSubQuery, shape, whereExists,
|
|
|
5596
5598
|
const args0 = args.length ? args[0] : returnArg;
|
|
5597
5599
|
if (typeof args0 === "function") {
|
|
5598
5600
|
let q = first;
|
|
5599
|
-
if (q.joinQueryAfterCallback)
|
|
5600
|
-
let base = q.baseQuery;
|
|
5601
|
-
if (q.q.as) base = base.as(q.q.as);
|
|
5602
|
-
const { q: query } = q.joinQueryAfterCallback(base, joinTo);
|
|
5603
|
-
if (query.and || query.or || query.scopes) {
|
|
5604
|
-
q = _clone(q);
|
|
5605
|
-
if (query.and) pushQueryArrayImmutable(q, "and", query.and);
|
|
5606
|
-
if (query.or) pushQueryArrayImmutable(q, "or", query.or);
|
|
5607
|
-
if (query.scopes) q.q.scopes = {
|
|
5608
|
-
...q.q.scopes,
|
|
5609
|
-
...query.scopes
|
|
5610
|
-
};
|
|
5611
|
-
}
|
|
5612
|
-
}
|
|
5601
|
+
if (q.joinQueryAfterCallback) q = q.joinQueryAfterCallback(q, joinTo);
|
|
5613
5602
|
const joinedShapes = {
|
|
5614
5603
|
...joinTo.q.joinedShapes,
|
|
5615
5604
|
[joinTo.q.as || joinTo.table]: joinTo.shape
|
|
@@ -10946,6 +10935,7 @@ const processNestedSelectPathEntry = (batches, path, thisKey, thisReturnType, i,
|
|
|
10946
10935
|
key: thisKey
|
|
10947
10936
|
});
|
|
10948
10937
|
else {
|
|
10938
|
+
if (!data) return;
|
|
10949
10939
|
const { key, returnType } = path[++i];
|
|
10950
10940
|
if (!thisReturnType || thisReturnType === "all") for (const row of data) processNestedSelectPathEntry(batches, path, key, returnType, i, last, row);
|
|
10951
10941
|
else processNestedSelectPathEntry(batches, path, key, returnType, i, last, data);
|