pub struct KeyCondition<K> { /* private fields */ }Expand description
A builder for a key condition expression, used in query operations
Implementations§
Source§impl<K> KeyCondition<K>where
K: Key,
impl<K> KeyCondition<K>where
K: Key,
Sourcepub fn in_partition<V: Serialize>(partition: V) -> Self
pub fn in_partition<V: Serialize>(partition: V) -> Self
Get items in the given partition
§Panics
Panics if the partition cannot be serialized to an AttributeValue.
Sourcepub fn specific_item<V: Serialize>(self, sort: V) -> Self
pub fn specific_item<V: Serialize>(self, sort: V) -> Self
Get the item where the sort key is equal to the given value
§Panics
Panics if the given value cannot be serialized to an AttributeValue.
Sourcepub fn between<V: Serialize>(self, start: V, end: V) -> Self
pub fn between<V: Serialize>(self, start: V, end: V) -> Self
Get items where the sort key is in a range between the start and end values, inclusive
§Panics
Panics if either of the given values cannot be serialized to an AttributeValue.
Sourcepub fn less_than<V: Serialize>(self, sort: V) -> Self
pub fn less_than<V: Serialize>(self, sort: V) -> Self
Get items where the sort key is less than the given value
§Panics
Panics if the given value cannot be serialized to an AttributeValue.
Sourcepub fn less_than_or_equal<V: Serialize>(self, sort: V) -> Self
pub fn less_than_or_equal<V: Serialize>(self, sort: V) -> Self
Get items where the sort key is less than or equal to the given value
§Panics
Panics if the given value cannot be serialized to an AttributeValue.
Sourcepub fn greater_than<V: Serialize>(self, sort: V) -> Self
pub fn greater_than<V: Serialize>(self, sort: V) -> Self
Get items where the sort key is greater than the given value
§Panics
Panics if the given value cannot be serialized to an AttributeValue.
Sourcepub fn greater_than_or_equal<V: Serialize>(self, sort: V) -> Self
pub fn greater_than_or_equal<V: Serialize>(self, sort: V) -> Self
Get items where the sort key is greater than or equal to the given value
§Panics
Panics if the given value cannot be serialized to an AttributeValue.
Sourcepub fn begins_with(self, sort: impl Into<String>) -> Self
pub fn begins_with(self, sort: impl Into<String>) -> Self
Get items where the sort key begins with the given value
Trait Implementations§
Source§impl<K> Clone for KeyCondition<K>
impl<K> Clone for KeyCondition<K>
Auto Trait Implementations§
impl<K> Freeze for KeyCondition<K>
impl<K> RefUnwindSafe for KeyCondition<K>
impl<K> Send for KeyCondition<K>
impl<K> Sync for KeyCondition<K>
impl<K> Unpin for KeyCondition<K>
impl<K> UnwindSafe for KeyCondition<K>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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