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.
package/dist/generator.js CHANGED
@@ -2312,7 +2312,7 @@ var require_package = __commonJS({
2312
2312
  "package.json"(exports$1, module) {
2313
2313
  module.exports = {
2314
2314
  name: "prisma-sql",
2315
- version: "1.75.1",
2315
+ version: "1.75.3",
2316
2316
  description: "Convert Prisma queries to optimized SQL with type safety. 2-7x faster than Prisma Client.",
2317
2317
  main: "dist/index.cjs",
2318
2318
  module: "dist/index.js",
@@ -2378,13 +2378,13 @@ var require_package = __commonJS({
2378
2378
  license: "MIT",
2379
2379
  dependencies: {
2380
2380
  "@dee-wan/schema-parser": "1.4.0",
2381
- "@prisma/generator-helper": "^7.4.0",
2382
- "@prisma/internals": "^7.4.0"
2381
+ "@prisma/generator-helper": "^6.19.2",
2382
+ "@prisma/internals": "^6.19.2"
2383
2383
  },
2384
2384
  devDependencies: {
2385
2385
  "@faker-js/faker": "^10.2.0",
2386
- "@prisma/adapter-better-sqlite3": "^7.4.0",
2387
- "@prisma/adapter-pg": "^7.4.0",
2386
+ "@prisma/adapter-better-sqlite3": "^6.19.2",
2387
+ "@prisma/adapter-pg": "^6.19.2",
2388
2388
  "@semantic-release/changelog": "^6.0.3",
2389
2389
  "@semantic-release/git": "^10.0.1",
2390
2390
  "@types/better-sqlite3": "^7.6.13",
@@ -2398,8 +2398,8 @@ var require_package = __commonJS({
2398
2398
  tsx: "^4.21.0",
2399
2399
  typescript: "^5.9.3",
2400
2400
  vitest: "^4.0.18",
2401
- "@prisma/client": "7.4.0",
2402
- prisma: "7.4.0"
2401
+ "@prisma/client": "6.19.2",
2402
+ prisma: "6.19.2"
2403
2403
  },
2404
2404
  engines: {
2405
2405
  node: ">=16.0.0"
@@ -3563,7 +3563,7 @@ var expandToSingleFieldEntries = (item) => {
3563
3563
  if (!isPlainObject(item)) {
3564
3564
  throw new Error("orderBy array entries must be objects");
3565
3565
  }
3566
- const entries = Object.entries(item);
3566
+ const entries = Object.entries(item).filter(([, v]) => v !== void 0);
3567
3567
  if (entries.length === 0) {
3568
3568
  throw new Error("orderBy array entries must have at least one field");
3569
3569
  }
@@ -8071,38 +8071,6 @@ Available fields: ${[...scalarSet].join(", ")}`
8071
8071
  assertScalarField(model, f, "distinct");
8072
8072
  }
8073
8073
  }
8074
- function validateOrderBy(model, orderBy, schemas) {
8075
- if (!isNotNullish(orderBy)) return;
8076
- const expanded = expandOrderByInput(orderBy);
8077
- if (expanded.length === 0) return;
8078
- const scalarSet = getScalarFieldSet(model);
8079
- const relationSet = getRelationFieldSet(model);
8080
- for (const [fieldName, value] of expanded) {
8081
- const f = String(fieldName).trim();
8082
- if (f.length === 0) {
8083
- throw new Error("orderBy field name cannot be empty");
8084
- }
8085
- if (f.length > 255) {
8086
- throw new Error(
8087
- `orderBy field name too long (${f.length} chars, max 255): ${f.slice(0, 50)}...`
8088
- );
8089
- }
8090
- if (scalarSet.has(f)) {
8091
- assertScalarField(model, f, "orderBy");
8092
- continue;
8093
- }
8094
- if (relationSet.has(f)) {
8095
- if (!isPlainObject(value)) {
8096
- throw new Error(`Relation orderBy for '${f}' must be an object`);
8097
- }
8098
- continue;
8099
- }
8100
- throw new Error(
8101
- `orderBy field '${f}' does not exist on model ${model.name}.
8102
- Available fields: ${[...scalarSet].join(", ")}`
8103
- );
8104
- }
8105
- }
8106
8074
  function validateCursor(model, cursor, distinct) {
8107
8075
  if (!isNotNullish(cursor)) return;
8108
8076
  if (!isPlainObject(cursor)) {
@@ -8250,7 +8218,6 @@ function buildSelectSql(input) {
8250
8218
  const argsForSql = normalizeArgsForNegativeTake(method, args);
8251
8219
  const normalizedArgs = normalizeArgsForDialect(dialectToUse, argsForSql);
8252
8220
  validateDistinct(model, normalizedArgs.distinct);
8253
- validateOrderBy(model, normalizedArgs.orderBy);
8254
8221
  validateCursor(model, normalizedArgs.cursor, normalizedArgs.distinct);
8255
8222
  const spec = buildSelectSpec({
8256
8223
  method,