pub struct CacheDb { /* private fields */ }Implementations§
Source§impl CacheDb
impl CacheDb
pub fn open(path: &Path) -> Result<Self>
pub fn open_in_memory() -> Result<Self>
pub fn get_file_by_path(&self, path: &str) -> Result<Option<CachedFile>>
pub fn upsert_file( &self, path: &str, language: &str, hash: &str, size_bytes: i64, loc: i64, ) -> Result<i64>
pub fn delete_file(&self, path: &str) -> Result<()>
pub fn insert_symbols(&self, file_id: i64, symbols: &[Symbol]) -> Result<()>
pub fn insert_imports(&self, file_id: i64, imports: &[Import]) -> Result<()>
pub fn insert_call_sites( &self, file_id: i64, call_sites: &[CallSite], ) -> Result<()>
pub fn get_symbols_by_file(&self, file_id: i64) -> Result<Vec<Symbol>>
pub fn get_imports_by_file(&self, file_id: i64) -> Result<Vec<CachedImport>>
pub fn get_all_imports(&self) -> Result<Vec<CachedImport>>
pub fn get_call_sites_by_file( &self, file_id: i64, ) -> Result<Vec<CachedCallSite>>
pub fn get_all_call_sites(&self) -> Result<Vec<CachedCallSite>>
pub fn clear_edges_by_kind(&self, kind: EdgeKind) -> Result<()>
pub fn clear_symbol_edges_by_kind(&self, kind: &str) -> Result<()>
pub fn clear_search_index(&self) -> Result<()>
pub fn clear_search_vectors(&self, backend: Option<&str>) -> Result<()>
pub fn has_search_vector(&self, node_id: i64, backend: &str) -> Result<bool>
pub fn prune_search_vectors_to_index(&self, backend: &str) -> Result<()>
pub fn insert_edge( &self, source_file_id: i64, target_file_id: Option<i64>, target_path: Option<&str>, kind: EdgeKind, confidence: f64, ) -> Result<()>
pub fn get_edges_by_kind(&self, kind: EdgeKind) -> Result<Vec<CachedEdge>>
pub fn insert_symbol_edges(&self, edges: &[CachedSymbolEdge]) -> Result<()>
pub fn get_symbol_edges_by_kind( &self, kind: &str, ) -> Result<Vec<CachedSymbolEdge>>
pub fn insert_search_document( &self, node_id: i64, file_path: &str, kind: &str, name: &str, signature: Option<&str>, doc_comment: Option<&str>, imports: &str, content: &str, ) -> Result<()>
pub fn insert_search_vector( &self, node_id: i64, file_path: &str, kind: &str, name: &str, signature: Option<&str>, backend: &str, vector: &[f32], ) -> Result<()>
pub fn search_nodes_fts( &self, query: &str, kind: Option<&str>, limit: usize, ) -> Result<Vec<CachedSearchHit>>
pub fn get_search_vectors( &self, backend: &str, kind: Option<&str>, ) -> Result<Vec<CachedSearchVector>>
pub fn set_config(&self, key: &str, value: &str) -> Result<()>
pub fn get_config(&self, key: &str) -> Result<Option<String>>
pub fn file_count(&self) -> Result<i64>
pub fn symbol_count(&self) -> Result<i64>
pub fn import_count(&self) -> Result<i64>
pub fn call_site_count(&self) -> Result<i64>
pub fn symbol_edge_count(&self) -> Result<i64>
pub fn edge_count(&self) -> Result<i64>
pub fn get_all_files(&self) -> Result<Vec<CachedFile>>
pub fn language_stats(&self) -> Result<Vec<(String, i64)>>
Auto Trait Implementations§
impl !Freeze for CacheDb
impl !RefUnwindSafe for CacheDb
impl Send for CacheDb
impl !Sync for CacheDb
impl Unpin for CacheDb
impl UnsafeUnpin for CacheDb
impl !UnwindSafe for CacheDb
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