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 array_route::ShardBucket;pub use ascii::find_ascii_case_insensitive;pub use ascii::find_ascii_case_insensitive_from;pub use ascii::rfind_ascii_case_insensitive;pub use ascii::starts_with_ascii_case_insensitive;pub use ascii::strip_prefix_ascii_case_insensitive;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::KeySpec;pub use collection_config::PartitionStrategy;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 crdt_preview::CrdtPreviewResult;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 graph::GraphStats;pub use hlc::ClockSkew;pub use hlc::Hlc;pub use hlc::HlcClock;pub use hlc::MAX_CLOCK_SKEW_NS;pub use hnsw::HnswCheckpoint;pub use hnsw::HnswNodeSnapshot;pub use hnsw::HnswParams;pub use id::CollectionId;pub use id::CollectionKey;pub use id::CollectionKeyError;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::QualifiedCollection;pub use id::ShapeId;pub use id::TenantId;pub use identity::KeyRepr;pub use json_msgpack::InstantKind;pub use json_msgpack::JsonValue;pub use json_msgpack::MsgpackError;pub use json_msgpack::MsgpackResult;pub use json_msgpack::NativeCell;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::read_instant;pub use json_msgpack::value_from_msgpack;pub use json_msgpack::value_to_msgpack;pub use json_msgpack::write_instant;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 path_component::is_plain_path_component;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 rls_write_check::RlsWriteCheck;pub use rls_write_check::WriteGateDecision;pub use row_identity::DEFAULT_IDENTITY_COLUMN;pub use row_identity::HEADLESS_SENTINEL_PREFIX;pub use row_identity::ROWID_COLUMN;pub use row_identity::RowIdentity;pub use row_identity::StorageKey;pub use row_identity::declared_key;pub use row_identity::extract_pk_value;pub use row_identity::value_to_pk_string;pub use sparse_vector::SparseVector;pub use sparse_vector::SparseVectorError;pub use sql_quote::quote_ident;pub use sql_quote::quote_literal;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::LsnTimeAnchor;pub use temporal::LsnTimeError;pub use temporal::LsnTimeMap;pub use temporal::MAX_POSITIONS_PER_EPOCH;pub use temporal::NANOS_PER_MS;pub use temporal::OPEN_UPPER;pub use temporal::OrdinalClock;pub use temporal::SystemTimeScope;pub use temporal::ValidTimePredicate;pub use temporal::calvin_txn_ordinal;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::TextColumnFault;pub use text_search::TextSearchParams;pub use trace::SpanId;pub use trace::TraceId;pub use typeguard::TypeGuardFieldDef;pub use value::NotScalar;pub use value::Value;pub use value::scalar_to_raw_bytes;pub use vector_ann::VectorAnnOptions;pub use vector_ann::VectorQuantization;pub use vector_dtype::VectorStorageDtype;pub use vector_index_params::StoredVectorIndexParams;pub use vector_index_stats::VectorIndexQuantization;pub use vector_index_stats::VectorIndexStats;pub use vector_index_stats::VectorIndexType;pub use vector_index_stats::VectorIvfStats;pub use vector_model::VectorModelEntry;pub use vector_model::VectorModelMetadata;pub use volatility::Volatility;pub use write_version::ShardVersion;pub use write_version::WriteVersion;
Modules§
- approx
- array_
cell - Typed payload for
Value::ArrayCell. - array_
route - Routing bucket and vShard of an array tile.
- ascii
- Byte-stable ASCII matching for untrusted text.
- audit_
dml AuditDmlMode— per-database DML audit level.- backup_
envelope - bbox
- Axis-aligned bounding box for 2D geometries (WGS-84).
- calvin
- Primitive Calvin scheduling types shared between
nodedb-physical(the physical-plan IR layer) andnodedb-cluster(the distributed Calvin sequencer / scheduler). - calvin_
passive - Identity of one row a passive Calvin participant reads.
- 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, plus partition-strategy metadata.
- columnar
- config
- conversion
- Conversions between
serde_json::Valueandnodedb_types::Value. - crdt_
preview - Wire result for a bounded, non-mutating CRDT delta preview.
- datetime
- First-class DateTime and Duration types.
- decode_
bounds - Dependency-neutral allocation bounds for untrusted binary decoders.
- diagnostic
- Canonical diagnostic-layer taxonomy for end-to-end probes.
- 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.
- fail_
point - Minimal feature-gated fail-point framework for crash-injection tests.
- 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.
- identity
- Plane-neutral row identity.
- 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.
- numeric_
cmp - Numeric readings and their total order, shared by every comparison path.
- path_
component - Validation for names that become a single filesystem path component.
- pg_
compat - PostgreSQL wire-compatibility version constants. NodeDB advertises
compatibility with a fixed PostgreSQL major so libpq-based clients gate
features correctly. These are the single source of truth for
version(), theserver_version_numruntime parameter, and startup ParameterStatus. - protocol
- quota
- Database and tenant resource quota types.
- result
- Query result types returned by the
NodeDbtrait methods. - rls_
write_ check - The compiled row-level-security WRITE predicate carried on a write plan.
- row_
identity - This module owns both encodings of a row’s surrogate identity.
- sparse_
vector - Sparse vector type for learned sparse retrieval (SPLADE, SPLADE++).
- sql_
quote - SQL-standard quoting for identifiers and string literals.
- 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_
dtype - Vector storage precision tag.
- vector_
index_ params - Durable per-collection/column vector-index parameters.
- 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.
- volatility
- Function volatility: how far a call’s result can be reused.
- wire_
version - Single source of truth for the
WIRE_FORMAT_VERSIONconstant and theWIRE_BUILD_IDbuild identity, shared between every crate that needs to stamp or interpret them. - write_
version - The version a committed write gives the rows it writes.
Macros§
- fail_
point - Inject a fail point. Does nothing at runtime without the
failpointsfeature. - fail_
point_ err - Inject a fail point that can abort the enclosing function with an error.