pub struct PathQuery<'a> { /* private fields */ }Expand description
Path-native query builder for TCH
Implementations§
Source§impl<'a> PathQuery<'a>
impl<'a> PathQuery<'a>
Sourcepub fn from_path(conn: &'a ToonConnection, path: &str) -> Self
pub fn from_path(conn: &'a ToonConnection, path: &str) -> Self
Start query from path - O(|path|) resolution
Sourcepub fn filter(
self,
field: &str,
op: CompareOp,
value: impl Into<ToonValue>,
) -> Self
pub fn filter( self, field: &str, op: CompareOp, value: impl Into<ToonValue>, ) -> Self
Add predicate (pushed to ColumnStore scan)
Sourcepub fn where_eq(self, field: &str, value: impl Into<ToonValue>) -> Self
pub fn where_eq(self, field: &str, value: impl Into<ToonValue>) -> Self
Shorthand for equality filter
Sourcepub fn where_gt(self, field: &str, value: impl Into<ToonValue>) -> Self
pub fn where_gt(self, field: &str, value: impl Into<ToonValue>) -> Self
Shorthand for greater-than filter
Sourcepub fn where_lt(self, field: &str, value: impl Into<ToonValue>) -> Self
pub fn where_lt(self, field: &str, value: impl Into<ToonValue>) -> Self
Shorthand for less-than filter
Sourcepub fn where_like(self, field: &str, pattern: &str) -> Self
pub fn where_like(self, field: &str, pattern: &str) -> Self
Shorthand for LIKE filter
Sourcepub fn select(self, columns: &[impl AsRef<str>]) -> Self
pub fn select(self, columns: &[impl AsRef<str>]) -> Self
Select specific columns (alias for project)
Sourcepub fn execute(self) -> Result<ToonResult<'a>>
pub fn execute(self) -> Result<ToonResult<'a>>
Execute and return ToonResult for streaming output
Auto Trait Implementations§
impl<'a> Freeze for PathQuery<'a>
impl<'a> !RefUnwindSafe for PathQuery<'a>
impl<'a> Send for PathQuery<'a>
impl<'a> Sync for PathQuery<'a>
impl<'a> Unpin for PathQuery<'a>
impl<'a> !UnwindSafe for PathQuery<'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
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