Skip to main content

IndexDatabase

Struct IndexDatabase 

Source
pub struct IndexDatabase {
    pub active_commit_sha: String,
    pub active_worktree_id: String,
    /* private fields */
}

Fields§

§active_commit_sha: String§active_worktree_id: String

Implementations§

Source§

impl IndexDatabase

Source

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

Source

pub fn database_path(&self) -> &Path

Source

pub fn open_config(config: &Config) -> Result<Self>

Source

pub fn migrate(path: &Path) -> Result<SchemaStatus>

Source

pub fn migration_check(path: &Path) -> Result<SchemaStatus>

Source

pub fn set_context(&mut self, commit_sha: &str, worktree_id: &str) -> Result<()>

Source

pub fn rebuild(config: &Config) -> Result<Self>

Source

pub fn rebuild_with_progress<F>(config: &Config, progress: F) -> Result<Self>
where F: FnMut(IndexProgress),

Source

pub fn index_changed(config: &Config) -> Result<Self>

Source

pub fn index_changed_with_progress<F>( config: &Config, progress: F, ) -> Result<Self>
where F: FnMut(IndexProgress),

Source

pub fn index_discover(config: &Config) -> Result<Self>

Source

pub fn index_discover_with_progress<F>( config: &Config, progress: F, ) -> Result<Self>
where F: FnMut(IndexProgress),

Source

pub fn index_targets(&self, config: &Config) -> Result<()>

Source

pub fn status(&self, database: &Path) -> Result<IndexStatus>

Source

pub fn storage_status(&self) -> Result<StorageStatus>

Source

pub fn discovery_status(&self, config: &Config) -> Result<DiscoveryStatus>

Source

pub fn search( &self, query: &str, limit: u32, include_generated: bool, ) -> Result<Vec<SearchHit>>

Source

pub fn search_explain( &self, query: &str, limit: u32, include_generated: bool, ) -> Result<Vec<SearchHit>>

Source

pub fn search_with_graph_meta( &self, query: &str, limit: u32, include_generated: bool, graph_mode: GraphMetaMode, graph_limit: u32, ) -> Result<Vec<SearchHit>>

Source

pub fn search_with_graph_meta_options( &self, query: &str, limit: u32, include_generated: bool, graph_mode: GraphMetaMode, graph_limit: u32, options: SearchOptions, ) -> Result<Vec<SearchHit>>

Source

pub fn search_explain_with_graph_meta( &self, query: &str, limit: u32, include_generated: bool, graph_mode: GraphMetaMode, graph_limit: u32, ) -> Result<Vec<SearchHit>>

Source

pub fn search_explain_with_graph_meta_options( &self, query: &str, limit: u32, include_generated: bool, graph_mode: GraphMetaMode, graph_limit: u32, options: SearchOptions, ) -> Result<Vec<SearchHit>>

Source

pub fn symbols( &self, name: &str, language: Option<Language>, limit: u32, ) -> Result<Vec<SymbolHit>>

Source

pub fn symbol_candidates( &self, selector: &SymbolSelector, ) -> Result<SymbolLookup>

Source

pub fn select_symbol( &self, selector: &SymbolSelector, ) -> Result<Result<Option<SymbolHit>, SymbolDisambiguation>>

Source

pub fn read_chunk(&self, chunk_id: i64) -> Result<Option<ReadChunk>>

Source

pub fn read_chunk_with_graph( &self, chunk_id: i64, graph_mode: GraphMetaMode, graph_limit: u32, ) -> Result<Option<ReadChunk>>

Source

pub fn read_chunk_with_graph_and_memories( &self, chunk_id: i64, graph_mode: GraphMetaMode, graph_limit: u32, include_memories: bool, ) -> Result<Option<ReadChunk>>

Source

pub fn search_hash_baseline( &self, query: &str, limit: u32, include_generated: bool, ) -> Result<Vec<SearchHit>>

Source

pub fn docs_for_symbol( &self, symbol: &str, limit: u32, ) -> Result<Vec<SearchHit>>

Source

pub fn docs_for_selected_symbol( &self, symbol: &SymbolHit, limit: u32, ) -> Result<Vec<SearchHit>>

Source

pub fn git_history_for_path( &self, path: &str, limit: u32, ) -> Result<Vec<PathHistoryItem>>

Source

pub fn git_history_for_symbol( &self, symbol: &str, language: Option<Language>, limit: u32, ) -> Result<Vec<SymbolHistoryItem>>

Source

pub fn commits_touching_query( &self, query: &str, limit: u32, ) -> Result<Vec<QueryCommitHit>>

Source

pub fn git_blame_chunk( &self, chunk_id: i64, ) -> Result<Option<ChunkBlameSummary>>

Source

pub fn github_sync_from_refs(&self, offline: bool) -> Result<GitHubSyncReport>

Source

pub fn github_sync_from_refs_with_progress( &self, offline: bool, progress: impl FnMut(GitHubSyncProgress), ) -> Result<GitHubSyncReport>

Source

pub fn github_sync_issue( &self, issue_ref: &str, offline: bool, ) -> Result<GitHubSyncReport>

