pub struct QueryParams {
pub pk: Bytes,
pub sk_condition: Option<(SortKeyCondition, Bytes, Option<Bytes>)>,
pub forward: bool,
pub limit: Option<usize>,
pub start_key: Option<Key>,
pub index_name: Option<String>,
}Expand description
Query parameters for stripe iteration
Fields§
§pk: BytesPartition key (required)
sk_condition: Option<(SortKeyCondition, Bytes, Option<Bytes>)>Sort key condition (optional - if None, return all items with PK)
forward: boolScan direction
limit: Option<usize>Maximum items to return
start_key: Option<Key>Start key for pagination (exclusive)
index_name: Option<String>Index name for LSI queries (Phase 3.1+)
Implementations§
Source§impl QueryParams
impl QueryParams
Sourcepub fn with_sk_condition(
self,
condition: SortKeyCondition,
value: Bytes,
value2: Option<Bytes>,
) -> Self
pub fn with_sk_condition( self, condition: SortKeyCondition, value: Bytes, value2: Option<Bytes>, ) -> Self
Add sort key condition
Sourcepub fn with_direction(self, forward: bool) -> Self
pub fn with_direction(self, forward: bool) -> Self
Set scan direction
Sourcepub fn with_limit(self, limit: usize) -> Self
pub fn with_limit(self, limit: usize) -> Self
Set limit
Sourcepub fn with_start_key(self, key: Key) -> Self
pub fn with_start_key(self, key: Key) -> Self
Set start key for pagination
Sourcepub fn with_index_name(self, index_name: impl Into<String>) -> Self
pub fn with_index_name(self, index_name: impl Into<String>) -> Self
Set index name for LSI query (Phase 3.1+)
Sourcepub fn matches_sk(&self, sk: &Option<Bytes>) -> bool
pub fn matches_sk(&self, sk: &Option<Bytes>) -> bool
Check if a sort key matches the condition
Sourcepub fn should_skip(&self, key: &Key) -> bool
pub fn should_skip(&self, key: &Key) -> bool
Check if we should skip a key based on pagination start_key
Trait Implementations§
Source§impl Clone for QueryParams
impl Clone for QueryParams
Source§fn clone(&self) -> QueryParams
fn clone(&self) -> QueryParams
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 QueryParams
impl RefUnwindSafe for QueryParams
impl Send for QueryParams
impl Sync for QueryParams
impl Unpin for QueryParams
impl UnwindSafe for QueryParams
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