pub struct KnowledgeGraph { /* private fields */ }Implementations§
Source§impl KnowledgeGraph
impl KnowledgeGraph
pub fn get_node(&self, node_id: i64) -> Result<GraphNode>
pub fn find_nodes_by_kind(&self, kind: &str) -> Result<Vec<GraphNode>>
pub fn add_symbol( &self, name: &str, symbol_kind: &str, qualified_name: &str, span: &SourceSpan, language: &str, parent_id: Option<i64>, ) -> Result<i64>
pub fn add_file(&self, path: &str, language: &str, hash: &str) -> Result<i64>
pub fn add_discovery( &self, agent: &str, discovery_type: &str, target: &str, metadata: Value, ) -> Result<i64>
pub fn add_issue( &self, severity: &str, description: &str, rule_id: Option<&str>, ) -> Result<i64>
pub fn add_pattern( &self, pattern_type: &str, confidence: f64, description: &str, ) -> Result<i64>
pub fn add_knowledge( &self, source: &str, title: &str, tags: &[String], summary: &str, ) -> Result<i64>
pub fn add_hotspot( &self, complexity: u32, risk_score: f64, loop_depth: u32, description: &str, ) -> Result<i64>
pub fn add_cfg_block( &self, function_id: i64, block: &CfgBlockData, ) -> Result<i64>
Source§impl KnowledgeGraph
impl KnowledgeGraph
pub fn resolve_fts5_by_magellan_id( &self, magellan_id: i64, ) -> Result<Option<i64>>
pub fn resolve_fts5(&self, keyword: &str) -> Result<Option<i64>>
pub fn insert_bridge_entry( &self, node_id: i64, magellan_id: i64, graph_file: &str, ) -> Result<()>
pub async fn sync_symbols(&self) -> Result<SyncReport>
pub async fn sync_references(&self) -> Result<SyncReport>
pub async fn query(&self, keyword: &str, depth: u32) -> Result<QueryResult>
Source§impl KnowledgeGraph
impl KnowledgeGraph
pub fn add_edge( &self, from: i64, to: i64, edge_type: &str, data: Value, ) -> Result<i64>
pub fn add_correlation( &self, from: i64, to: i64, confidence: f64, agent: &str, ) -> Result<()>
pub fn callers_of( &self, symbol_id: i64, max_depth: u32, ) -> Result<Vec<GraphNode>>
pub fn callees_of( &self, symbol_id: i64, max_depth: u32, ) -> Result<Vec<GraphNode>>
pub fn affected_by(&self, symbol_id: i64, depth: u32) -> Result<Vec<GraphNode>>
pub fn neighbors( &self, node_id: i64, edge_type: &str, direction: Direction, ) -> Result<Vec<GraphNode>>
pub fn shortest_path(&self, from: i64, to: i64) -> Result<Option<Vec<i64>>>
pub fn reachability(&self, from: i64) -> Result<Vec<i64>>
pub fn k_hop( &self, from: i64, depth: u32, direction: Direction, ) -> Result<Vec<i64>>
Auto Trait Implementations§
impl !RefUnwindSafe for KnowledgeGraph
impl !Send for KnowledgeGraph
impl !Sync for KnowledgeGraph
impl !UnwindSafe for KnowledgeGraph
impl Freeze for KnowledgeGraph
impl Unpin for KnowledgeGraph
impl UnsafeUnpin for KnowledgeGraph
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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