prisma-sql 1.75.1 → 1.75.3

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.
@@ -2323,7 +2323,7 @@ var require_package = __commonJS({
2323
2323
  "package.json"(exports$1, module) {
2324
2324
  module.exports = {
2325
2325
  name: "prisma-sql",
2326
- version: "1.75.1",
2326
+ version: "1.75.3",
2327
2327
  description: "Convert Prisma queries to optimized SQL with type safety. 2-7x faster than Prisma Client.",
2328
2328
  main: "dist/index.cjs",
2329
2329
  module: "dist/index.js",
@@ -2389,13 +2389,13 @@ var require_package = __commonJS({
2389
2389
  license: "MIT",
2390
2390
  dependencies: {
2391
2391
  "@dee-wan/schema-parser": "1.4.0",
2392
- "@prisma/generator-helper": "^7.4.0",
2393
- "@prisma/internals": "^7.4.0"
2392
+ "@prisma/generator-helper": "^6.19.2",
2393
+ "@prisma/internals": "^6.19.2"
2394
2394
  },
2395
2395
  devDependencies: {
2396
2396
  "@faker-js/faker": "^10.2.0",
2397
- "@prisma/adapter-better-sqlite3": "^7.4.0",
2398
- "@prisma/adapter-pg": "^7.4.0",
2397
+ "@prisma/adapter-better-sqlite3": "^6.19.2",
2398
+ "@prisma/adapter-pg": "^6.19.2",
2399
2399
  "@semantic-release/changelog": "^6.0.3",
2400
2400
  "@semantic-release/git": "^10.0.1",
2401
2401
  "@types/better-sqlite3": "^7.6.13",
@@ -2409,8 +2409,8 @@ var require_package = __commonJS({
2409
2409
  tsx: "^4.21.0",
2410
2410
  typescript: "^5.9.3",
2411
2411
  vitest: "^4.0.18",
2412
- "@prisma/client": "7.4.0",
2413
- prisma: "7.4.0"
2412
+ "@prisma/client": "6.19.2",
2413
+ prisma: "6.19.2"
2414
2414
  },
2415
2415
  engines: {
2416
2416
  node: ">=16.0.0"
@@ -3574,7 +3574,7 @@ var expandToSingleFieldEntries = (item) => {
3574
3574
  if (!isPlainObject(item)) {
3575
3575
  throw new Error("orderBy array entries must be objects");
3576
3576
  }
3577
- const entries = Object.entries(item);
3577
+ const entries = Object.entries(item).filter(([, v]) => v !== void 0);
3578
3578
  if (entries.length === 0) {
3579
3579
  throw new Error("orderBy array entries must have at least one field");
3580
3580
  }
@@ -8082,38 +8082,6 @@ Available fields: ${[...scalarSet].join(", ")}`
8082
8082
  assertScalarField(model, f, "distinct");
8083
8083
  }
8084
8084
  }
8085
- function validateOrderBy(model, orderBy, schemas) {
8086
- if (!isNotNullish(orderBy)) return;
8087
- const expanded = expandOrderByInput(orderBy);
8088
- if (expanded.length === 0) return;
8089
- const scalarSet = getScalarFieldSet(model);
8090
- const relationSet = getRelationFieldSet(model);
8091
- for (const [fieldName, value] of expanded) {
8092
- const f = String(fieldName).trim();
8093
- if (f.length === 0) {
8094
- throw new Error("orderBy field name cannot be empty");
8095
- }
8096
- if (f.length > 255) {
8097
- throw new Error(
8098
- `orderBy field name too long (${f.length} chars, max 255): ${f.slice(0, 50)}...`
8099
- );
8100
- }
8101
- if (scalarSet.has(f)) {
8102
- assertScalarField(model, f, "orderBy");
8103
- continue;
8104
- }
8105
- if (relationSet.has(f)) {
8106
- if (!isPlainObject(value)) {
8107
- throw new Error(`Relation orderBy for '${f}' must be an object`);
8108
- }
8109
- continue;
8110
- }
8111
- throw new Error(
8112
- `orderBy field '${f}' does not exist on model ${model.name}.
8113
- Available fields: ${[...scalarSet].join(", ")}`
8114
- );
8115
- }
8116
- }
8117
8085
  function validateCursor(model, cursor, distinct) {
8118
8086
  if (!isNotNullish(cursor)) return;
8119
8087
  if (!isPlainObject(cursor)) {
@@ -8261,7 +8229,6 @@ function buildSelectSql(input) {
8261
8229
  const argsForSql = normalizeArgsForNegativeTake(method, args);
8262
8230
  const normalizedArgs = normalizeArgsForDialect(dialectToUse, argsForSql);
8263
8231
  validateDistinct(model, normalizedArgs.distinct);
8264
- validateOrderBy(model, normalizedArgs.orderBy);
8265
8232
  validateCursor(model, normalizedArgs.cursor, normalizedArgs.distinct);
8266
8233
  const spec = buildSelectSpec({
8267
8234
  method,