var __defProp = Object.defineProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });

// src/engine/exceptions.ts
var NotImplementedAdapterException = class _NotImplementedAdapterException extends Error {
  static {
    __name(this, "NotImplementedAdapterException");
  }
  constructor(methodName) {
    super(`Method ${methodName} was not implemented in your Adapter, it should be in order to fully work.`);
    this.name = _NotImplementedAdapterException.name;
  }
};

// src/engine/query/ordering.ts
function adapterOrderingQuery(args) {
  let CustomAdapterOrderingQuery = class CustomAdapterOrderingQuery extends AdapterOrderingQuery {
    static {
      __name(this, "CustomAdapterOrderingQuery");
    }
    parseOrdering = args.parseOrdering;
  };
  return CustomAdapterOrderingQuery;
}
__name(adapterOrderingQuery, "adapterOrderingQuery");
var AdapterOrderingQuery = class {
  static {
    __name(this, "AdapterOrderingQuery");
  }
  /**
  * Ordering the query is as simple as passing an array of string, each string contains the name of the field alongside
  * a `-` if it's descending.
  *
  * - `['name']` - Order by name ascending.
  * - `['-name']` - Order by name descending.
  *
  * A simple Sequelize example would be:
  * @example
  * ```ts
  * import { Order } from 'sequelize';
  *
  * function async parseOrdering(ordering): Promise<Order> => {
  *   return ordering.map((order) => {
  *     const isDescending = order.startsWith('-');
  *     return [isDescending ? order.slice(1) : order, isDescending ? 'DESC' : 'ASC'];
  *   });
  * }
  * ```
  *
  * @param _ordering - The ordering to parse.
  *
  * @returns - Returns the parsed ordering to be used on your query.
  */
  // eslint-disable-next-line ts/require-await
  async parseOrdering(_modelInstance, _ordering) {
    throw new NotImplementedAdapterException("parseOrdering");
  }
};
export {
  AdapterOrderingQuery,
  adapterOrderingQuery
};
