prisma-sql 1.75.0 → 1.75.2

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.0",
2326
+ version: "1.75.2",
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",
@@ -8082,39 +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
- parseOrderByValue(value, f);
8104
- continue;
8105
- }
8106
- if (relationSet.has(f)) {
8107
- if (!isPlainObject(value)) {
8108
- throw new Error(`Relation orderBy for '${f}' must be an object`);
8109
- }
8110
- continue;
8111
- }
8112
- throw new Error(
8113
- `orderBy field '${f}' does not exist on model ${model.name}.
8114
- Available fields: ${[...scalarSet].join(", ")}`
8115
- );
8116
- }
8117
- }
8118
8085
  function validateCursor(model, cursor, distinct) {
8119
8086
  if (!isNotNullish(cursor)) return;
8120
8087
  if (!isPlainObject(cursor)) {
@@ -8262,7 +8229,6 @@ function buildSelectSql(input) {
8262
8229
  const argsForSql = normalizeArgsForNegativeTake(method, args);
8263
8230
  const normalizedArgs = normalizeArgsForDialect(dialectToUse, argsForSql);
8264
8231
  validateDistinct(model, normalizedArgs.distinct);
8265
- validateOrderBy(model, normalizedArgs.orderBy);
8266
8232
  validateCursor(model, normalizedArgs.cursor, normalizedArgs.distinct);
8267
8233
  const spec = buildSelectSpec({
8268
8234
  method,