pub struct DatabaseEngine { /* private fields */ }Expand description
Cloneable shared-handle database runtime for OverGraph.
Implementations§
Source§impl DatabaseEngine
impl DatabaseEngine
pub fn open(path: &Path, options: &DbOptions) -> Result<Self, EngineError>
pub fn close(&self) -> Result<(), EngineError>
pub fn close_fast(&self) -> Result<(), EngineError>
pub fn ensure_node_label(&self, label: &str) -> Result<u32, EngineError>
pub fn ensure_edge_label(&self, label: &str) -> Result<u32, EngineError>
pub fn get_node_label_id(&self, label: &str) -> Result<Option<u32>, EngineError>
pub fn get_edge_label_id(&self, label: &str) -> Result<Option<u32>, EngineError>
pub fn get_node_label( &self, label_id: u32, ) -> Result<Option<String>, EngineError>
pub fn get_edge_label( &self, label_id: u32, ) -> Result<Option<String>, EngineError>
pub fn list_node_labels(&self) -> Result<Vec<NodeLabelInfo>, EngineError>
pub fn list_edge_labels(&self) -> Result<Vec<EdgeLabelInfo>, EngineError>
pub fn upsert_node<L>(
&self,
labels: L,
key: &str,
options: UpsertNodeOptions,
) -> Result<u64, EngineError>where
L: IntoNodeLabels,
pub fn upsert_edge( &self, from: u64, to: u64, label: &str, options: UpsertEdgeOptions, ) -> Result<u64, EngineError>
pub fn add_node_label(&self, id: u64, label: &str) -> Result<bool, EngineError>
pub fn remove_node_label( &self, id: u64, label: &str, ) -> Result<bool, EngineError>
pub fn batch_upsert_nodes( &self, inputs: Vec<NodeInput>, ) -> Result<Vec<u64>, EngineError>
pub fn batch_upsert_edges( &self, inputs: Vec<EdgeInput>, ) -> Result<Vec<u64>, EngineError>
pub fn delete_node(&self, id: u64) -> Result<(), EngineError>
pub fn delete_edge(&self, id: u64) -> Result<(), EngineError>
pub fn invalidate_edge( &self, id: u64, valid_to: i64, ) -> Result<Option<EdgeView>, EngineError>
pub fn graph_patch(&self, patch: GraphPatch) -> Result<PatchResult, EngineError>
pub fn prune(&self, policy: &PrunePolicy) -> Result<PruneResult, EngineError>
pub fn set_prune_policy( &self, name: &str, policy: PrunePolicy, ) -> Result<(), EngineError>
pub fn remove_prune_policy(&self, name: &str) -> Result<bool, EngineError>
pub fn list_prune_policies(&self) -> Result<Vec<PrunePolicyInfo>, EngineError>
pub fn ensure_node_property_index( &self, label: &str, prop_key: &str, kind: SecondaryIndexKind, ) -> Result<NodePropertyIndexInfo, EngineError>
pub fn drop_node_property_index( &self, label: &str, prop_key: &str, kind: SecondaryIndexKind, ) -> Result<bool, EngineError>
pub fn list_node_property_indexes( &self, ) -> Result<Vec<NodePropertyIndexInfo>, EngineError>
pub fn ensure_edge_property_index( &self, label: &str, prop_key: &str, kind: SecondaryIndexKind, ) -> Result<EdgePropertyIndexInfo, EngineError>
pub fn drop_edge_property_index( &self, label: &str, prop_key: &str, kind: SecondaryIndexKind, ) -> Result<bool, EngineError>
pub fn list_edge_property_indexes( &self, ) -> Result<Vec<EdgePropertyIndexInfo>, EngineError>
pub fn get_node(&self, id: u64) -> Result<Option<NodeView>, EngineError>
pub fn get_edge(&self, id: u64) -> Result<Option<EdgeView>, EngineError>
pub fn get_node_by_key( &self, label: &str, key: &str, ) -> Result<Option<NodeView>, EngineError>
pub fn get_edge_by_triple( &self, from: u64, to: u64, label: &str, ) -> Result<Option<EdgeView>, EngineError>
pub fn get_nodes( &self, ids: &[u64], ) -> Result<Vec<Option<NodeView>>, EngineError>
pub fn get_nodes_by_keys( &self, keys: &[NodeKeyQuery], ) -> Result<Vec<Option<NodeView>>, EngineError>
pub fn get_edges( &self, ids: &[u64], ) -> Result<Vec<Option<EdgeView>>, EngineError>
pub fn vector_search( &self, request: &VectorSearchRequest, ) -> Result<Vec<VectorHit>, EngineError>
pub fn edges_by_label(&self, label: &str) -> Result<Vec<u64>, EngineError>
pub fn get_edges_by_label( &self, label: &str, ) -> Result<Vec<EdgeView>, EngineError>
pub fn nodes_by_labels<L>(&self, labels: L) -> Result<Vec<u64>, EngineError>where
L: IntoNodeLabels,
pub fn get_nodes_by_labels<L>(
&self,
labels: L,
) -> Result<Vec<NodeView>, EngineError>where
L: IntoNodeLabels,
pub fn count_nodes_by_labels<L>(&self, labels: L) -> Result<u64, EngineError>where
L: IntoNodeLabels,
pub fn count_edges_by_label(&self, label: &str) -> Result<u64, EngineError>
pub fn nodes_by_labels_paged<L>(
&self,
labels: L,
page: &PageRequest,
) -> Result<PageResult<u64>, EngineError>where
L: IntoNodeLabels,
pub fn get_nodes_by_labels_paged<L>(
&self,
labels: L,
page: &PageRequest,
) -> Result<PageResult<NodeView>, EngineError>where
L: IntoNodeLabels,
pub fn edges_by_label_paged( &self, label: &str, page: &PageRequest, ) -> Result<PageResult<u64>, EngineError>
pub fn get_edges_by_label_paged( &self, label: &str, page: &PageRequest, ) -> Result<PageResult<EdgeView>, EngineError>
pub fn find_nodes( &self, label: &str, prop_key: &str, prop_value: &PropValue, ) -> Result<Vec<u64>, EngineError>
pub fn find_nodes_paged( &self, label: &str, prop_key: &str, prop_value: &PropValue, page: &PageRequest, ) -> Result<PageResult<u64>, EngineError>
pub fn find_nodes_range( &self, label: &str, prop_key: &str, lower: Option<&PropertyRangeBound>, upper: Option<&PropertyRangeBound>, ) -> Result<Vec<u64>, EngineError>
pub fn find_nodes_range_paged( &self, label: &str, prop_key: &str, lower: Option<&PropertyRangeBound>, upper: Option<&PropertyRangeBound>, page: &PropertyRangePageRequest, ) -> Result<PropertyRangePageResult<u64>, EngineError>
pub fn find_nodes_by_time_range( &self, label: &str, from_ms: i64, to_ms: i64, ) -> Result<Vec<u64>, EngineError>
pub fn find_nodes_by_time_range_paged( &self, label: &str, from_ms: i64, to_ms: i64, page: &PageRequest, ) -> Result<PageResult<u64>, EngineError>
pub fn personalized_pagerank( &self, seeds: &[u64], options: &PprOptions, ) -> Result<PprResult, EngineError>
pub fn export_adjacency( &self, options: &ExportOptions, ) -> Result<AdjacencyExport, EngineError>
pub fn degree( &self, node_id: u64, options: &DegreeOptions, ) -> Result<u64, EngineError>
pub fn sum_edge_weights( &self, node_id: u64, options: &DegreeOptions, ) -> Result<f64, EngineError>
pub fn avg_edge_weight( &self, node_id: u64, options: &DegreeOptions, ) -> Result<Option<f64>, EngineError>
pub fn degrees( &self, node_ids: &[u64], options: &DegreeOptions, ) -> Result<NodeIdMap<u64>, EngineError>
pub fn shortest_path( &self, from: u64, to: u64, options: &ShortestPathOptions, ) -> Result<Option<ShortestPath>, EngineError>
pub fn is_connected( &self, from: u64, to: u64, options: &IsConnectedOptions, ) -> Result<bool, EngineError>
pub fn traverse( &self, start_node_id: u64, max_depth: u32, options: &TraverseOptions, ) -> Result<TraversalPageResult, EngineError>
pub fn all_shortest_paths( &self, from: u64, to: u64, options: &AllShortestPathsOptions, ) -> Result<Vec<ShortestPath>, EngineError>
pub fn neighbors( &self, node_id: u64, options: &NeighborOptions, ) -> Result<Vec<NeighborEntry>, EngineError>
pub fn neighbors_batch( &self, node_ids: &[u64], options: &NeighborOptions, ) -> Result<NodeIdMap<Vec<NeighborEntry>>, EngineError>
pub fn neighbors_paged( &self, node_id: u64, options: &NeighborOptions, page: &PageRequest, ) -> Result<PageResult<NeighborEntry>, EngineError>
pub fn top_k_neighbors( &self, node_id: u64, k: usize, options: &TopKOptions, ) -> Result<Vec<NeighborEntry>, EngineError>
pub fn extract_subgraph( &self, start: u64, max_depth: u32, options: &SubgraphOptions, ) -> Result<Subgraph, EngineError>
pub fn connected_components( &self, options: &ComponentOptions, ) -> Result<NodeIdMap<u64>, EngineError>
pub fn component_of( &self, node_id: u64, options: &ComponentOptions, ) -> Result<Vec<u64>, EngineError>
pub fn sync(&self) -> Result<(), EngineError>
pub fn flush(&self) -> Result<Option<SegmentInfo>, EngineError>
pub fn ingest_mode(&self) -> Result<(), EngineError>
pub fn end_ingest(&self) -> Result<Option<CompactionStats>, EngineError>
pub fn compact(&self) -> Result<Option<CompactionStats>, EngineError>
pub fn compact_with_progress<F>( &self, progress: F, ) -> Result<Option<CompactionStats>, EngineError>
pub fn stats(&self) -> Result<DbStats, EngineError>
pub fn scrub(&self) -> Result<ScrubReport, EngineError>
pub fn path(&self) -> &Path
Sourcepub fn manifest(&self) -> Result<ManifestState, EngineError>
pub fn manifest(&self) -> Result<ManifestState, EngineError>
Return a raw manifest snapshot for diagnostics.
This is an explicit introspection exception: the returned manifest may contain internal numeric token IDs and storage metadata. Ordinary public graph APIs use node labels and edge-label names instead.
pub fn node_count(&self) -> Result<usize, EngineError>
pub fn edge_count(&self) -> Result<usize, EngineError>
pub fn next_node_id(&self) -> Result<u64, EngineError>
pub fn next_edge_id(&self) -> Result<u64, EngineError>
pub fn segment_count(&self) -> Result<usize, EngineError>
pub fn segment_tombstone_node_count(&self) -> Result<usize, EngineError>
pub fn segment_tombstone_edge_count(&self) -> Result<usize, EngineError>
Source§impl DatabaseEngine
impl DatabaseEngine
pub fn begin_write_txn(&self) -> Result<WriteTxn, EngineError>
§impl DatabaseEngine
impl DatabaseEngine
pub fn execute_gql( &self, query: &str, params: &GqlParams, options: &GqlExecutionOptions, ) -> Result<GqlExecutionResult, EngineError>
pub fn explain_gql( &self, query: &str, params: &GqlParams, options: &GqlExecutionOptions, ) -> Result<GqlExecutionExplain, EngineError>
pub fn query_node_ids( &self, query: &NodeQuery, ) -> Result<QueryNodeIdsResult, EngineError>
pub fn query_nodes( &self, query: &NodeQuery, ) -> Result<QueryNodesResult, EngineError>
pub fn explain_node_query( &self, query: &NodeQuery, ) -> Result<QueryPlan, EngineError>
pub fn query_edge_ids( &self, query: &EdgeQuery, ) -> Result<QueryEdgeIdsResult, EngineError>
pub fn query_edges( &self, query: &EdgeQuery, ) -> Result<QueryEdgesResult, EngineError>
pub fn explain_edge_query( &self, query: &EdgeQuery, ) -> Result<QueryPlan, EngineError>
pub fn query_graph_rows( &self, query: &GraphRowQuery, ) -> Result<GraphRowResult, EngineError>
pub fn explain_graph_rows( &self, query: &GraphRowQuery, ) -> Result<GraphRowExplain, EngineError>
pub fn query_graph_pipeline( &self, query: &GraphPipelineQuery, ) -> Result<GraphPipelineResult, EngineError>
pub fn explain_graph_pipeline( &self, query: &GraphPipelineQuery, ) -> Result<GraphPipelineExplain, EngineError>
Trait Implementations§
Source§impl Clone for DatabaseEngine
impl Clone for DatabaseEngine
Source§fn clone(&self) -> DatabaseEngine
fn clone(&self) -> DatabaseEngine
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Drop for DatabaseEngine
impl Drop for DatabaseEngine
Auto Trait Implementations§
impl Freeze for DatabaseEngine
impl RefUnwindSafe for DatabaseEngine
impl Send for DatabaseEngine
impl Sync for DatabaseEngine
impl Unpin for DatabaseEngine
impl UnsafeUnpin for DatabaseEngine
impl UnwindSafe for DatabaseEngine
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more