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