ComputedConfig.relation
property · packages/remote-drizzle/src/binding.ts:114
readonly relation: RelationThe collection relation whose target rows are counted.
Remote / foldkit-remote-drizzle
interface · packages/remote-drizzle/src/binding.ts:112
interface ComputedConfig<Relation extends string = string> {
readonly relation: Relation
readonly over?: ManyRelation<AnyEntityBinding> | undefined
readonly viewer?:
| {
readonly column: AnyColumn
readonly entity: string
}
| undefined
readonly where?: SQL | undefined
}An aggregate over a collection relation, attached to each owning row.
ComputedConfig.relationproperty · packages/remote-drizzle/src/binding.ts:114
readonly relation: RelationThe collection relation whose target rows are counted.
ComputedConfig.overproperty · packages/remote-drizzle/src/binding.ts:120
readonly over?: ManyRelation<AnyEntityBinding> | undefinedThe rows counted, in place of a relation of the owner: what bind reads
a Derived.count as, the pointing table by its foreign key. relation
then only names it.
ComputedConfig.viewerproperty · packages/remote-drizzle/src/binding.ts:126
readonly viewer?:
| {
readonly column: AnyColumn
readonly entity: string
}
| undefinedWhat makes it a Derived.exists: the column of the counted rows that
points at the reader, and the Entity it points at. The member is then the
id of a counted row whose column holds the source's viewer, or null.
ComputedConfig.whereproperty · packages/remote-drizzle/src/binding.ts:128
readonly where?: SQL | undefinedAn optional filter on the counted rows.