pub struct QueryMethods { /* private fields */ }Expand description
Methods for issuing circles_query requests and decoding the tabular response.
Includes a pager that adds stable ordering (block/tx/log/timestamp) and extracts cursors for streaming.
Implementations§
Source§impl QueryMethods
impl QueryMethods
Sourcepub async fn circles_query<TRow>(
&self,
params: QueryParams,
) -> Result<Vec<TRow>>
pub async fn circles_query<TRow>( &self, params: QueryParams, ) -> Result<Vec<TRow>>
Direct circles_query invocation returning decoded rows.
Sourcepub async fn paged_query<TRow>(
&self,
params: PagedQueryParams,
) -> Result<PagedResult<TRow>>
pub async fn paged_query<TRow>( &self, params: PagedQueryParams, ) -> Result<PagedResult<TRow>>
Convenience wrapper for paged queries using the circles_query method.
Note: The underlying backend expects QueryParams; we translate from the
higher-level PagedQueryParams struct.
pub fn decode_rows<TRow>(
&self,
columns: Vec<String>,
rows: Vec<Vec<Value>>,
) -> Result<Vec<TRow>>where
TRow: DeserializeOwned,
pub fn decode_row<TRow>(
&self,
columns: &[String],
row: Vec<Value>,
) -> Result<TRow>where
TRow: DeserializeOwned,
pub fn extract_cursors( &self, columns: &[String], rows: &[Vec<Value>], cursor_columns: &[CursorColumn], ) -> Vec<Cursor>
Trait Implementations§
Source§impl Clone for QueryMethods
impl Clone for QueryMethods
Source§fn clone(&self) -> QueryMethods
fn clone(&self) -> QueryMethods
Returns a duplicate of the value. Read more
1.0.0 · 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 QueryMethods
impl !RefUnwindSafe for QueryMethods
impl Send for QueryMethods
impl Sync for QueryMethods
impl Unpin for QueryMethods
impl UnsafeUnpin for QueryMethods
impl !UnwindSafe for QueryMethods
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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