pub struct QueryBuilder { /* private fields */ }Implementations§
Source§impl QueryBuilder
impl QueryBuilder
Sourcepub fn match_attr<V: Value>(
&mut self,
attr: PropertyHandle,
value: V,
) -> Result<NodeHandle, LatticeError>
pub fn match_attr<V: Value>( &mut self, attr: PropertyHandle, value: V, ) -> Result<NodeHandle, LatticeError>
Find vertices by attribute value.
Sourcepub fn match_outgoing(
&mut self,
label: PropertyHandle,
subject: NodeHandle,
) -> Result<NodeHandle, LatticeError>
pub fn match_outgoing( &mut self, label: PropertyHandle, subject: NodeHandle, ) -> Result<NodeHandle, LatticeError>
All vertices that are pointed to by subject via label.
Sourcepub fn match_incoming(
&mut self,
label: PropertyHandle,
target: NodeHandle,
) -> Result<NodeHandle, LatticeError>
pub fn match_incoming( &mut self, label: PropertyHandle, target: NodeHandle, ) -> Result<NodeHandle, LatticeError>
All vertices that point to target via label.
Sourcepub fn group_and(
&mut self,
children: Vec<NodeHandle>,
) -> Result<NodeHandle, LatticeError>
pub fn group_and( &mut self, children: Vec<NodeHandle>, ) -> Result<NodeHandle, LatticeError>
Find a vertex that satisfies multiple features within children.
Sourcepub fn group_or(
&mut self,
children: Vec<NodeHandle>,
) -> Result<NodeHandle, LatticeError>
pub fn group_or( &mut self, children: Vec<NodeHandle>, ) -> Result<NodeHandle, LatticeError>
Find a vertex that satisfies one of multiple features within children.
Sourcepub fn difference(
&mut self,
include: NodeHandle,
exclude: NodeHandle,
) -> Result<NodeHandle, LatticeError>
pub fn difference( &mut self, include: NodeHandle, exclude: NodeHandle, ) -> Result<NodeHandle, LatticeError>
Find a vertex that satisfies include, but does not satisfy exclude.
Source§impl QueryBuilder
impl QueryBuilder
pub fn new() -> Self
pub fn set_root(&mut self, handle: NodeHandle)
pub fn get_root(&self) -> Option<NodeHandle>
Source§impl QueryBuilder
impl QueryBuilder
pub fn compile(&self) -> Result<PreparedQuery, LatticeError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for QueryBuilder
impl RefUnwindSafe for QueryBuilder
impl Send for QueryBuilder
impl Sync for QueryBuilder
impl Unpin for QueryBuilder
impl UnsafeUnpin for QueryBuilder
impl UnwindSafe for QueryBuilder
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> 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