Expand description
Foundation types for the selene-db ISO/IEC 39075:2024 GQL property graph engine.
This crate is the dependency root: every other selene crate transitively
depends on it. Per D8, selene-core has zero dependencies on other selene
crates. The mandatory data types of ISO GQL minimum conformance live here
(STRING, BOOLEAN, INT, FLOAT); composite, temporal, and reference
value types are also normatively defined in Spec 02 and implemented here.
The crate now also carries the composite containers,
schema model, origin metadata, and WAL change payload
types needed by downstream crates.
See Spec 02 for the full data model specification.
Re-exports§
pub use cancellation::CancellationCause;pub use cancellation::CancellationChecker;pub use cancellation::CancellationToken;pub use cancellation::NodeScanBudget;pub use change_kind::ChangeKind;pub use changeset::Change;pub use changeset::LabelDiff;pub use changeset::PropertyDiff;pub use changeset::SchemaChange;pub use changeset::SchemaPropertyIndexKind;pub use changeset::SchemaVectorIndexKind;pub use db_string::DbString;pub use db_string::db_string;pub use error::CoreError;pub use error::CoreResult;pub use extension_type_ids::ExtensionTypeId;pub use extension_type_ids::FIRST_PARTY_EXTENSION_TYPE_IDS;pub use extension_type_ids::SELENE_RDF;pub use extension_type_ids::SELENE_TIMESERIES;pub use gqlstatus::ALL_GQLSTATUS_NAMES;pub use gqlstatus::gqlstatus_name;pub use hlc::HlcTimestamp;pub use identity::BindingTableId;pub use identity::EdgeId;pub use identity::GraphId;pub use identity::NodeId;pub use identity::RecordTypeId;pub use label_set::LabelSet;pub use origin::Origin;pub use property_map::PropertyMap;pub use property_map::PropertyMapIter;pub use property_map::PropertyMapKeys;pub use property_map::PropertyMapValues;pub use property_value_type::PropertyValueType;pub use reserved::RESERVED_LABEL_PREFIX;pub use schema::EdgeEndpointDef;pub use schema::EdgeTypeDef;pub use schema::EdgeTypeDefV1;pub use schema::GraphType;pub use schema::GraphTypeId;pub use schema::KeyLabelSetPolicy;pub use schema::NodeKey;pub use schema::NodeTypeDef;pub use schema::NodeTypeDefV1;pub use schema::NodeTypeRef;pub use schema::PredefinedValueType;pub use schema::PropertyDef;pub use schema::PropertyDefV1;pub use schema::RecordFieldStructure;pub use schema::RecordFieldStructureDef;pub use schema::RecordFieldStructureType;pub use schema::RecordTypeDef;pub use schema::RecordTypeRef;pub use schema::ValidationMode;pub use schema::ValueType;pub use schema::ValueTypeCardinality;pub use value::EdgeDirection;pub use value::MAX_VECTOR_DIMENSION;pub use value::Path;pub use value::PathSegment;pub use value::Record;pub use value::RecordTyped;pub use value::Value;pub use value::VectorValue;pub use vector::TURBO_QUANT_BLOCK_ROWS;pub use vector::TurboQuantBitWidth;pub use vector::TurboQuantBlockedCodes;pub use vector::TurboQuantCodebook;pub use vector::TurboQuantCodebookKind;pub use vector::TurboQuantCodecError;pub use vector::TurboQuantCodecResult;pub use vector::TurboQuantPackedCodes;pub use vector::VectorMetric;pub use vector::VectorMetricQuery;pub use vector::VectorSearchHit;pub use vector::VectorTopK;pub use vector::exact_vector_top_k;pub use vector::vector_squared_norm;pub use vector_index::HnswIndexConfig;pub use vector_index::IvfIndexConfig;
Modules§
- cancellation
- Cooperative cancellation primitives shared by the executor and algorithm crates.
- change_
kind - Compact stable discriminants for
Changevariants. - changeset
- WAL change payloads per spec 02 section 9.
- db_
string - Engine-owned database strings backed by shared string storage.
- error
- Core error types and ISO GQLSTATUS mappings.
- extension_
type_ ids - Value-type ID reservations for
Value::Extendedpayloads. - feature_
register - ISO/IEC 39075:2024 feature and implementation-defined registers.
- gqlstatus
- GQLSTATUS codes emitted by selene-db plus symbolic names.
- hlc
- Hybrid logical clock timestamp per spec 04 section 3.2.
- identity
- Graph, catalog, and request identifier types per spec 02 section 4.
- label_
set - Sorted label sets per spec 02 section 5.3.
- metrics
- Optional metrics facade for embedders that install a
metricsrecorder. - origin
- Mutation origin metadata per spec 02 section 8.
- property_
map - Property maps per spec 02 section 5.2.
- property_
value_ type - Runtime property value type tags for closed graph validation.
- reserved
- Reserved label prefixes for engine-internal graph metadata.
- schema
- Schema model types per spec 02 section 6.
- value
- In-memory GQL value representation per spec 02 section 3.
- vector
- Native dense-vector metric kernels and exact-search helpers.
- vector_
index - Durable vector-index configuration payloads.
Structs§
- Byte
String Type - User-specified byte-string length metadata.
- Character
String Type - User-specified character-string length metadata.
- Decimal
Type - User-specified decimal exact numeric type metadata.
- Json
Value - Native JSON payload stored as a first-class
crate::Value. - Json
Value Ref - Borrowed JSON subvalue selected from a validated
JsonValue.
Enums§
- Character
String Coercion Error - Failure modes from
coerce_character_string_to_type. - Duration
Type Qualifier - ISO temporal duration type qualifier.
- Duration
Value Family - Field family carried by a concrete duration value.
- Json
Path Selector - Selector used by JSON path-existence helpers.
Constants§
- MAX_
BYTE_ STRING_ TYPE_ LENGTH - Maximum declared byte length for bounded byte-string types
(
BYTES(n)/BYTES(min, max)/BINARY(n)/VARBINARY(n)). - MAX_
CHARACTER_ STRING_ TYPE_ LENGTH - Maximum declared character length for bounded character-string types
(
STRING(n)/STRING(min, max)/CHAR(n)/VARCHAR(n)). - MAX_
DECIMAL_ PRECISION - Maximum decimal precision currently representable by selene-db’s
rust_decimal-backedcrate::Value::Decimalstorage. - MAX_
DECIMAL_ SCALE - Maximum decimal scale currently representable by selene-db’s
rust_decimal-backedcrate::Value::Decimalstorage.
Functions§
- byte_
string_ fits_ type - Return true when
valuecan be represented bybyte_string_type. - character_
string_ fits_ type - Return true when
valuecan be represented bycharacter_string_type. - coerce_
character_ string_ to_ type - Coerce
valueinto thetargetcharacter-length envelope. - decimal_
fits_ type - Return true when
valuecan be represented exactly bydecimal_type. - duration_
order_ key - Return the canonical ordered key for a duration span.
- duration_
value_ family - Return the duration field family, or
Nonewhen year/month and day/time fields are mixed in one span. - is_
truncating_ whitespace - Return true when
charactermay be silently discarded by length-bound truncation. - round_
decimal_ to_ type - Round
valueto the target scale and return it if it fits the requested precision/scale envelope.
Type Aliases§
- Duration
Order Key - Ordered key used for duration comparisons and duration-backed indexes.