Skip to main content

KuzuGraphStore

Struct KuzuGraphStore 

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

Local KuzuDB-backed implementation of GraphStore.

One database file per repo (graph.kuzu), with per-branch node/edge tables inside it. A fresh Connection is created for each operation so we avoid the self-referential lifetime that Mutex<Connection<'db>> would require.

Implementations§

Source§

impl KuzuGraphStore

Source

pub fn open(repo_root: &Path) -> Result<Self>

Open (or create) the graph database for the repo at repo_root.

Trait Implementations§

Source§

impl GraphStore for KuzuGraphStore

Source§

fn apply_diff(&mut self, branch: &str, diff: &GraphDiff) -> Result<()>

Apply an incremental diff to the named branch’s graph.
Source§

fn lookup_symbol(&self, branch: &str, name: &str) -> Result<Vec<Node>>

Find all nodes matching name (exact, case-sensitive) on branch.
Source§

fn find_callers(&self, branch: &str, function_name: &str) -> Result<Vec<Node>>

Find all call-site nodes whose outgoing Calls edge points to a node named function_name on branch.
Source§

fn list_definitions(&self, branch: &str, file: &Path) -> Result<Vec<Node>>

List all top-level definitions in file on branch.
Source§

fn branch_diff(&self, from: &str, to: &str) -> Result<GraphDiff>

Return the graph delta between two branches as a GraphDiff. Nodes/edges present in to but not from are in added_*. Nodes/edges present in from but not to are in removed_*.
Source§

fn list_all_nodes(&self, branch: &str) -> Result<Vec<Node>>

Return all nodes in branch’s graph.
Source§

fn list_all_edges(&self, branch: &str) -> Result<Vec<Edge>>

Return all edges in branch’s graph.
Source§

fn last_indexed_sha(&self, branch_name: &str) -> Result<Option<String>>

Last commit SHA successfully indexed for branch. None if the branch has never been indexed.
Source§

fn set_last_indexed_sha(&mut self, branch_name: &str, sha: &str) -> Result<()>

Persist the commit SHA after a successful index run.

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.