Expand description
Table abstraction and system catalog for LLKV.
This crate provides the Table type, which builds on [llkv-column-map]’s
columnar storage to offer a higher-level, schema-aware interface. It includes:
Table: Schema-aware table abstraction with append, scan, and schema operationsSysCatalog: System catalog (table 0) that stores table and column metadataTableMetaandColMeta: Metadata structures for tables and columns- Schema management: Arrow schema integration with field ID tracking
- Scan operations: Projection, filtering, ordering, and computed columns
- MVCC integration: Automatic handling of
created_byanddeleted_bycolumns
§Architecture
Tables use ColumnStore for physical storage but add:
- Schema validation and enforcement
- Field ID assignment and tracking
- System catalog for metadata persistence
- MVCC column management
- Row ID filtering (for transaction visibility)
§Table IDs
See CATALOG_TABLE_ID and is_reserved_table_id.
§System Catalog
The SysCatalog stores table metadata in table 0, which is a reserved system table.
Re-exports§
pub use catalog::CatalogManager;pub use catalog::CreateTableResult;pub use catalog::FieldResolver;pub use catalog::TableCatalogSnapshot;pub use catalog::SingleColumnIndexDescriptor;pub use catalog::SingleColumnIndexRegistration;pub use constraints::CheckConstraint;pub use constraints::ConstraintColumnInfo;pub use constraints::ConstraintExpressionRef;pub use constraints::ConstraintId;pub use constraints::ConstraintKind;pub use constraints::ConstraintRecord;pub use constraints::ConstraintService;pub use constraints::ConstraintState;pub use constraints::ForeignKeyAction;pub use constraints::ForeignKeyChildRowsFetch;pub use constraints::ForeignKeyColumn;pub use constraints::ForeignKeyConstraint;pub use constraints::ForeignKeyParentRowsFetch;pub use constraints::ForeignKeyRowFetch;pub use constraints::ForeignKeyTableInfo;pub use constraints::InsertColumnConstraint;pub use constraints::InsertMultiColumnUnique;pub use constraints::InsertUniqueColumn;pub use constraints::PrimaryKeyConstraint;pub use constraints::UniqueConstraint;pub use constraints::UniqueKey;pub use constraints::ValidatedForeignKey;pub use constraints::build_composite_unique_key;pub use constraints::column_in_foreign_keys;pub use constraints::column_in_multi_column_unique;pub use constraints::column_in_primary_or_unique;pub use constraints::decode_constraint_row_id;pub use constraints::encode_constraint_row_id;pub use constraints::ensure_multi_column_unique;pub use constraints::ensure_primary_key;pub use constraints::ensure_single_column_unique;pub use constraints::unique_key_component;pub use constraints::validate_alter_table_operation;pub use constraints::validate_check_constraints;pub use constraints::validate_foreign_key_rows;pub use constraints::validate_foreign_keys;pub use ddl::CatalogDdl;pub use metadata::MultiColumnUniqueRegistration;pub use metadata::ForeignKeyDescriptor;pub use metadata::MetadataManager;pub use reserved::CATALOG_TABLE_ID;pub use resolvers::canonical_table_name;pub use resolvers::resolve_table_name;pub use stream::ColumnStream;pub use stream::ColumnStreamBatch;pub use table::Table;pub use types::TableColumn;pub use view::ForeignKeyView;pub use view::TableConstraintSummaryView;pub use view::TableView;
Modules§
- catalog
- Unified catalog module for table and schema management.
- constants
- constraints
- Unified constraint module for constraint management.
- ddl
- Shared catalog DDL trait for contexts that can execute plan-based schema operations.
- expr
- gather
- Re-export gather utilities so existing
llkv_table::gatherimports continue to work while the implementation lives inllkv-column-map. - metadata
- Shared metadata manager that consolidates catalog I/O for tables, columns, and constraints.
- reserved
- Reserved value ranges for system use.
- resolvers
- schema_
ext - Schema extensions for efficient field ID caching.
- stream
- table
- types
- Common types for the table core.
- view
Structs§
- ColMeta
- Metadata about a column.
- Custom
Type Meta - Metadata about a custom type (CREATE TYPE/DOMAIN).
- Multi
Column Unique Entry Meta - Metadata describing a single multi-column UNIQUE index.
- Plan
Annotations - Aggregate annotations that apply to the whole plan.
- Plan
Edge - Edge between two planner nodes.
- Plan
Edge Metadata - Metadata associated with plan edges or inputs.
- Plan
Expression - Expression or projection annotations associated with a node.
- Plan
Field - Column description carried with each node’s output schema.
- Plan
Graph - Immutable DAG describing the planner output.
- Plan
Graph Builder - Builder for
PlanGraphthat enforces DAG invariants while allowing incremental construction. - Plan
Graph Version - Semantic version identifier for the plan graph payload.
- Plan
Input - Incoming connection for a node.
- Plan
Node - Planner node with annotations used to describe how operators compose.
- Plan
Node Id - Unique identifier for a planner node.
- Single
Column Index Entry Meta - Metadata describing a single named single-column index.
- SysCatalog
- Interface to the system catalog (table 0).
- Table
Meta - Metadata about a table.
- Table
Multi Column Unique Meta - Metadata describing all multi-column UNIQUE indexes for a table.
- Table
Single Column Index Meta - Metadata describing all single-column indexes registered for a table.
Enums§
- Plan
Graph Error - Errors raised while constructing or validating a plan graph.
- Plan
Operator - Planner node operator kind.
Constants§
- PLAN_
GRAPH_ VERSION - Current version of the planner IR.
- ROW_
ID_ FIELD_ ID - Reserved field ID for row ID columns.
Type Aliases§
- FieldId
- Unique identifier for a column within a table.
- Plan
Graph Result - RowId
- Unique identifier for a row within a table.
- TableId
- Unique identifier for a table.