pub struct GraphQuery { /* private fields */ }
Expand description
Graph query engine for advanced operations
Implementations§
Source§impl GraphQuery
impl GraphQuery
Sourcepub fn new(graph: Arc<GraphStore>) -> Self
pub fn new(graph: Arc<GraphStore>) -> Self
Create a new graph query engine
Sourcepub fn find_path(
&self,
source: &NodeId,
target: &NodeId,
max_depth: Option<usize>,
) -> Result<Option<PathResult>>
pub fn find_path( &self, source: &NodeId, target: &NodeId, max_depth: Option<usize>, ) -> Result<Option<PathResult>>
Find the shortest path between two nodes
Sourcepub fn find_references(&self, node_id: &NodeId) -> Result<Vec<SymbolReference>>
pub fn find_references(&self, node_id: &NodeId) -> Result<Vec<SymbolReference>>
Find all references to a symbol (incoming edges)
Sourcepub fn find_dependencies(
&self,
node_id: &NodeId,
dependency_type: DependencyType,
) -> Result<Vec<SymbolDependency>>
pub fn find_dependencies( &self, node_id: &NodeId, dependency_type: DependencyType, ) -> Result<Vec<SymbolDependency>>
Find all dependencies of a node (outgoing edges)
Sourcepub fn search_symbols(
&self,
pattern: &str,
symbol_types: Option<Vec<NodeKind>>,
limit: Option<usize>,
) -> Result<Vec<SymbolInfo>>
pub fn search_symbols( &self, pattern: &str, symbol_types: Option<Vec<NodeKind>>, limit: Option<usize>, ) -> Result<Vec<SymbolInfo>>
Search symbols by name pattern (regex or fuzzy)
Sourcepub fn search_symbols_with_inheritance(
&self,
pattern: &str,
symbol_types: Option<Vec<NodeKind>>,
inheritance_filters: Option<Vec<InheritanceFilter>>,
limit: Option<usize>,
) -> Result<Vec<SymbolInfo>>
pub fn search_symbols_with_inheritance( &self, pattern: &str, symbol_types: Option<Vec<NodeKind>>, inheritance_filters: Option<Vec<InheritanceFilter>>, limit: Option<usize>, ) -> Result<Vec<SymbolInfo>>
Search symbols by name pattern with inheritance filters
Sourcepub fn get_inheritance_info(&self, node_id: &NodeId) -> Result<InheritanceInfo>
pub fn get_inheritance_info(&self, node_id: &NodeId) -> Result<InheritanceInfo>
Get comprehensive inheritance information for a class
Sourcepub fn get_base_classes(
&self,
node_id: &NodeId,
) -> Result<Vec<InheritanceRelation>>
pub fn get_base_classes( &self, node_id: &NodeId, ) -> Result<Vec<InheritanceRelation>>
Get direct base classes of a class
Sourcepub fn get_subclasses(
&self,
node_id: &NodeId,
) -> Result<Vec<InheritanceRelation>>
pub fn get_subclasses( &self, node_id: &NodeId, ) -> Result<Vec<InheritanceRelation>>
Get direct subclasses of a class
Sourcepub fn get_metaclass(
&self,
node_id: &NodeId,
) -> Result<Option<InheritanceRelation>>
pub fn get_metaclass( &self, node_id: &NodeId, ) -> Result<Option<InheritanceRelation>>
Get the metaclass of a class (if any)
Sourcepub fn get_mixins(&self, node_id: &NodeId) -> Result<Vec<InheritanceRelation>>
pub fn get_mixins(&self, node_id: &NodeId) -> Result<Vec<InheritanceRelation>>
Get mixins used by a class
Sourcepub fn calculate_method_resolution_order(
&self,
node_id: &NodeId,
) -> Result<Vec<String>>
pub fn calculate_method_resolution_order( &self, node_id: &NodeId, ) -> Result<Vec<String>>
Calculate method resolution order (simplified)
Sourcepub fn get_dynamic_attributes(
&self,
node_id: &NodeId,
) -> Result<Vec<DynamicAttribute>>
pub fn get_dynamic_attributes( &self, node_id: &NodeId, ) -> Result<Vec<DynamicAttribute>>
Get dynamic attributes potentially created by metaclasses or decorators
Sourcepub fn is_metaclass(&self, node_id: &NodeId) -> Result<bool>
pub fn is_metaclass(&self, node_id: &NodeId) -> Result<bool>
Check if a class is a metaclass
Sourcepub fn get_full_inheritance_chain(
&self,
node_id: &NodeId,
) -> Result<Vec<String>>
pub fn get_full_inheritance_chain( &self, node_id: &NodeId, ) -> Result<Vec<String>>
Get the full inheritance chain up to the root
Sourcepub fn inherits_from(
&self,
node_id: &NodeId,
base_class_name: &str,
) -> Result<bool>
pub fn inherits_from( &self, node_id: &NodeId, base_class_name: &str, ) -> Result<bool>
Check if a class inherits from a specific base class
Auto Trait Implementations§
impl Freeze for GraphQuery
impl !RefUnwindSafe for GraphQuery
impl Send for GraphQuery
impl Sync for GraphQuery
impl Unpin for GraphQuery
impl !UnwindSafe for GraphQuery
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
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