Source

pub fn github_refs_for_path( &self, path: &str, limit: u32, ) -> Result<Vec<GitHubRef>>

Source

pub fn github_sync_status(&self) -> Result<GitHubStatus>

Source

pub fn papertrail_for_chunk( &self, chunk_id: i64, limit: u32, ) -> Result<Option<Papertrail>>

Source

pub fn papertrail_for_symbol( &self, symbol: &str, language: Option<Language>, limit: u32, ) -> Result<Option<Papertrail>>

Source

pub fn papertrail_for_selected_symbol( &self, symbol: &SymbolHit, limit: u32, ) -> Result<Papertrail>

Source

pub fn papertrail_for_commit( &self, commit_hash: &str, limit: u32, ) -> Result<Papertrail>

Source

pub fn local_ai_status(&self) -> Result<LocalAiStatus>

Source

pub fn list_models(&self) -> Result<Vec<ModelInfo>>

Source

pub fn install_model(&self, model_id: &str) -> Result<ModelInfo>

Source

pub fn reconcile( &self, limit: Option<u32>, batch_size: Option<u32>, ) -> Result<ReconcileReport>

Source

pub fn reconcile_plan(&self) -> Result<ReconcilePlan>

Source

pub fn reconcile_with_progress( &self, limit: Option<u32>, batch_size: Option<u32>, force: bool, progress: impl FnMut(ReconcileProgress), ) -> Result<ReconcileReport>

Source

pub fn reconcile_with_options_progress( &self, options: ReconcileOptions, progress: impl FnMut(ReconcileProgress), ) -> Result<ReconcileReport>

Source

pub fn current_embedding_count(&self, model_id: &str) -> Result<u64>

Source

pub fn heal_index(&self, limit: Option<u32>) -> Result<HealIndexReport>

Source

pub fn ffi_surface(&self, limit: u32) -> Result<Vec<ImpactItem>>

Source

pub fn find_callers(&self, symbol: &str, limit: u32) -> Result<Vec<GraphHop>>

Source

pub fn find_callers_with_options( &self, symbol: &str, limit: u32, options: &GraphTraversalOptions, ) -> Result<Vec<GraphHop>>

Source

pub fn trace_callees(&self, symbol: &str, limit: u32) -> Result<Vec<GraphHop>>

Source

pub fn trace_callees_with_options( &self, symbol: &str, limit: u32, options: &GraphTraversalOptions, ) -> Result<Vec<GraphHop>>

Source

pub fn graph_traversal_report( &self, tool: &str, symbol: &SymbolHit, reverse: bool, limit: u32, options: &GraphTraversalOptions, ) -> Result<GraphTraversalReport>

Source

pub fn compare_graph_to_text( &self, symbol: &SymbolHit, pattern: &str, limit: u32, options: &GraphTraversalOptions, include_tests: bool, ) -> Result<CompareGraphTextReport>

Source

pub fn impact_surface(&self, query: &str, limit: u32) -> Result<Vec<ImpactItem>>

Source

pub fn impact_surface_with_options( &self, query: &str, limit: u32, resolution_mode: GraphResolutionMode, ) -> Result<Vec<ImpactItem>>

Source

pub fn impact_surface_for_selected_symbol( &self, symbol: &SymbolHit, limit: u32, resolution_mode: GraphResolutionMode, ) -> Result<Vec<ImpactItem>>

Source

pub fn impact_surface_report_for_selected_symbol( &self, symbol: &SymbolHit, limit: u32, options: &ImpactSurfaceOptions, ) -> Result<ImpactSurfaceReport>

Source

pub fn repo_brief(&self, options: RepoBriefOptions) -> Result<RepoBrief>

Source

pub fn memory_create( &self, request: RepoMemoryCreate, ) -> Result<RepoMemoryCreateResult>

Source

pub fn memory_update(&self, update: RepoMemoryUpdate) -> Result<RepoMemory>

Source

pub fn memory_mark_obsolete(&self, memory_id: &str) -> Result<RepoMemory>

Source

pub fn memory_for_symbol( &self, symbol: &SymbolHit, limit: u32, ) -> Result<Vec<RepoMemory>>

Source

pub fn memory_for_path(&self, path: &str, limit: u32) -> Result<Vec<RepoMemory>>

Source

pub fn memory_for_edges( &self, edge_ids: &[i64], limit: u32, ) -> Result<Vec<RepoMemory>>

Source

pub fn memory_evidence_for_symbol_and_edges( &self, symbol: &SymbolHit, edge_ids: &[i64], limit: u32, ) -> Result<RepoMemoryEvidence>

Source

pub fn memory_for_call_path_hash( &self, edge_sequence_hash: &str, limit: u32, ) -> Result<Vec<RepoMemory>>

Source

pub fn memory_validate(&self) -> Result<RepoMemoryValidationReport>

Source

pub fn rebuild_fts(&self) -> Result<()>

Source

pub fn sync_fts(&self) -> Result<()>

Source

pub fn heal_file(&self, path: &Path) -> Result<()>

Trait Implementations§

Source§

impl Debug for IndexDatabase

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V