pub struct LpgStore { /* private fields */ }Expand description
The main LPG graph store.
This is the core storage for labeled property graphs, providing efficient node/edge storage and adjacency indexing.
Implementations§
Source§impl LpgStore
impl LpgStore
Sourcepub fn with_config(config: LpgStoreConfig) -> Self
pub fn with_config(config: LpgStoreConfig) -> Self
Creates a new LPG store with custom configuration.
Sourcepub fn current_epoch(&self) -> EpochId
pub fn current_epoch(&self) -> EpochId
Returns the current epoch.
Sourcepub fn create_node(&self, labels: &[&str]) -> NodeId
pub fn create_node(&self, labels: &[&str]) -> NodeId
Creates a new node with the given labels.
Sourcepub fn create_node_with_props(
&self,
labels: &[&str],
properties: impl IntoIterator<Item = (impl Into<PropertyKey>, impl Into<Value>)>,
) -> NodeId
pub fn create_node_with_props( &self, labels: &[&str], properties: impl IntoIterator<Item = (impl Into<PropertyKey>, impl Into<Value>)>, ) -> NodeId
Creates a new node with labels and properties.
Sourcepub fn delete_node(&self, id: NodeId) -> bool
pub fn delete_node(&self, id: NodeId) -> bool
Deletes a node and all its edges.
Sourcepub fn node_count(&self) -> usize
pub fn node_count(&self) -> usize
Returns the number of nodes.
Sourcepub fn create_edge(&self, src: NodeId, dst: NodeId, edge_type: &str) -> EdgeId
pub fn create_edge(&self, src: NodeId, dst: NodeId, edge_type: &str) -> EdgeId
Creates a new edge.
Sourcepub fn create_edge_with_props(
&self,
src: NodeId,
dst: NodeId,
edge_type: &str,
properties: impl IntoIterator<Item = (impl Into<PropertyKey>, impl Into<Value>)>,
) -> EdgeId
pub fn create_edge_with_props( &self, src: NodeId, dst: NodeId, edge_type: &str, properties: impl IntoIterator<Item = (impl Into<PropertyKey>, impl Into<Value>)>, ) -> EdgeId
Creates a new edge with properties.
Sourcepub fn delete_edge(&self, id: EdgeId) -> bool
pub fn delete_edge(&self, id: EdgeId) -> bool
Deletes an edge.
Sourcepub fn edge_count(&self) -> usize
pub fn edge_count(&self) -> usize
Returns the number of edges.
Sourcepub fn neighbors(
&self,
node: NodeId,
direction: Direction,
) -> impl Iterator<Item = NodeId> + '_
pub fn neighbors( &self, node: NodeId, direction: Direction, ) -> impl Iterator<Item = NodeId> + '_
Returns an iterator over neighbors of a node.
Sourcepub fn nodes_by_label(&self, label: &str) -> Vec<NodeId>
pub fn nodes_by_label(&self, label: &str) -> Vec<NodeId>
Returns nodes with a specific label.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for LpgStore
impl !RefUnwindSafe for LpgStore
impl Send for LpgStore
impl Sync for LpgStore
impl Unpin for LpgStore
impl UnwindSafe for LpgStore
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