pub struct GraphTableRead { /* private fields */ }Expand description
Read-only graph table providing efficient edge traversal with temporal support.
Implementations§
Source§impl GraphTableRead
impl GraphTableRead
Sourcepub fn open(txn: &ReadTransaction, name: &str) -> Result<Self, StorageError>
pub fn open(txn: &ReadTransaction, name: &str) -> Result<Self, StorageError>
Opens a graph table for reading.
Sourcepub fn get_edge(
&self,
source: &Uuid,
edge_type: &str,
target: &Uuid,
) -> Result<Option<Edge>, StorageError>
pub fn get_edge( &self, source: &Uuid, edge_type: &str, target: &Uuid, ) -> Result<Option<Edge>, StorageError>
Retrieves a specific edge by source, edge_type, and target.
Returns None if the edge doesn’t exist or has been soft-deleted. Use get_edge_at() for temporal queries.
Sourcepub fn get_edge_at(
&self,
source: &Uuid,
edge_type: &str,
target: &Uuid,
timestamp: u64,
) -> Result<Option<Edge>, StorageError>
pub fn get_edge_at( &self, source: &Uuid, edge_type: &str, target: &Uuid, timestamp: u64, ) -> Result<Option<Edge>, StorageError>
Retrieves a specific edge at a given timestamp.
Returns the edge if it existed at the specified timestamp (created_at <= timestamp and either not deleted or deleted_at > timestamp).
Sourcepub fn outgoing_edges(
&self,
source: &Uuid,
) -> Result<OutgoingEdgeIter<'_>, StorageError>
pub fn outgoing_edges( &self, source: &Uuid, ) -> Result<OutgoingEdgeIter<'_>, StorageError>
Returns an iterator over all outgoing edges from the given source vertex.
By default, excludes soft-deleted edges. Use outgoing_edges_with_deleted() to include them.
Sourcepub fn outgoing_edges_with_deleted(
&self,
source: &Uuid,
) -> Result<OutgoingEdgeIter<'_>, StorageError>
pub fn outgoing_edges_with_deleted( &self, source: &Uuid, ) -> Result<OutgoingEdgeIter<'_>, StorageError>
Returns an iterator over all outgoing edges including soft-deleted ones.
Sourcepub fn incoming_edges(
&self,
target: &Uuid,
) -> Result<IncomingEdgeIter<'_>, StorageError>
pub fn incoming_edges( &self, target: &Uuid, ) -> Result<IncomingEdgeIter<'_>, StorageError>
Returns an iterator over all incoming edges to the given target vertex.
By default, excludes soft-deleted edges. Use incoming_edges_with_deleted() to include them.
Sourcepub fn incoming_edges_with_deleted(
&self,
target: &Uuid,
) -> Result<IncomingEdgeIter<'_>, StorageError>
pub fn incoming_edges_with_deleted( &self, target: &Uuid, ) -> Result<IncomingEdgeIter<'_>, StorageError>
Returns an iterator over all incoming edges including soft-deleted ones.
Sourcepub fn all_edges(&self) -> Result<AllEdgesIter<'_>, StorageError>
pub fn all_edges(&self) -> Result<AllEdgesIter<'_>, StorageError>
Returns an iterator over all edges in the graph.
By default, excludes soft-deleted edges. Use all_edges_with_deleted() to include them.
Sourcepub fn all_edges_with_deleted(&self) -> Result<AllEdgesIter<'_>, StorageError>
pub fn all_edges_with_deleted(&self) -> Result<AllEdgesIter<'_>, StorageError>
Returns an iterator over all edges including soft-deleted ones.
Sourcepub fn len(&self) -> Result<u64, StorageError>
pub fn len(&self) -> Result<u64, StorageError>
Returns the number of edges stored in this table.
Sourcepub fn is_empty(&self) -> Result<bool, StorageError>
pub fn is_empty(&self) -> Result<bool, StorageError>
Returns true if the table contains no edges.