Skip to main content

Crate selene_graph

Crate selene_graph 

Source
Expand description

In-memory property graph runtime.

The graph crate owns node/edge storage, label sets, property maps, directed adjacency, built-in label/property indexes, typed mutation validation, and the CORE persistence provider. SharedGraph serializes writes through a transaction boundary while readers observe immutable snapshots. selene-db is a single native engine: the higher selene-gql layer owns GQL binding/planning and the one frozen native procedure registry.

Re-exports§

pub use adjacency::AdjacencyEdge;
pub use adjacency::AdjacencyEntry;
pub use candidate_state::CANDIDATE_STATE_PROVIDER_TAG;
pub use candidate_state::CANDIDATE_STATE_SUB;
pub use candidate_state::CandidateStateSpec;
pub use candidate_state::MaintainedCandidateStateProvider;
pub use chunked_vec::ChunkedVec;
pub use compaction::CompactedCore;
pub use compaction::CompactionReport;
pub use compaction::CompactionStats;
pub use compaction::compact_core;
pub use composite_typed_index::CompositeIndexValueError;
pub use composite_typed_index::CompositeKey;
pub use composite_typed_index::CompositeKeyComponent;
pub use composite_typed_index::CompositeTypedIndex;
pub use core_provider::CORE_EDGE_SUB;
pub use core_provider::CORE_GTYP_SUB;
pub use core_provider::CORE_META_SUB;
pub use core_provider::CORE_NODE_SUB;
pub use core_provider::CORE_PROVIDER_TAG;
pub use core_provider::CORE_SCMA_SUB;
pub use core_provider::CORE_TIDX_SUB;
pub use core_provider::CORE_VIDX_SUB;
pub use core_provider::CoreProvider;
pub use core_provider::DurableState;
pub use durable_provider::DurableProvider;
pub use error::GraphError;
pub use error::GraphResult;
pub use graph::CompositePropertyIndexEntry;
pub use graph::GraphMeta;
pub use graph::SeleneGraph;
pub use graph::TextIndexEntry;
pub use graph::VectorIndexEntry;
pub use graph_types::DropBehavior;
pub use graph_types::EdgeEndpointDef;
pub use graph_types::EdgeTypeDef;
pub use graph_types::GraphTypeDef;
pub use graph_types::MAX_RECORD_TYPE_NESTING;
pub use graph_types::NodeTypeDef;
pub use graph_types::PropertyDefaultRecordField;
pub use graph_types::PropertyDefaultValue;
pub use graph_types::PropertyElementType;
pub use graph_types::PropertyTypeDef;
pub use graph_types::RecordFieldType;
pub use graph_types::RecordFieldTypeDef;
pub use graph_types::RecordFieldTypes;
pub use graph_types::ValidationMode;
pub use id_allocator::IdAllocator;
pub use index_provider::IndexProvider;
pub use index_provider::ProviderError;
pub use index_provider::ProviderTag;
pub use index_provider::SubTag;
pub use index_provider::VectorCandidateStateInfo;
pub use json_search::JSON_PATH_SELECTOR_LIMIT;
pub use json_search::JsonContainmentHit;
pub use json_search::JsonPathContainmentHit;
pub use json_search::JsonPathHit;
pub use json_search::JsonPathValueHit;
pub use json_search::JsonSearchError;
pub use mutator::Mutator;
pub use shared::SharedGraph;
pub use shared::SharedGraphBuilder;
pub use store::EdgeStore;
pub use store::NodeStore;
pub use store::RowIndex;
pub use text_index::TextIndex;
pub use text_index::TextIndexMemoryUsage;
pub use text_index::TextIndexStats;
pub use text_search::TextSearchError;
pub use text_search::TextSearchHit;
pub use type_validator::EntityId;
pub use type_validator::TypeViolation;
pub use type_validator::validate_change;
pub use type_validator::validate_entity_state;
pub use typed_index::TypedIndex;
pub use typed_index::TypedIndexKind;
pub use vector_index::IVF_REBUILD_MIN_PENDING_RETRAIN_ENTRIES;
pub use vector_index::IVF_REBUILD_PENDING_RETRAIN_BASIS_POINTS;
pub use vector_index::VectorIndex;
pub use vector_index::VectorIndexConfig;
pub use vector_index::VectorIndexKind;
pub use vector_index::VectorIndexMaintenancePolicy;
pub use vector_index::VectorIndexMemoryUsage;
pub use vector_index::VectorIndexRebuildEntry;
pub use vector_index::VectorIndexRebuildReport;
pub use vector_index::VectorIndexValueError;
pub use vector_search::ApproximateVectorExpansionOptions;
pub use vector_search::ApproximateVectorSearchOptions;
pub use vector_search::VectorCandidateSet;
pub use vector_search::VectorNeighborDirection;
pub use vector_search::VectorNeighborSearchOptions;
pub use vector_search::VectorNodeSearchHit;
pub use vector_search::VectorSearchError;
pub use write_txn::CommitOutcome;
pub use write_txn::CommitWarning;
pub use write_txn::WriteTxn;

Modules§

adjacency
Adjacency entries per spec 03 section 3.1.
candidate_state
Maintained graph-derived candidate sets.
chunked_vec
Chunked column vector primitive per spec 03 section 3.2.
compaction
CORE graph compaction mechanism (BRIEF-Item-4b / 4c).
composite_typed_index
Built-in composite-property value index.
core_provider
Core graph snapshot provider for persistence integration.
durable_provider
Commit-critical durable provider protocol.
error
Graph-layer error types and GQLSTATUS mappings.
graph
Immutable graph snapshot and read accessors.
graph_types
Closed graph type catalog definitions.
id_allocator
Per-graph ID allocator per D11.
index_provider
Stateful provider protocol for engine-owned derived state.
json_search
Exact JSON search over graph node properties.
mutator
Typed mutation funnel per spec 03 section 4.3.
shared
Shared graph wrapper implementing lock-free reads and serialized writes.
store
Structure-of-arrays node and edge stores per spec 03 section 3.1.
text_index
Reusable BM25 postings indexes over graph node string properties.
text_search
Exact BM25 full-text search over graph node properties.
type_validator
Closed graph type validation.
typed_index
Built-in per-(label, property) value index. See spec 03 section 5.2.
vector_index
Built-in vector row-set indexes for node properties.
vector_search
Exact native vector search over graph node properties.
write_txn
Write transaction RAII handle per spec 03 sections 4 and 6.

Structs§

HnswIndexConfig
HNSW construction parameters for native vector indexes.
IvfIndexConfig
IVF construction parameters for native vector indexes.
JsonPathContainmentCandidateOptions
Inputs for candidate-scoped JSON path-containment search.
NotNanError
Marker error returned when a raw float cannot be admitted to a not-NaN key.
NotNanF32
f32 wrapper with total ordering via f32::total_cmp.
NotNanF64
f64 wrapper with total ordering via f64::total_cmp.
WalConfig
WAL writer configuration.

Enums§

CommitBatching
Group-commit batching policy for the single per-graph committer thread. Default Off.
JsonPathSelector
Selector used by JSON path-existence helpers.
SyncPolicy
WAL fsync scheduling policy.

Constants§

DEFAULT_WAL_FILE_NAME
Conventional v1.0 single-file WAL name used by embedders.