pub enum LogicalStorageNamespace {
UserData = 0,
RowIdShadow = 1,
TxnCreatedBy = 2,
TxnDeletedBy = 3,
Reserved = 65_535,
}Expand description
Category of data a column contains.
The LogicalStorageNamespace enum prevents ID collisions by segregating different types of
columns into distinct namespaces. Each namespace can contain up to 2^16 tables,
and each table can have up to 2^32 fields.
§Usage
Namespaces are embedded in LogicalFieldId to create globally unique column
identifiers. User code typically works with UserData columns, while system
components use the other namespaces for internal bookkeeping.
Variants§
UserData = 0
User-defined table columns.
This is the default namespace for regular table columns. When a table is created
with columns like name TEXT, age INT, those columns use the UserData namespace.
RowIdShadow = 1
Internal shadow column tracking row IDs.
For each user column, the storage engine maintains a corresponding shadow column that stores the row ID for each value. This enables efficient row-level operations and join/filter optimizations.
TxnCreatedBy = 2
MVCC metadata: transaction that created each row.
Stores the transaction ID (TxnId) that inserted each row. Used for snapshot
isolation to determine row visibility.
TxnDeletedBy = 3
MVCC metadata: transaction that deleted each row.
Stores the transaction ID that deleted each row, or TXN_ID_NONE if the row
is not deleted. Used for snapshot isolation and garbage collection.
Reserved = 65_535
Reserved for future system use.
The value 0xFFFF is reserved as a sentinel to allow future expansion without
breaking compatibility.
Trait Implementations§
Source§impl CheckDiscriminantInRange<BitCount<Reserved>> for LogicalStorageNamespace
impl CheckDiscriminantInRange<BitCount<Reserved>> for LogicalStorageNamespace
Source§impl CheckDiscriminantInRange<BitCount<RowIdShadow>> for LogicalStorageNamespace
impl CheckDiscriminantInRange<BitCount<RowIdShadow>> for LogicalStorageNamespace
Source§impl CheckDiscriminantInRange<BitCount<TxnCreatedBy>> for LogicalStorageNamespace
impl CheckDiscriminantInRange<BitCount<TxnCreatedBy>> for LogicalStorageNamespace
Source§impl CheckDiscriminantInRange<BitCount<TxnDeletedBy>> for LogicalStorageNamespace
impl CheckDiscriminantInRange<BitCount<TxnDeletedBy>> for LogicalStorageNamespace
Source§impl CheckDiscriminantInRange<BitCount<UserData>> for LogicalStorageNamespace
impl CheckDiscriminantInRange<BitCount<UserData>> for LogicalStorageNamespace
Source§impl Clone for LogicalStorageNamespace
impl Clone for LogicalStorageNamespace
Source§fn clone(&self) -> LogicalStorageNamespace
fn clone(&self) -> LogicalStorageNamespace
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for LogicalStorageNamespace
impl Debug for LogicalStorageNamespace
Source§impl PartialEq for LogicalStorageNamespace
impl PartialEq for LogicalStorageNamespace
Source§impl Specifier for LogicalStorageNamespace
impl Specifier for LogicalStorageNamespace
Source§type Bytes = <BitCount<16> as SpecifierBytes>::Bytes
type Bytes = <BitCount<16> as SpecifierBytes>::Bytes
InOut type.Source§type InOut = LogicalStorageNamespace
type InOut = LogicalStorageNamespace
Bytes type; for other
types with more logical representations, like an enum or struct, this is
the enum or struct.