Skip to main content

DatabaseEngine

Struct DatabaseEngine 

Source
pub struct DatabaseEngine { /* private fields */ }
Expand description

Cloneable shared-handle database runtime for OverGraph.

Implementations§

Source§

impl DatabaseEngine

Source

pub fn open(path: &Path, options: &DbOptions) -> Result<Self, EngineError>

Source

pub fn close(&self) -> Result<(), EngineError>

Source

pub fn close_fast(&self) -> Result<(), EngineError>

Source

pub fn ensure_node_label(&self, label: &str) -> Result<u32, EngineError>

Source

pub fn ensure_edge_label(&self, label: &str) -> Result<u32, EngineError>

Source

pub fn get_node_label_id(&self, label: &str) -> Result<Option<u32>, EngineError>

Source

pub fn get_edge_label_id(&self, label: &str) -> Result<Option<u32>, EngineError>

Source

pub fn get_node_label( &self, label_id: u32, ) -> Result<Option<String>, EngineError>

Source

pub fn get_edge_label( &self, label_id: u32, ) -> Result<Option<String>, EngineError>

Source

pub fn list_node_labels(&self) -> Result<Vec<NodeLabelInfo>, EngineError>

Source

pub fn list_edge_labels(&self) -> Result<Vec<EdgeLabelInfo>, EngineError>

Source

pub fn upsert_node<L>( &self, labels: L, key: &str, options: UpsertNodeOptions, ) -> Result<u64, EngineError>
where L: IntoNodeLabels,

Source

pub fn upsert_edge( &self, from: u64, to: u64, label: &str, options: UpsertEdgeOptions, ) -> Result<u64, EngineError>

Source

pub fn add_node_label(&self, id: u64, label: &str) -> Result<bool, EngineError>

Source

pub fn remove_node_label( &self, id: u64, label: &str, ) -> Result<bool, EngineError>

Source

pub fn batch_upsert_nodes( &self, inputs: Vec<NodeInput>, ) -> Result<Vec<u64>, EngineError>

Source

pub fn batch_upsert_edges( &self, inputs: Vec<EdgeInput>, ) -> Result<Vec<u64>, EngineError>

Source

pub fn delete_node(&self, id: u64) -> Result<(), EngineError>

Source

pub fn delete_edge(&self, id: u64) -> Result<(), EngineError>

Source

pub fn invalidate_edge( &self, id: u64, valid_to: i64, ) -> Result<Option<EdgeView>, EngineError>

Source

pub fn graph_patch(&self, patch: GraphPatch) -> Result<PatchResult, EngineError>

Source

pub fn prune(&self, policy: &PrunePolicy) -> Result<PruneResult, EngineError>

Source

pub fn set_prune_policy( &self, name: &str, policy: PrunePolicy, ) -> Result<(), EngineError>

Source

pub fn remove_prune_policy(&self, name: &str) -> Result<bool, EngineError>

Source

pub fn list_prune_policies(&self) -> Result<Vec<PrunePolicyInfo>, EngineError>

Source

pub fn ensure_node_property_index( &self, label: &str, prop_key: &str, kind: SecondaryIndexKind, ) -> Result<NodePropertyIndexInfo, EngineError>

Source

pub fn drop_node_property_index( &self, label: &str, prop_key: &str, kind: SecondaryIndexKind, ) -> Result<bool, EngineError>

Source

pub fn list_node_property_indexes( &self, ) -> Result<Vec<NodePropertyIndexInfo>, EngineError>

Source

pub fn ensure_edge_property_index( &self, label: &str, prop_key: &str, kind: SecondaryIndexKind, ) -> Result<EdgePropertyIndexInfo, EngineError>

Source

pub fn drop_edge_property_index( &self, label: &str, prop_key: &str, kind: SecondaryIndexKind, ) -> Result<bool, EngineError>

Source

