pub struct TableSpec {
pub name: Vec<u8>,
pub prefix: Vec<u8>,
pub pk: Vec<u8>,
pub columns: Vec<(Vec<u8>, ValType)>,
pub indexes: Vec<TableIndex>,
pub orderpaths: Vec<OrderPath>,
pub window: Option<WindowSpec>,
pub autodeclare: usize,
pub auto_added: Vec<Vec<u8>>,
}Expand description
One declared table.
Fields§
§name: Vec<u8>Unique catalog name.
prefix: Vec<u8>Key-prefix domain the table’s rows live under.
pk: Vec<u8>Primary-key column (documentation + VERIFY surface; rows are addressed by their key, exactly as today).
columns: Vec<(Vec<u8>, ValType)>Declared columns with their scalar types, declaration order.
indexes: Vec<TableIndex>Declared secondary indexes.
orderpaths: Vec<OrderPath>Declared composite-sort paths.
window: Option<WindowSpec>Optional sliding hot window (WINDOW <col> SPAN <n> BUCKET <n>).
autodeclare: usizeAUTODECLARE <n>: how many paths the engine may declare for
this table from observed refusals (0 = the loop is off, the
default). Building is addition-safe — the worst case is
bounded wasted memory; dropping stays a human act.
auto_added: Vec<Vec<u8>>The paths the auto loop has declared, in declaration order —
its spent budget, and the auto marker IDX.LIST shows.
Runtime provenance, not declaration intent: equality checks
that answer “is this the same declaration?” must ignore it
(see Self::sans_auto).
Implementations§
Source§impl TableSpec
impl TableSpec
Sourcepub fn column_type(&self, col: &[u8]) -> Option<ValType>
pub fn column_type(&self, col: &[u8]) -> Option<ValType>
The declared type of col, if declared.
Sourcepub fn sans_auto(&self) -> TableSpec
pub fn sans_auto(&self) -> TableSpec
This declaration with the auto loop’s runtime additions
removed — what the human actually declared. ENSURE-style
“is this the same declaration?” comparisons go through here,
so paths the engine added never read as drift. Entries are
path names (a whole auto index/orderpath) or path#field (an
auto VALUES column on a human-declared index).