prisma-sql 1.73.0 → 1.74.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/generator.cjs +4 -4
- package/dist/generator.cjs.map +1 -1
- package/dist/generator.js +4 -4
- package/dist/generator.js.map +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4590,12 +4590,12 @@ function resolveCountSelect(countSelectRaw, model) {
|
|
|
4590
4590
|
return null;
|
|
4591
4591
|
}
|
|
4592
4592
|
function buildIncludeColumns(spec) {
|
|
4593
|
-
var _a3, _b;
|
|
4593
|
+
var _a3, _b, _c, _d, _e;
|
|
4594
4594
|
const { select, includes, dialect, model, schemas, from, params } = spec;
|
|
4595
4595
|
const baseSelect = (select != null ? select : "").trim();
|
|
4596
4596
|
let countCols = "";
|
|
4597
4597
|
let countJoins = [];
|
|
4598
|
-
const countSelectRaw = (_b = (_a3 = spec.args) == null ? void 0 : _a3.select) == null ? void 0 : _b[COUNT_SELECT_KEY];
|
|
4598
|
+
const countSelectRaw = (_e = (_b = (_a3 = spec.args) == null ? void 0 : _a3.select) == null ? void 0 : _b[COUNT_SELECT_KEY]) != null ? _e : (_d = (_c = spec.args) == null ? void 0 : _c.include) == null ? void 0 : _d[COUNT_SELECT_KEY];
|
|
4599
4599
|
if (countSelectRaw) {
|
|
4600
4600
|
const resolvedCountSelect = resolveCountSelect(countSelectRaw, model);
|
|
4601
4601
|
if (resolvedCountSelect && Object.keys(resolvedCountSelect).length > 0) {
|
|
@@ -4730,7 +4730,7 @@ function extractIncludeSpec(args) {
|
|
|
4730
4730
|
const includeSpec = {};
|
|
4731
4731
|
if (args.include && isPlainObject(args.include)) {
|
|
4732
4732
|
for (const [key, value] of Object.entries(args.include)) {
|
|
4733
|
-
if (value !== false) {
|
|
4733
|
+
if (value !== false && key !== COUNT_SELECT_KEY) {
|
|
4734
4734
|
includeSpec[key] = value;
|
|
4735
4735
|
}
|
|
4736
4736
|
}
|