pub struct QueryBuilder<'a> { /* private fields */ }Expand description
Fluent API for building node queries
Implementations§
Source§impl<'a> QueryBuilder<'a>
impl<'a> QueryBuilder<'a>
pub fn new(engine: &'a QueryEngine<'a>, node_type: impl Into<String>) -> Self
Sourcepub fn where_cond(
self,
field: impl Into<String>,
op: &str,
value: impl Into<String>,
) -> Self
pub fn where_cond( self, field: impl Into<String>, op: &str, value: impl Into<String>, ) -> Self
Add a WHERE condition
Sourcepub fn where_num(self, field: impl Into<String>, op: &str, value: i64) -> Self
pub fn where_num(self, field: impl Into<String>, op: &str, value: i64) -> Self
Add numeric WHERE condition
Sourcepub fn return_fields(self, fields: Vec<&str>) -> Self
pub fn return_fields(self, fields: Vec<&str>) -> Self
Set fields to return
Sourcepub fn execute(self) -> Result<QueryResult>
pub fn execute(self) -> Result<QueryResult>
Execute the built query
Auto Trait Implementations§
impl<'a> Freeze for QueryBuilder<'a>
impl<'a> RefUnwindSafe for QueryBuilder<'a>
impl<'a> Send for QueryBuilder<'a>
impl<'a> Sync for QueryBuilder<'a>
impl<'a> Unpin for QueryBuilder<'a>
impl<'a> UnsafeUnpin for QueryBuilder<'a>
impl<'a> UnwindSafe for QueryBuilder<'a>
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