Lookup
Lookup =
object
Defined in: packages/schema/src/lookup/lookup.ts:8
The record a lookup field reads and the field it shows (.lookup()). Without from the record is the one this
record’s relation via points at (belongs to); with from it is the one record of from whose relation via points
at this record (has one). With through, filter, prefer or sort too, it is one of the records of from whose
via holds this record’s through, picked by them (picks one). See
Lookups.
Properties
Section titled “Properties”field:
string
Defined in: packages/schema/src/lookup/lookup.ts:14
The field of the linked record it shows.
filter?
Section titled “filter?”
optionalfilter?:string
Defined in: packages/schema/src/lookup/lookup.ts:21
With from: the records of from it picks among, as a list’s filter (AIP-160). {{name}} stands for this record’s
field name, and related() reads another resource as the caller lists it.
optionalfrom?:string
Defined in: packages/schema/src/lookup/lookup.ts:12
The resource holding, for each record, at most one record whose via points at it; omitted for this resource’s own relation.
prefer?
Section titled “prefer?”
optionalprefer?:string[]
Defined in: packages/schema/src/lookup/lookup.ts:23
With from: filters, as filter is written, tried in order: a record that holds an earlier one is picked first.
optionalsort?:string[]
Defined in: packages/schema/src/lookup/lookup.ts:25
With from: the order it picks in after prefer, as a list’s sort ('linked_at asc'); the key of from breaks ties.
store?
Section titled “store?”
optionalstore?:"read"
Defined in: packages/schema/src/lookup/lookup.ts:27
When the value is worked out: read, by every read, the only one there is for now.
through?
Section titled “through?”
optionalthrough?:string
Defined in: packages/schema/src/lookup/lookup.ts:16
With from: this record’s field that via holds; this record’s key when omitted.
via:
string
Defined in: packages/schema/src/lookup/lookup.ts:10
The relation of one column it goes through: this resource’s own, or from’s that points at this resource.