pub struct ReplaceSortOrderAction { /* private fields */ }Expand description
Transaction action for replacing sort order.
Implementations§
Source§impl ReplaceSortOrderAction
impl ReplaceSortOrderAction
Sourcepub fn asc(self, name: &str, null_order: NullOrder) -> Self
pub fn asc(self, name: &str, null_order: NullOrder) -> Self
Adds a field for sorting in ascending order, sorting by the column’s raw value
(an identity transform). To sort by a transform of the column instead (e.g.
bucket[N], year, truncate[W]), use Self::asc_with_transform.
Sourcepub fn desc(self, name: &str, null_order: NullOrder) -> Self
pub fn desc(self, name: &str, null_order: NullOrder) -> Self
Adds a field for sorting in descending order, sorting by the column’s raw value
(an identity transform). To sort by a transform of the column instead (e.g.
bucket[N], year, truncate[W]), use Self::desc_with_transform.
Sourcepub fn asc_with_transform(
self,
name: &str,
transform: Transform,
null_order: NullOrder,
) -> Self
pub fn asc_with_transform( self, name: &str, transform: Transform, null_order: NullOrder, ) -> Self
Adds a field for sorting in ascending order by a transform of the column’s value
(e.g. Transform::Bucket(16), Transform::Year, Transform::Truncate(4)).
Whether the transform is valid for the column’s type is checked at commit time,
once the table schema is available (mirroring Java’s SortOrder.Builder.build()).
Transform::Unknown and Transform::Void are rejected at commit time with
ErrorKind::DataInvalid. Rejecting Void is an
intentional authoring policy for this action: an all-null sort key adds no
ordering information.
Note: Term is currently a plain column reference. Once it becomes
transform-carrying (#2665), sort-order declaration is expected to converge on
Term-based asc/desc (as in Java’s SortOrderBuilder), at which point the
_with_transform variants can be deprecated in its favor.
Sourcepub fn desc_with_transform(
self,
name: &str,
transform: Transform,
null_order: NullOrder,
) -> Self
pub fn desc_with_transform( self, name: &str, transform: Transform, null_order: NullOrder, ) -> Self
Adds a field for sorting in descending order by a transform of the column’s value.
See Self::asc_with_transform for validation and future API direction.
Auto Trait Implementations§
impl Freeze for ReplaceSortOrderAction
impl RefUnwindSafe for ReplaceSortOrderAction
impl Send for ReplaceSortOrderAction
impl Sync for ReplaceSortOrderAction
impl Unpin for ReplaceSortOrderAction
impl UnsafeUnpin for ReplaceSortOrderAction
impl UnwindSafe for ReplaceSortOrderAction
Blanket Implementations§
Source§impl<T> ApplyTransactionAction for Twhere
T: TransactionAction + 'static,
impl<T> ApplyTransactionAction for Twhere
T: TransactionAction + 'static,
Source§fn apply(self, tx: Transaction) -> Result<Transaction, Error>
fn apply(self, tx: Transaction) -> Result<Transaction, Error>
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read moreSource§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
§impl<T> Downcast for Twhere
T: AsAny + ?Sized,
impl<T> Downcast for Twhere
T: AsAny + ?Sized,
§fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
Any.§fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
Any.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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