LogicalStorageNamespace

Enum LogicalStorageNamespace 

Source
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

Source§

type CheckType = BitCount<Reserved>

Source§

impl CheckDiscriminantInRange<BitCount<RowIdShadow>> for LogicalStorageNamespace

Source§

type CheckType = BitCount<RowIdShadow>

Source§

impl CheckDiscriminantInRange<BitCount<TxnCreatedBy>> for LogicalStorageNamespace

Source§

type CheckType = BitCount<TxnCreatedBy>

Source§

impl CheckDiscriminantInRange<BitCount<TxnDeletedBy>> for LogicalStorageNamespace

Source§

type CheckType = BitCount<TxnDeletedBy>

Source§

impl CheckDiscriminantInRange<BitCount<UserData>> for LogicalStorageNamespace

Source§

type CheckType = BitCount<UserData>

Source§

impl Clone for LogicalStorageNamespace

Source§

fn clone(&self) -> LogicalStorageNamespace

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for LogicalStorageNamespace

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for LogicalStorageNamespace

Source§

fn eq(&self, other: &LogicalStorageNamespace) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Specifier for LogicalStorageNamespace

Source§

const BITS: usize = 16usize

The number of bits used by the Specifier.
Source§

type Bytes = <BitCount<16> as SpecifierBytes>::Bytes

The storage type. This is typically the smallest integer primitive that can store all possible values of the InOut type.
Source§

type InOut = LogicalStorageNamespace

The interface type. This type is used by getters and setters. For integers, this is the same as the Bytes type; for other types with more logical representations, like an enum or struct, this is the enum or struct.
Source§

fn into_bytes( input: <Self as Specifier>::InOut, ) -> Result<<Self as Specifier>::Bytes, OutOfBounds>

Converts an interface type into its storage type. Read more
Source§

fn from_bytes( bytes: <Self as Specifier>::Bytes, ) -> Result<<Self as Specifier>::InOut, InvalidBitPattern<<Self as Specifier>::Bytes>>

Converts a storage type into its interface type. Read more
Source§

impl Copy for LogicalStorageNamespace

Source§

impl Eq for LogicalStorageNamespace

Source§

impl StructuralPartialEq for LogicalStorageNamespace

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,