pub struct Join {
pub table: TableName,
pub kind: JoinKind,
pub primary_key: ColumnName,
pub nullable: bool,
pub filters: Option<Vec<Filter>>,
pub order_by: Option<Vec<OrderBy>>,
pub limit: Option<u64>,
pub fields: Vec<Field>,
pub on: Vec<ColumnPair>,
pub indexed: bool,
}Expand description
Folds rows from a related table into the document. The kind
names the relationship — which side carries the key, and whether one row or
many fold in; filters, order_by, and limit narrow and shape the rows
that come back.
Fields§
§table: TableName§kind: JoinKind§primary_key: ColumnName§nullable: boolWhether the folded-in object may be absent. Only meaningful for a to-one
join (belongs_to/has_one); a to-many join is always a non-null array.
A to-one join defaults to nullable unless the schema marks it required.
filters: Option<Vec<Filter>>§order_by: Option<Vec<OrderBy>>§limit: Option<u64>§fields: Vec<Field>§on: Vec<ColumnPair>Extra column equalities on the hop, ANDed with the key. Never set on a
ManyToMany join.
indexed: boolWhether a sink indexes the folded-in rows. false still builds them
into the stored document, but maps the whole subtree as one disabled
object: nothing under it is searchable, filterable or sortable, and it
costs one mapping field.