pub struct ClusteringKey {
pub columns: Vec<(String, Value)>,
}Expand description
Clustering key with multi-column support
Stores the clustering key as a list of (column name, value) pairs. The order must match the schema’s clustering key definition.
Fields§
§columns: Vec<(String, Value)>Column name and value pairs (in schema order)
Implementations§
Source§impl ClusteringKey
impl ClusteringKey
Sourcepub fn single(column: impl Into<String>, value: Value) -> Self
pub fn single(column: impl Into<String>, value: Value) -> Self
Create a clustering key from a single column
Sourcepub fn compare(&self, other: &Self, schema: &TableSchema) -> Result<Ordering>
pub fn compare(&self, other: &Self, schema: &TableSchema) -> Result<Ordering>
Compare two clustering keys according to schema-defined ordering
Each clustering column can be ASC or DESC. This method requires schema information to determine the correct ordering.
Trait Implementations§
Source§impl Clone for ClusteringKey
impl Clone for ClusteringKey
Source§fn clone(&self) -> ClusteringKey
fn clone(&self) -> ClusteringKey
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ClusteringKey
impl Debug for ClusteringKey
Source§impl<'de> Deserialize<'de> for ClusteringKey
impl<'de> Deserialize<'de> for ClusteringKey
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ClusteringKey
Source§impl Ord for ClusteringKey
impl Ord for ClusteringKey
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ClusteringKey
impl PartialEq for ClusteringKey
Source§fn eq(&self, other: &ClusteringKey) -> bool
fn eq(&self, other: &ClusteringKey) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for ClusteringKey
impl PartialOrd for ClusteringKey
Source§impl Serialize for ClusteringKey
impl Serialize for ClusteringKey
impl StructuralPartialEq for ClusteringKey
Auto Trait Implementations§
impl Freeze for ClusteringKey
impl RefUnwindSafe for ClusteringKey
impl Send for ClusteringKey
impl Sync for ClusteringKey
impl Unpin for ClusteringKey
impl UnsafeUnpin for ClusteringKey
impl UnwindSafe for ClusteringKey
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.