Skip to main content

Crate nodedb_types

Crate nodedb_types 

Source
Expand description

Shared NodeDB type definitions: strong IDs (TenantId, VShardId, RequestId, Lsn, Surrogate), error types (NodeDbError + ErrorCode + ErrorDetails), wire types for cross-plane and cross-node messages, value types, configuration schemas, and the approximate-aggregate sketches.

Every NodeDB workspace crate depends on this. Items here form the stable cross-crate vocabulary; types specific to one engine live in that engine’s crate.

Re-exports§

pub use approx::CountMinSketch;
pub use approx::HyperLogLog;
pub use approx::SpaceSaving;
pub use approx::TDigest;
pub use array_cell::ArrayCell;
pub use audit_dml::AuditDmlMode;
pub use bbox::BoundingBox;
pub use bbox::geometry_bbox;
pub use clone::CloneOrigin;
pub use clone::CloneStatus;
pub use clone::MAX_CLONE_DEPTH;
pub use collection::CollectionType;
pub use collection::CollectionTypeParseError;
pub use collection_config::PayloadAtom;
pub use collection_config::PayloadIndexKind;
pub use collection_config::PrimaryEngine;
pub use collection_config::VectorPrimaryConfig;
pub use columnar::ColumnDef;
pub use columnar::ColumnType;
pub use columnar::ColumnarProfile;
pub use columnar::ColumnarSchema;
pub use columnar::DocumentMode;
pub use columnar::SchemaError;
pub use columnar::StrictSchema;
pub use config::TuningConfig;
pub use datetime::NdbDateTime;
pub use datetime::NdbDateTimeError;
pub use datetime::NdbDuration;
pub use document::Document;
pub use dropped_collection::DroppedCollection;
pub use error::NodeDbError;
pub use filter::EdgeFilter;
pub use filter::MetadataFilter;
pub use graph::Direction;
pub use hlc::Hlc;
pub use hlc::HlcClock;
pub use hnsw::HnswCheckpoint;
pub use hnsw::HnswNodeSnapshot;
pub use hnsw::HnswParams;
pub use id::CollectionId;
pub use id::DatabaseId;
pub use id::DocumentId;
pub use id::EdgeId;
pub use id::EdgeIdParseError;
pub use id::IdError;
pub use id::IdType;
pub use id::NodeId;
pub use id::ShapeId;
pub use id::TenantId;
pub use json_msgpack::JsonValue;
pub use json_msgpack::json_from_msgpack;
pub use json_msgpack::json_to_msgpack;
pub use json_msgpack::json_to_msgpack_or_empty;
pub use json_msgpack::msgpack_to_json_string;
pub use json_msgpack::value_from_msgpack;
pub use json_msgpack::value_to_msgpack;
pub use kv::KV_DEFAULT_INLINE_THRESHOLD;
pub use kv::KvConfig;
pub use kv::KvTtlPolicy;
pub use kv::is_valid_kv_key_type;
pub use lsn::Lsn;
pub use mirror::MirrorLagRecord;
pub use mirror::MirrorMode;
pub use mirror::MirrorOrigin;
pub use mirror::MirrorStatus;
pub use multi_vector::MultiVector;
pub use multi_vector::MultiVectorError;
pub use multi_vector::MultiVectorScoreMode;
pub use namespace::Namespace;
pub use quota::PriorityClass;
pub use quota::PriorityClassParseError;
pub use quota::QuotaRecord;
pub use quota::QuotaSpec;
pub use quota::QuotaValidationError;
pub use result::QueryResult;
pub use result::SearchResult;
pub use result::SubGraph;
pub use sparse_vector::SparseVector;
pub use sparse_vector::SparseVectorError;
pub use surrogate::Surrogate;
pub use surrogate_bitmap::SurrogateBitmap;
pub use sync::compensation::CompensationHint;
pub use sync::shape::ShapeDefinition;
pub use sync::shape::ShapeType;
pub use sync::violation::ViolationType;
pub use sync::wire::SyncFrame;
pub use sync::wire::SyncMessageType;
pub use temporal::BitemporalFilter;
pub use temporal::BitemporalInterval;
pub use temporal::LsnMapError;
pub use temporal::LsnMsAnchor;
pub use temporal::LsnMsMap;
pub use temporal::NANOS_PER_MS;
pub use temporal::OPEN_UPPER;
pub use temporal::OrdinalClock;
pub use temporal::ValidTimePredicate;
pub use temporal::lsn_to_ms;
pub use temporal::ms_to_ordinal_upper;
pub use temporal::ordinal_to_ms;
pub use text_search::Bm25Params;
pub use text_search::QueryMode;
pub use text_search::TextSearchParams;
pub use trace::SpanId;
pub use trace::TraceId;
pub use typeguard::TypeGuardFieldDef;
pub use value::Value;
pub use vector_ann::VectorAnnOptions;
pub use vector_ann::VectorQuantization;
pub use vector_index_stats::VectorIndexQuantization;
pub use vector_index_stats::VectorIndexStats;
pub use vector_index_stats::VectorIndexType;
pub use vector_model::VectorModelEntry;
pub use vector_model::VectorModelMetadata;

Modules§

approx
array_cell
Typed payload for Value::ArrayCell.
audit_dml
AuditDmlMode — per-database DML audit level.
backup_envelope
bbox
Axis-aligned bounding box for 2D geometries (WGS-84).
clone
Clone catalog types shared between the catalog layer and the control plane.
collection
Collection type enum shared between Origin and Lite.
collection_config
Vector-primary collection configuration types.
columnar
config
conversion
Conversions between serde_json::Value and nodedb_types::Value.
datetime
First-class DateTime and Duration types.
document
Document type: the universal data container for CRDT-backed records.
dropped_collection
DroppedCollection — row shape for _system.dropped_collections.
error
Standardized error types for the NodeDB public API.
filter
Query filter types for vector search and graph traversal.
geometry
GeoJSON-compatible geometry types.
graph
Shared graph types used by both Origin and Lite CSR engines.
hlc
Hybrid Logical Clock.
hnsw
Shared HNSW types used by both Origin and Lite vector engines.
id
id_gen
First-class ID type generation and validation.
json_msgpack
kv
KV engine configuration types.
kv_parsing
Shared KV DDL parsing helpers used by both Origin (pgwire) and Lite.
lsn
Log Sequence Number — monotonically increasing identifier for WAL records.
mirror
Mirror catalog types shared between the catalog layer and the control plane.
multi_vector
Multi-vector type for ColBERT-style late interaction retrieval.
namespace
Storage namespace identifiers for the blob KV store.
protocol
quota
Database and tenant resource quota types.
result
Query result types returned by the NodeDb trait methods.
sparse_vector
Sparse vector type for learned sparse retrieval (SPLADE, SPLADE++).
surrogate
Surrogate — a global, stable, monotonically-allocated u32 row identity.
surrogate_bitmap
sync
temporal
text_search
Text search parameter types shared across the NodeDb trait boundary.
timeseries
Shared timeseries types for multi-model database engines.
trace
W3C-compatible 128-bit trace identifiers and 64-bit span identifiers.
typeguard
Type guard definitions for schemaless collection write-time validation.
value
vector_ann
Runtime ANN tuning options threaded from SQL planner → Data Plane.
vector_distance
Shared scalar distance metric implementations.
vector_index_stats
Vector index statistics returned by SHOW VECTOR INDEX status ON collection.column.
vector_model
Per-column vector model metadata for embedding tracking and migration.
wire_version
Single source of truth for the WIRE_FORMAT_VERSION constant shared between every crate that needs to stamp or interpret it.