interface NormalizedQuery
Since 0.2.0

A repository query with every option resolved to a concrete value — the shape a IDataSource evaluates.

Produced by the database plugin's normalizeQuery() from the caller's FindOptions, so an adapter never has to reason about absent fields.

Properties

readonly
where: Record<string, unknown>

Filter conditions, matched by equality. Empty means no filter.

readonly
optional
filter: FilterExpression

Optional portable expression conjoined with where.

readonly
orderBy: Record<string, OrderDirection>

Field-to-direction sort specification. Empty means no ordering.

readonly
limit: number

Maximum results, or -1 for unlimited.

readonly
offset: number

Number of leading rows to skip.

readonly
optional
cursor: string

A keyset cursor position, or undefined when the query starts at the first page. Carried alongside offset rather than replacing it: an offset says "skip this many from the start" and a cursor says "after this row", and the two are contradictory — a query carrying both is refused by name (§3.10).

readonly
select: readonly string[]

Field projection. Empty means all fields.

Usage

import { type NormalizedQuery } from "common/src/index.ts";