Skip to main content

Module spec

Module spec 

Source
Expand description

Lowering a YAML VistaSpec onto a table: the steps every driver factory shares. Type mapping and driver blocks stay with the driver, passed in as build functions.

Functions§

spec_references
Every join spec declares, as Vista references: each references: entry, then each column-level references: not shadowed by an entry of the same name. The sugar names its relation after the column, which is also its foreign key: bakery: { references: bakery } is a has-one keyed by bakery. source_id is the column a has_many reads from this table’s rows.