pub struct QueryEngine { /* private fields */ }Implementations§
Source§impl QueryEngine
impl QueryEngine
pub fn new(store: Box<dyn GraphStore>) -> Self
pub fn with_max_nodes(store: Box<dyn GraphStore>, max_nodes: usize) -> Self
pub fn store_ref(&self) -> &dyn GraphStore
pub fn query_text( &self, query: &str, mode: &str, depth: usize, token_budget: Option<usize>, context_filter: Option<&str>, ) -> Result<QueryResult>
pub fn dijkstra_path( &self, src: &str, tgt: &str, ) -> Result<Option<(Vec<Node>, f64)>>
pub fn dfs( &self, src: &str, depth: usize, relation_filter: Option<&str>, ) -> Result<Vec<Node>>
pub fn get_node_by_label(&self, label: &str) -> Result<Option<Node>>
pub fn get_node_by_id(&self, id: &str) -> Result<Option<Node>>
pub fn resolve_node(&self, id_or_label: &str) -> Result<Option<Node>>
pub fn get_neighbors( &self, id: &str, relation_filter: Option<&str>, ) -> Result<Vec<(Node, Edge)>>
pub fn shortest_path(&self, src: &str, tgt: &str) -> Result<Option<Vec<Node>>>
pub fn graph_stats(&self) -> Result<String>
pub fn get_community(&self, community_id: usize) -> Result<Vec<Node>>
pub fn god_nodes(&self, top_n: usize) -> Result<Vec<Node>>
pub fn shortest_path_with_max_hops( &self, src: &str, tgt: &str, max_hops: usize, ) -> Result<Option<Vec<Node>>>
pub fn infer_context_filter(question: &str) -> Option<String>
pub fn resolve_context_filter( question: &str, explicit: Option<&str>, ) -> Option<String>
pub fn detailed_stats(&self) -> Result<String>
Auto Trait Implementations§
impl !RefUnwindSafe for QueryEngine
impl !UnwindSafe for QueryEngine
impl Freeze for QueryEngine
impl Send for QueryEngine
impl Sync for QueryEngine
impl Unpin for QueryEngine
impl UnsafeUnpin for QueryEngine
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> 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