Trait tc_table::TableOrder
source · pub trait TableOrder: TableInstance {
type OrderBy: TableInstance;
type Reverse: TableInstance;
fn order_by(self, columns: Vec<Id>, reverse: bool) -> TCResult<Self::OrderBy>;
fn reverse(self) -> TCResult<Self::Reverse>;
fn validate_order(&self, order: &[Id]) -> TCResult<()>;
}
Expand description
Table
sort methods
Required Associated Types§
sourcetype OrderBy: TableInstance
type OrderBy: TableInstance
The type of Table
returned by this instance’s order_by
method.
sourcetype Reverse: TableInstance
type Reverse: TableInstance
The type of Table
returned by this instance’s reversed
method.
Required Methods§
sourcefn order_by(self, columns: Vec<Id>, reverse: bool) -> TCResult<Self::OrderBy>
fn order_by(self, columns: Vec<Id>, reverse: bool) -> TCResult<Self::OrderBy>
Return an ordered view of this table.
sourcefn validate_order(&self, order: &[Id]) -> TCResult<()>
fn validate_order(&self, order: &[Id]) -> TCResult<()>
Return an error if this table does not support ordering by the given columns.