prisma-sql 1.48.0 → 1.48.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/generator.js CHANGED
@@ -54,7 +54,7 @@ var require_package = __commonJS({
54
54
  "package.json"(exports$1, module) {
55
55
  module.exports = {
56
56
  name: "prisma-sql",
57
- version: "1.48.0",
57
+ version: "1.48.1",
58
58
  description: "Convert Prisma queries to optimized SQL with type safety. 2-7x faster than Prisma Client.",
59
59
  main: "dist/index.cjs",
60
60
  module: "dist/index.js",
@@ -4905,7 +4905,7 @@ function transformEnumValues(modelName: string, obj: any, currentPath: string[]
4905
4905
  const enumType = modelFields[key]
4906
4906
 
4907
4907
  if (enumType) {
4908
- if (value && typeof value === 'object' && !Array.isArray(value)) {
4908
+ if (value && typeof value === 'object' && !Array.isArray(value) && !(value instanceof Date)) {
4909
4909
  const transformedOperators: any = {}
4910
4910
  for (const [op, opValue] of Object.entries(value)) {
4911
4911
  transformedOperators[op] = transformEnumInValue(opValue, enumType)
@@ -4914,6 +4914,8 @@ function transformEnumValues(modelName: string, obj: any, currentPath: string[]
4914
4914
  } else {
4915
4915
  transformed[key] = transformEnumInValue(value, enumType)
4916
4916
  }
4917
+ } else if (value instanceof Date) {
4918
+ transformed[key] = value
4917
4919
  } else if (typeof value === 'object' && value !== null) {
4918
4920
  transformed[key] = transformEnumValues(modelName, value, newPath)
4919
4921
  } else {