pub fn list_edge_property_indexes( &self, ) -> Result<Vec<EdgePropertyIndexInfo>, EngineError>

Source

pub fn get_node(&self, id: u64) -> Result<Option<NodeView>, EngineError>

Source

pub fn get_edge(&self, id: u64) -> Result<Option<EdgeView>, EngineError>

Source

pub fn get_node_by_key( &self, label: &str, key: &str, ) -> Result<Option<NodeView>, EngineError>

Source

pub fn get_edge_by_triple( &self, from: u64, to: u64, label: &str, ) -> Result<Option<EdgeView>, EngineError>

Source

pub fn get_nodes( &self, ids: &[u64], ) -> Result<Vec<Option<NodeView>>, EngineError>

Source

pub fn get_nodes_by_keys( &self, keys: &[NodeKeyQuery], ) -> Result<Vec<Option<NodeView>>, EngineError>

Source

pub fn get_edges( &self, ids: &[u64], ) -> Result<Vec<Option<EdgeView>>, EngineError>

Source

pub fn edges_by_label(&self, label: &str) -> Result<Vec<u64>, EngineError>

Source

pub fn get_edges_by_label( &self, label: &str, ) -> Result<Vec<EdgeView>, EngineError>

Source

pub fn nodes_by_labels<L>(&self, labels: L) -> Result<Vec<u64>, EngineError>
where L: IntoNodeLabels,

Source

pub fn get_nodes_by_labels<L>( &self, labels: L, ) -> Result<Vec<NodeView>, EngineError>
where L: IntoNodeLabels,

Source

pub fn count_nodes_by_labels<L>(&self, labels: L) -> Result<u64, EngineError>
where L: IntoNodeLabels,

Source

pub fn count_edges_by_label(&self, label: &str) -> Result<u64, EngineError>

Source

pub fn nodes_by_labels_paged<L>( &self, labels: L, page: &PageRequest, ) -> Result<PageResult<u64>, EngineError>
where L: IntoNodeLabels,

Source

pub fn get_nodes_by_labels_paged<L>( &self, labels: L, page: &PageRequest, ) -> Result<PageResult<NodeView>, EngineError>
where L: IntoNodeLabels,

Source

pub fn edges_by_label_paged( &self, label: &str, page: &PageRequest, ) -> Result<PageResult<u64>, EngineError>

Source

pub fn get_edges_by_label_paged( &self, label: &str, page: &PageRequest, ) -> Result<PageResult<EdgeView>, EngineError>

Source

pub fn find_nodes( &self, label: &str, prop_key: &str, prop_value: &PropValue, ) -> Result<Vec<u64>, EngineError>

Source

pub fn find_nodes_paged( &self, label: &str, prop_key: &str, prop_value: &PropValue, page: &PageRequest, ) -> Result<PageResult<u64>, EngineError>

Source

pub fn find_nodes_range( &self, label: &str, prop_key: &str, lower: Option<&PropertyRangeBound>, upper: Option<&PropertyRangeBound>, ) -> Result<Vec<u64>, EngineError>

Source

pub fn find_nodes_range_paged( &self, label: &str, prop_key: &str, lower: Option<&PropertyRangeBound>, upper: Option<&PropertyRangeBound>, page: &PropertyRangePageRequest, ) -> Result<PropertyRangePageResult<u64>, EngineError>

Source

pub fn find_nodes_by_time_range( &self, label: &str, from_ms: i64, to_ms: i64, ) -> Result<Vec<u64>, EngineError>

Source

pub fn find_nodes_by_time_range_paged( &self, label: &str, from_ms: i64, to_ms: i64, page: &PageRequest, ) -> Result<PageResult<u64>, EngineError>

Source

pub fn personalized_pagerank( &self, seeds: &[u64], options: &PprOptions, ) -> Result<PprResult, EngineError>

Source

pub fn export_adjacency( &self, options: &ExportOptions, ) -> Result<AdjacencyExport, EngineError>

