pub struct TableSchema {
pub columns: Vec<ColumnDef>,
pub primary_key: Vec<ColId>,
pub pk_is_rowid_alias: bool,
pub without_rowid: bool,
}Expand description
The discovered shape of a registered table: columns in cid (== [ColId]) order
plus the primary-key column ids. Feeds TableSource::try_new. Clone so the
coordinator can fan one discovered schema out to every worker (it is Send:
ColumnDef is Box<str> + scalars). Public via the crate’s embedded-engine seam
(design 308): a host that drives crate::Engine directly discovers with
discover and registers the result.
Fields§
§columns: Vec<ColumnDef>§primary_key: Vec<ColId>§pk_is_rowid_alias: booltrue when the primary key is a single INTEGER PRIMARY KEY column — a rowid alias.
Such a PK is already unique and point-lookupable via the rowid, so it needs no
separate UNIQUE index (ensure_unique_pk_index skips it, and TableSource recognizes
it). Detected from the declared column type during discover.
without_rowid: boolWhether SQLite stores the table WITHOUT ROWID. Such a table’s INTEGER
primary key is an ordinary primary-key column, never a rowid alias.
Trait Implementations§
Source§impl Clone for TableSchema
impl Clone for TableSchema
Source§fn clone(&self) -> TableSchema
fn clone(&self) -> TableSchema
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more