Remote / foldkit-remote-drizzle

sortTerms

function · packages/remote-drizzle/src/cursor.ts:101

function sortTerms(
  sort:
    | {
        readonly by: string
        readonly direction: 'asc' | 'desc'
      }
    | null
    | undefined,
  columns: Readonly<Record<string, AnyColumn>>,
): readonly OrderTerm[]

The order a client asked for, as order terms. sort names one of the orders the server offers, never a column: columns is the server's say in what each name means. A name it does not offer, or no sort at all, is no terms, which a query orders by id.