QueryDefinition
A query as data. Two queries with the same definition are the same query.
Import
import { QueryDefinition } from "@hyper-fetch/db"
Source
Package
Preview
type QueryDefinition = {
collection: string;
joins?: { collection: string; field: string; name: string; on?: string; type?: inner }[];
limit?: number;
local: boolean;
one?: { key: RowKey };
orderBy: { direction: SortDirection; field: string }[];
select?: Record<string, string>;
where?: ExpressionNode;
}
Structure
QueryDefinition
| Name | Type | Description |
|---|---|---|
| collection | | |
| joins | | Left joins on another collection's key: each result carries the joined row under
|
| limit | | |
| local | | |
| one | | |
| orderBy | | |
| select | | Output name to row field |
| where | |
