pub struct GraphQueryBuilder { /* private fields */ }Expand description
Builder for graph traversal queries
Implementations§
Source§impl GraphQueryBuilder
impl GraphQueryBuilder
pub fn from_node(label: impl Into<String>) -> GraphQueryBuilder
pub fn from_id(id: EntityId) -> GraphQueryBuilder
Sourcepub fn traverse(self, edge_label: impl Into<String>) -> GraphQueryBuilder
pub fn traverse(self, edge_label: impl Into<String>) -> GraphQueryBuilder
Traverse outgoing edges with given label
Sourcepub fn out(self) -> GraphQueryBuilder
pub fn out(self) -> GraphQueryBuilder
Traverse outgoing edges (any label)
Sourcepub fn in_(self) -> GraphQueryBuilder
pub fn in_(self) -> GraphQueryBuilder
Traverse incoming edges (any label)
Sourcepub fn both(self) -> GraphQueryBuilder
pub fn both(self) -> GraphQueryBuilder
Traverse in both directions
Sourcepub fn depth(self, depth: u32) -> GraphQueryBuilder
pub fn depth(self, depth: u32) -> GraphQueryBuilder
Set maximum traversal depth
Sourcepub fn where_(self, field: impl Into<String>) -> WhereClause<GraphQueryBuilder>
pub fn where_(self, field: impl Into<String>) -> WhereClause<GraphQueryBuilder>
Add a filter condition
Sourcepub fn ranked_by(self, vector: &[f32]) -> GraphQueryBuilder
pub fn ranked_by(self, vector: &[f32]) -> GraphQueryBuilder
Rank results by vector similarity
Sourcepub fn limit(self, n: usize) -> GraphQueryBuilder
pub fn limit(self, n: usize) -> GraphQueryBuilder
Limit results
Sourcepub fn execute(
self,
store: &Arc<UnifiedStore>,
) -> Result<QueryResult, ExecutionError>
pub fn execute( self, store: &Arc<UnifiedStore>, ) -> Result<QueryResult, ExecutionError>
Execute the query
Trait Implementations§
Source§impl Clone for GraphQueryBuilder
impl Clone for GraphQueryBuilder
Source§fn clone(&self) -> GraphQueryBuilder
fn clone(&self) -> GraphQueryBuilder
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for GraphQueryBuilder
impl RefUnwindSafe for GraphQueryBuilder
impl Send for GraphQueryBuilder
impl Sync for GraphQueryBuilder
impl Unpin for GraphQueryBuilder
impl UnsafeUnpin for GraphQueryBuilder
impl UnwindSafe for GraphQueryBuilder
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request