pub trait ScanStore: ConfigStore + SymbolLookup {
// Required methods
fn begin_scan(&self) -> Result<i64, DbError>;
fn complete_scan(
&self,
scan_id: i64,
file_count: i64,
symbol_count: i64,
dep_count: i64,
) -> Result<(), DbError>;
fn upsert_file(
&self,
scan_id: i64,
path: &str,
language: &str,
size_bytes: i64,
content_hash: &str,
last_modified: u64,
parse_status: ParseStatus,
) -> Result<i64, DbError>;
fn get_file_hash(&self, path: &str) -> Result<Option<String>, DbError>;
fn get_all_file_paths(&self) -> Result<HashMap<String, i64>, DbError>;
fn delete_file(&self, file_id: i64) -> Result<(), DbError>;
fn insert_symbol(
&self,
file_id: i64,
parent_id: Option<i64>,
name: &str,
kind: SymbolKind,
signature: Option<&str>,
start_line: i64,
end_line: i64,
start_byte: i64,
end_byte: i64,
) -> Result<i64, DbError>;
fn delete_symbols_for_file(&self, file_id: i64) -> Result<(), DbError>;
fn insert_dependency(
&self,
source_file_id: i64,
source_symbol_id: Option<i64>,
target_file_id: Option<i64>,
target_symbol_id: Option<i64>,
dep_type: DepType,
level: DepLevel,
raw_import: Option<&str>,
) -> Result<i64, DbError>;
fn delete_deps_for_file(&self, file_id: i64) -> Result<(), DbError>;
}Expand description
Storage operations needed by the scan pipeline.
Required Methods§
fn begin_scan(&self) -> Result<i64, DbError>
fn complete_scan( &self, scan_id: i64, file_count: i64, symbol_count: i64, dep_count: i64, ) -> Result<(), DbError>
fn upsert_file( &self, scan_id: i64, path: &str, language: &str, size_bytes: i64, content_hash: &str, last_modified: u64, parse_status: ParseStatus, ) -> Result<i64, DbError>
fn get_file_hash(&self, path: &str) -> Result<Option<String>, DbError>
fn get_all_file_paths(&self) -> Result<HashMap<String, i64>, DbError>
fn delete_file(&self, file_id: i64) -> Result<(), DbError>
fn insert_symbol( &self, file_id: i64, parent_id: Option<i64>, name: &str, kind: SymbolKind, signature: Option<&str>, start_line: i64, end_line: i64, start_byte: i64, end_byte: i64, ) -> Result<i64, DbError>
fn delete_symbols_for_file(&self, file_id: i64) -> Result<(), DbError>
fn insert_dependency( &self, source_file_id: i64, source_symbol_id: Option<i64>, target_file_id: Option<i64>, target_symbol_id: Option<i64>, dep_type: DepType, level: DepLevel, raw_import: Option<&str>, ) -> Result<i64, DbError>
fn delete_deps_for_file(&self, file_id: i64) -> Result<(), DbError>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".