prisma-generator-accel-record
Advanced tools
Comparing version 1.3.0 to 1.4.0
@@ -141,11 +141,2 @@ "use strict"; | ||
.join(""); | ||
const whereInputs = model.fields | ||
.filter(reject) | ||
.filter((field) => field.relationName == undefined && field.type != "Json") | ||
.map((field) => { | ||
const type = field.typeName; | ||
const filter = getFilterType(type); | ||
return `\n ${field.name}?: ${type} | ${type}[] | ${filter} | null;`; | ||
}) | ||
.join("") + "\n "; | ||
const orderInputs = model.fields | ||
@@ -174,3 +165,3 @@ .filter(reject) | ||
}${associationColumns}; | ||
WhereInput: {${whereInputs}}; | ||
WhereInput: {${whereInputs(model)}}; | ||
OrderInput: {${orderInputs}}; | ||
@@ -260,2 +251,20 @@ }; | ||
.join("\n"); | ||
const whereInputs = (model) => model.fields | ||
.filter((field) => { | ||
var _a, _b; | ||
return field.relationName == undefined || | ||
((_b = (_a = field.relationFromFields) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) > 0; | ||
}) | ||
.filter((field) => field.type != "Json") | ||
.map((field) => { | ||
const type = field.typeName; | ||
const filter = getFilterType(type); | ||
if (field.relationName) { | ||
if (field.name == "posts") | ||
console.log(field); | ||
return `\n ${field.name}?: ${field.type} | ${field.type}[];`; | ||
} | ||
return `\n ${field.name}?: ${type} | ${type}[] | ${filter} | null;`; | ||
}) | ||
.join("") + "\n "; | ||
//# sourceMappingURL=type.js.map |
{ | ||
"name": "prisma-generator-accel-record", | ||
"version": "1.3.0", | ||
"version": "1.4.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/generator.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
37809
526