use std::path::Path;
use crate::{
error::Result,
graph::{Edge, GraphDiff, Node},
};
pub trait GraphStore: Send + Sync {
fn apply_diff(&mut self, branch: &str, diff: &GraphDiff) -> Result<()>;
fn lookup_symbol(&self, branch: &str, name: &str) -> Result<Vec<Node>>;
fn find_callers(&self, branch: &str, function_name: &str) -> Result<Vec<Node>>;
fn list_definitions(&self, branch: &str, file: &Path) -> Result<Vec<Node>>;
fn list_all_nodes(&self, branch: &str) -> Result<Vec<Node>>;
fn list_all_edges(&self, branch: &str) -> Result<Vec<Edge>>;
fn branch_diff(&self, from: &str, to: &str) -> Result<GraphDiff>;
fn last_indexed_sha(&self, branch: &str) -> Result<Option<String>>;
fn set_last_indexed_sha(&mut self, branch: &str, sha: &str) -> Result<()>;
}