aiondb-storage-api

Trait surface every storage backend has to implement, plus the descriptor types the engine hands to it. Splits the boundary into capability declaration, DDL, DML, scans, and transaction participation. The crate has no runtime; it is the contract that aiondb-storage-engine (and any alternate backend) plugs into.

cargo

[dependencies]
aiondb-storage-api = { path = "../aiondb-storage-api" }

modules

modulepurpose
capabilitiesStorageCapabilities trait declaring which optional features a backend supports.
ddlStorageDDL trait for create/alter/drop of tables and indexes.
dmlStorageDML trait for scans, fetches, inserts, updates, deletes, vector and GIN search.
scanTupleStream trait and helper iterators returned by scans.
txnStorageTxnParticipant trait so the storage layer can join 2PC, snapshot, savepoint, and checkpoint flows.
descriptorsstorage-side projection of catalog descriptors plus key-range types.

key types

typerole
StorageCapabilitiestrait of supports_* predicates (vector search, GIN, savepoints, durability, persistent ordered indexes, vacuum, statistics logging, adjacency lookup).
StorageDDLtrait with create_table_storage, create_index_storage, alter_table_storage, drop_table_storage, drop_index_storage.
StorageDMLtrait covering scans, fetches, mutations, vector and GIN search, vacuum, analyze logging.
StorageTxnParticipanttrait with begin/commit/rollback, snapshot, savepoint, and checkpoint hooks; exposes CheckpointInfo.
TableStorageDescriptor, StorageColumn, StorageShardConfig, ShardHashFunctionstorage-side table shape.
IndexStorageDescriptor, IndexKeyColumn, HnswStorageOptions, StoredVectorMetric, StoredQuantizationKindstorage-side index shape.
TupleRecordrow payload returned by scans / fetches.
KeyRange, Bound<T>half-open key bounds for index range scans.
TupleStream, VecTupleStream, OnceTupleStreamscan iterator trait and two ready-made adapters.
CheckpointInforesult of a checkpoint flush (LSN + bytes).

example

use aiondb_core::{ColumnId, DataType, RelationId};
use aiondb_storage_api::{StorageColumn, TableStorageDescriptor};

let descriptor = TableStorageDescriptor {
    table_id: RelationId::new(1),
    columns: vec![StorageColumn {
        column_id: ColumnId::new(1),
        data_type: DataType::Int,
        nullable: false,
    }],
    primary_key: Some(vec![ColumnId::new(1)]),
    shard_config: None,
};

assert_eq!(descriptor.columns.len(), 1);