Source

pub fn degree( &self, node_id: u64, options: &DegreeOptions, ) -> Result<u64, EngineError>

Source

pub fn sum_edge_weights( &self, node_id: u64, options: &DegreeOptions, ) -> Result<f64, EngineError>

Source

pub fn avg_edge_weight( &self, node_id: u64, options: &DegreeOptions, ) -> Result<Option<f64>, EngineError>

Source

pub fn degrees( &self, node_ids: &[u64], options: &DegreeOptions, ) -> Result<NodeIdMap<u64>, EngineError>

Source

pub fn shortest_path( &self, from: u64, to: u64, options: &ShortestPathOptions, ) -> Result<Option<ShortestPath>, EngineError>

Source

pub fn is_connected( &self, from: u64, to: u64, options: &IsConnectedOptions, ) -> Result<bool, EngineError>

Source

pub fn traverse( &self, start_node_id: u64, max_depth: u32, options: &TraverseOptions, ) -> Result<TraversalPageResult, EngineError>

Source

pub fn all_shortest_paths( &self, from: u64, to: u64, options: &AllShortestPathsOptions, ) -> Result<Vec<ShortestPath>, EngineError>

Source

pub fn neighbors( &self, node_id: u64, options: &NeighborOptions, ) -> Result<Vec<NeighborEntry>, EngineError>

Source

pub fn neighbors_batch( &self, node_ids: &[u64], options: &NeighborOptions, ) -> Result<NodeIdMap<Vec<NeighborEntry>>, EngineError>

Source

pub fn neighbors_paged( &self, node_id: u64, options: &NeighborOptions, page: &PageRequest, ) -> Result<PageResult<NeighborEntry>, EngineError>

Source

pub fn top_k_neighbors( &self, node_id: u64, k: usize, options: &TopKOptions, ) -> Result<Vec<NeighborEntry>, EngineError>

Source

pub fn extract_subgraph( &self, start: u64, max_depth: u32, options: &SubgraphOptions, ) -> Result<Subgraph, EngineError>

Source

pub fn connected_components( &self, options: &ComponentOptions, ) -> Result<NodeIdMap<u64>, EngineError>

Source

pub fn component_of( &self, node_id: u64, options: &ComponentOptions, ) -> Result<Vec<u64>, EngineError>

Source

pub fn sync(&self) -> Result<(), EngineError>

Source

pub fn flush(&self) -> Result<Option<SegmentInfo>, EngineError>

Source

pub fn ingest_mode(&self) -> Result<(), EngineError>

Source

pub fn end_ingest(&self) -> Result<Option<CompactionStats>, EngineError>

Source

pub fn compact(&self) -> Result<Option<CompactionStats>, EngineError>

Source

pub fn compact_with_progress<F>( &self, progress: F, ) -> Result<Option<CompactionStats>, EngineError>

Source

pub fn stats(&self) -> Result<DbStats, EngineError>

Source

pub fn scrub(&self) -> Result<ScrubReport, EngineError>

Source

pub fn path(&self) -> &Path

Source

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.

Source

pub fn node_count(&self) -> Result<usize, EngineError>

Source

pub fn edge_count(&self) -> Result<usize, EngineError>

Source

pub fn next_node_id(&self) -> Result<u64, EngineError>

Source

pub fn next_edge_id(&self) -> Result<u64, EngineError>

Source

pub fn segment_count(&self) -> Result<usize, EngineError>

Source

pub fn segment_tombstone_node_count(&self) -> Result<usize, EngineError>

Source

pub fn segment_tombstone_edge_count(&self) -> Result<usize, EngineError>

Source§

impl DatabaseEngine

§

impl DatabaseEngine

Trait Implementations§

Source§

impl Clone for DatabaseEngine

Source§

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)

Performs copy-assignment from source. Read more
Source§

impl Drop for DatabaseEngine

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.