pub struct SqliteEdgeRepository { /* private fields */ }Expand description
SQLite-backed edge repository.
Implementations§
Source§impl SqliteEdgeRepository
impl SqliteEdgeRepository
Sourcepub fn new(conn: Arc<Mutex<Connection>>) -> Self
pub fn new(conn: Arc<Mutex<Connection>>) -> Self
Create a new repository backed by the given connection.
Trait Implementations§
Source§impl Clone for SqliteEdgeRepository
impl Clone for SqliteEdgeRepository
Source§fn clone(&self) -> SqliteEdgeRepository
fn clone(&self) -> SqliteEdgeRepository
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 Debug for SqliteEdgeRepository
impl Debug for SqliteEdgeRepository
Source§impl EdgeRepository for SqliteEdgeRepository
impl EdgeRepository for SqliteEdgeRepository
Source§fn insert(&self, edge: &Edge) -> Result<Edge, StorageError>
fn insert(&self, edge: &Edge) -> Result<Edge, StorageError>
Insert a new edge. Returns the edge with its assigned ID.
Source§fn find_by_source(&self, source_id: NodeId) -> Result<Vec<Edge>, StorageError>
fn find_by_source(&self, source_id: NodeId) -> Result<Vec<Edge>, StorageError>
Find all edges originating from the given source node.
Source§fn find_by_target(&self, target_id: NodeId) -> Result<Vec<Edge>, StorageError>
fn find_by_target(&self, target_id: NodeId) -> Result<Vec<Edge>, StorageError>
Find all edges targeting the given node.
Source§fn find_by_type(&self, edge_type: EdgeType) -> Result<Vec<Edge>, StorageError>
fn find_by_type(&self, edge_type: EdgeType) -> Result<Vec<Edge>, StorageError>
Find all edges of the given type.
Source§fn delete_by_branch(&self, branch_id: &BranchId) -> Result<usize, StorageError>
fn delete_by_branch(&self, branch_id: &BranchId) -> Result<usize, StorageError>
Delete all edges for the given branch. Returns the number of rows deleted.
Auto Trait Implementations§
impl Freeze for SqliteEdgeRepository
impl RefUnwindSafe for SqliteEdgeRepository
impl Send for SqliteEdgeRepository
impl Sync for SqliteEdgeRepository
impl Unpin for SqliteEdgeRepository
impl UnsafeUnpin for SqliteEdgeRepository
impl UnwindSafe for SqliteEdgeRepository
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