prisma-sql 1.75.1 → 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.
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.2",
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",
@@ -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,