API index and search · Build metadata
Supporting declarations
packages/client/src/resolve.ts. These declarations explain referenced types. Only package-page symbols are package exports.
NamedRow
/** A row named against its level's wire columns. */
export type NamedRow = Record<string, WireValue>;ResolvedChange
/** One resolved change: a `FlatChange` lifted out of positional/indexed wire form into names,
* using the query's `WireSchema` (from `hello`) as the sole position→name source. */
export interface ResolvedChange {
/** Relationship-alias chain from the query root to the changed level (`[]` ⇒ the root rows). */
aliasChain: string[];
/** The alias of the changed level (`""` ⇒ root), i.e. the last of `aliasChain`. */
alias: string;
op: "add" | "remove" | "edit";
/** The affected row, named. For `edit` this is the NEW row; see `old` for the prior one. */
row: NamedRow;
/** The prior row, named (present only for `edit`). */
old?: NamedRow;
/** The PARENT row (named), for a nested/aggregate change — e.g. the `ticket_type` whose `sold`
* count moved. Taken from the path's last `parentRow`; absent for a root-level change. */
parent?: NamedRow;
/** Set when the changed level is a `countAs`/aggregate slot. The value is EXACT — read from the
* slot's projected count column (`WireRel.project.col`). */
aggregate?: {
alias: string;
value: WireValue;
previous?: WireValue;
};
/** The raw node whose children a consumer can dig a named sub-row out of (via {@link subRow}). On
* an `add` the engine always ships it; on a `remove` it is present only when the consumer opted
* into the removed subtree (see the `op` mapping below). */
node?: WireNode;
/** The changed level's `WireSchema` — used by {@link subRow} to resolve a named sub of `node`. */
levelSchema: WireSchema;
}resolveChange
/** Lift one `FlatChange` into a {@link ResolvedChange} against the query's `WireSchema`, or `null`
* if its path doesn't resolve to a materialized level. */
export declare function resolveChange(schema: WireSchema, change: FlatChange): ResolvedChange | null;subRow
/** Read a named sub-row off a change's `node` by relationship alias (e.g. the `guest` under an
* `rsvp`) — the `add` node, or a `remove`'s subtree when the consumer opted into it. The alias →
* wire slot mapping comes from the changed level's `WireSchema`. `null` when no node rode along. */
export declare function subRow(rc: ResolvedChange, alias: string): NamedRow | null;