Remote / foldkit-remote-server

evaluate

function · packages/entity/src/evaluate.ts:380

function evaluate(
  body: AnyQuery,
  input: Row,
  rows: ReadonlyArray<Row>,
  options?: {
    readonly operators?: MemoryOperators | undefined
    readonly context?: ExprContext | undefined
  },
): ReadonlyArray<Row>

The rows the body matches, in the order it asks for. Pure: it reads the rows it is given and nothing else.

input holds the values this run was given, by the keys the body's placeholders were built with — the same record the query would be called with anywhere else.

The order is part of the answer, so an order over text with no declared collation is refused (Query.placement's reason): declare one on the field, or on the term.