pub struct GraphDb { /* private fields */ }Expand description
SQLite-backed code graph database.
Implementations§
Source§impl GraphDb
impl GraphDb
Sourcepub fn insert_node(&self, node: &Node) -> Result<i64>
pub fn insert_node(&self, node: &Node) -> Result<i64>
Insert a node and return its ID.
Sourcepub fn insert_edge(&self, edge: &Edge) -> Result<()>
pub fn insert_edge(&self, edge: &Edge) -> Result<()>
Insert an edge.
Sourcepub fn search_nodes(&self, query: &str) -> Result<Vec<Node>>
pub fn search_nodes(&self, query: &str) -> Result<Vec<Node>>
Search nodes by name (case-insensitive substring match).
Sourcepub fn edges_from(&self, node_id: i64) -> Result<Vec<Edge>>
pub fn edges_from(&self, node_id: i64) -> Result<Vec<Edge>>
Get all edges from a node (outgoing relationships).
Sourcepub fn node_count(&self) -> Result<usize>
pub fn node_count(&self) -> Result<usize>
Get total node count.
Sourcepub fn edge_count(&self) -> Result<usize>
pub fn edge_count(&self) -> Result<usize>
Get total edge count.
Auto Trait Implementations§
impl !Freeze for GraphDb
impl !RefUnwindSafe for GraphDb
impl Send for GraphDb
impl !Sync for GraphDb
impl Unpin for GraphDb
impl UnsafeUnpin for GraphDb
impl !UnwindSafe for GraphDb
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