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/index.cjs CHANGED
@@ -5794,38 +5794,6 @@ Available fields: ${[...scalarSet].join(", ")}`
5794
5794
  assertScalarField(model, f, "distinct");
5795
5795
  }
5796
5796
  }
5797
- function validateOrderBy(model, orderBy, schemas) {
5798
- if (!isNotNullish(orderBy)) return;
5799
- const expanded = expandOrderByInput(orderBy);
5800
- if (expanded.length === 0) return;
5801
- const scalarSet = getScalarFieldSet(model);
5802
- const relationSet = getRelationFieldSet(model);
5803
- for (const [fieldName, value] of expanded) {
5804
- const f = String(fieldName).trim();
5805
- if (f.length === 0) {
5806
- throw new Error("orderBy field name cannot be empty");
5807
- }
5808
- if (f.length > 255) {
5809
- throw new Error(
5810
- `orderBy field name too long (${f.length} chars, max 255): ${f.slice(0, 50)}...`
5811
- );
5812
- }
5813
- if (scalarSet.has(f)) {
5814
- assertScalarField(model, f, "orderBy");
5815
- continue;
5816
- }
5817
- if (relationSet.has(f)) {
5818
- if (!isPlainObject(value)) {
5819
- throw new Error(`Relation orderBy for '${f}' must be an object`);
5820
- }
5821
- continue;
5822
- }
5823
- throw new Error(
5824
- `orderBy field '${f}' does not exist on model ${model.name}.
5825
- Available fields: ${[...scalarSet].join(", ")}`
5826
- );
5827
- }
5828
- }
5829
5797
  function validateCursor(model, cursor, distinct) {
5830
5798
  if (!isNotNullish(cursor)) return;
5831
5799
  if (!isPlainObject(cursor)) {
@@ -5973,7 +5941,6 @@ function buildSelectSql(input) {
5973
5941
  const argsForSql = normalizeArgsForNegativeTake(method, args);
5974
5942
  const normalizedArgs = normalizeArgsForDialect(dialectToUse, argsForSql);
5975
5943
  validateDistinct(model, normalizedArgs.distinct);
5976
- validateOrderBy(model, normalizedArgs.orderBy);
5977
5944
  validateCursor(model, normalizedArgs.cursor, normalizedArgs.distinct);
5978
5945
  const spec = buildSelectSpec({
5979
5946
  method,