Model - tables[]
Every method of the tables[] lane. Each step of a tables[] entry returns a table, and the lane's entries are addressed by the identity schema/lanes.ts declares for it.
| Method | Description | Arg | Type | Default | Meaning |
|---|---|---|---|---|---|
column | Column — Header node — declares one column (columns[], never operations[]). The node's own key IS the column key. | type | string | '' | Display type hint for the cell values. |
format | string | '' | Display format hint (e.g. a number format). | ||
value | function | (row) => computed column — derives this cell from the rest of the row. | |||
row | Row — Producer — one literal row. Arg keys are free-form: each one is a CELL, named after the column it fills, and its input is an ordinary expression. | ||||
tableAddRow | Add Row — Transform — append one computed row (a totals line, say) built from the rows already in the stream. | compute | function | (rows) => returning the new row object. | |
tableAnalyze | Analyze — Chain head — a sweep / optimize / monteCarlo run PERSISTED as a live table. Always runs against a fresh detached copy of the model. | mode | string | 'sweep' | Which analysis to run. |
parameters | object | [] | Parameter ranges to explore. | ||
measures | object | [] | Measured outputs to record per run. | ||
objective | string | '' | Measure name to optimize (optimize mode). | ||
goal | string | 'min' | Optimize toward the minimum or maximum. | ||
maxEvaluations | number | 100 | Evaluation budget (optimize mode). | ||
samples | number | 100 | Sample count (monteCarlo mode). | ||
seed | number | 1 | Deterministic sampling seed — the same seed always produces the same rows. | ||
tableFilter | Filter Rows — Transform — keep only the rows the predicate accepts. | keep | function | (row) => true | (row) => truthy to keep the row. |
tableGroup | Group Rows — Transform — collapse rows sharing the by keys into one row per group, aggregating the remaining columns. | by | string[] | [] | Column keys to group on. |
aggregate | object | Per-column aggregation, e.g. { qty: 'sum' }. | |||
tableJoin | Join — Transform — merge columns from another tables[] chain onto matching rows. | source | string | '' | tables[] chain key to join against (quote literals). |
on | object | Key mapping, e.g. { sku: 'code' }. | |||
type | string | 'inner' | Join type. | ||
tableSheets | Sheet Index — Chain head — one row per sheets[] entry, read from the lane's HEADERS only (never a sheet body), so a drawing index may sit on a sheet it lists. | fields | string[] | ['key', 'title'] | Header fields to emit per sheet. |
tableSort | Sort Rows — Transform — order the row set by one column. | by | string | '' | Column key to sort on. |
descending | binary | 0 | 1 = high to low. | ||
tableSource | Scene Source — Chain head — one row per scene entity. entities empty scans the WHOLE scene (a lazy sceneFrame pull); non-empty narrows to an explicit reference. | entities | entity[] | [] | Explicit entity reference to report on. Empty = scan the whole scene. |
type | string[] | [] | Scene-entity types to keep (empty = all). | ||
fields | string[] | [] | Columns to emit per entity (empty = the default field set). | ||
tableUnion | Union — Transform — append another tables[] chain's rows to this one. | source | string | '' | tables[] chain key whose rows are appended (quote literals). |