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.
package/dist/index.cjs CHANGED
@@ -5794,39 +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
- parseOrderByValue(value, f);
5816
- continue;
5817
- }
5818
- if (relationSet.has(f)) {
5819
- if (!isPlainObject(value)) {
5820
- throw new Error(`Relation orderBy for '${f}' must be an object`);
5821
- }
5822
- continue;
5823
- }
5824
- throw new Error(
5825
- `orderBy field '${f}' does not exist on model ${model.name}.
5826
- Available fields: ${[...scalarSet].join(", ")}`
5827
- );
5828
- }
5829
- }
5830
5797
  function validateCursor(model, cursor, distinct) {
5831
5798
  if (!isNotNullish(cursor)) return;
5832
5799
  if (!isPlainObject(cursor)) {
@@ -5974,7 +5941,6 @@ function buildSelectSql(input) {
5974
5941
  const argsForSql = normalizeArgsForNegativeTake(method, args);
5975
5942
  const normalizedArgs = normalizeArgsForDialect(dialectToUse, argsForSql);
5976
5943
  validateDistinct(model, normalizedArgs.distinct);
5977
- validateOrderBy(model, normalizedArgs.orderBy);
5978
5944
  validateCursor(model, normalizedArgs.cursor, normalizedArgs.distinct);
5979
5945
  const spec = buildSelectSpec({
5980
5946
  method,