pub struct Cursor<S> where
S: SelectorTrait, { /* private fields */ }
Expand description
Cursor pagination
Implementations
sourceimpl<S> Cursor<S> where
S: SelectorTrait,
impl<S> Cursor<S> where
S: SelectorTrait,
sourcepub fn new<C>(query: SelectStatement, table: DynIden, order_columns: C) -> Self where
C: IntoIdentity,
pub fn new<C>(query: SelectStatement, table: DynIden, order_columns: C) -> Self where
C: IntoIdentity,
Initialize a cursor
sourcepub fn before<V>(&mut self, values: V) -> &mut Self where
V: IntoValueTuple,
pub fn before<V>(&mut self, values: V) -> &mut Self where
V: IntoValueTuple,
Filter paginated result with corresponding column less than the input value
sourcepub fn after<V>(&mut self, values: V) -> &mut Self where
V: IntoValueTuple,
pub fn after<V>(&mut self, values: V) -> &mut Self where
V: IntoValueTuple,
Filter paginated result with corresponding column greater than the input value
sourcepub fn first(&mut self, num_rows: u64) -> &mut Self
pub fn first(&mut self, num_rows: u64) -> &mut Self
Limit result set to only first N rows in ascending order of the order by column
Trait Implementations
sourceimpl<S: Clone> Clone for Cursor<S> where
S: SelectorTrait,
impl<S: Clone> Clone for Cursor<S> where
S: SelectorTrait,
sourceimpl<S: Debug> Debug for Cursor<S> where
S: SelectorTrait,
impl<S: Debug> Debug for Cursor<S> where
S: SelectorTrait,
sourceimpl<S> QueryOrder for Cursor<S> where
S: SelectorTrait,
impl<S> QueryOrder for Cursor<S> where
S: SelectorTrait,
type QueryStatement = SelectStatement
sourcefn query(&mut self) -> &mut SelectStatement
fn query(&mut self) -> &mut SelectStatement
Add the query to perform an ORDER BY operation
sourcefn order_by<C>(self, col: C, ord: Order) -> Self where
C: IntoSimpleExpr,
fn order_by<C>(self, col: C, ord: Order) -> Self where
C: IntoSimpleExpr,
Add an order_by expression Read more
sourcefn order_by_asc<C>(self, col: C) -> Self where
C: IntoSimpleExpr,
fn order_by_asc<C>(self, col: C) -> Self where
C: IntoSimpleExpr,
Add an order_by expression (ascending) Read more
sourcefn order_by_desc<C>(self, col: C) -> Self where
C: IntoSimpleExpr,
fn order_by_desc<C>(self, col: C) -> Self where
C: IntoSimpleExpr,
Add an order_by expression (descending) Read more
Auto Trait Implementations
impl<S> !RefUnwindSafe for Cursor<S>
impl<S> Send for Cursor<S> where
S: Send,
impl<S> Sync for Cursor<S> where
S: Sync,
impl<S> Unpin for Cursor<S> where
S: Unpin,
impl<S> !UnwindSafe for Cursor<S>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more