GraphTableRead

Struct GraphTableRead 

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

Read-only graph table providing efficient edge traversal with temporal support.

Implementations§

Source§

impl GraphTableRead

Source

pub fn open(txn: &ReadTransaction, name: &str) -> Result<Self, StorageError>

Opens a graph table for reading.

Source

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.

Source

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).

Source

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.

Source

pub fn outgoing_edges_with_deleted( &self, source: &Uuid, ) -> Result<OutgoingEdgeIter<'_>, StorageError>

Returns an iterator over all outgoing edges including soft-deleted ones.

Source

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.

Source

pub fn incoming_edges_with_deleted( &self, target: &Uuid, ) -> Result<IncomingEdgeIter<'_>, StorageError>

Returns an iterator over all incoming edges including soft-deleted ones.

Source

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.

Source

pub fn all_edges_with_deleted(&self) -> Result<AllEdgesIter<'_>, StorageError>

Returns an iterator over all edges including soft-deleted ones.

Source

pub fn len(&self) -> Result<u64, StorageError>

Returns the number of edges stored in this table.

Source

pub fn is_empty(&self) -> Result<bool, StorageError>

Returns true if the table contains no edges.

Trait Implementations§

Source§

impl EdgeSource for GraphTableRead

Source§

type Iter<'a> = AllEdgesIter<'a> where Self: 'a

Iterator type over edges
Source§

fn all_edges(&self) -> Result<Self::Iter<'_>, StorageError>

Returns an iterator over all edges in the graph. Read more
Source§

fn edge_count(&self) -> Result<u64, StorageError>

Returns the number of edges.
Source§

fn is_empty(&self) -> Result<bool, StorageError>

Returns true if empty.

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> 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, 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.