pub struct OrderExpr {
pub expr: OrderExprKind,
pub order: Order,
pub nulls: Option<NullOrdering>,
}Expand description
An expression with its ordering specification.
This represents a single item in an ORDER BY clause.
Fields§
§expr: OrderExprKindThe expression to order by (column or expression)
order: OrderThe ordering direction
nulls: Option<NullOrdering>Optional NULL ordering
Implementations§
Source§impl OrderExpr
impl OrderExpr
Sourcepub fn new<I: IntoIden>(column: I) -> Self
pub fn new<I: IntoIden>(column: I) -> Self
Create a new order expression for a column with the default order (ASC).
Sourcepub fn new_table_column<T: IntoIden, C: IntoIden>(table: T, column: C) -> Self
pub fn new_table_column<T: IntoIden, C: IntoIden>(table: T, column: C) -> Self
Create a new order expression for a qualified column.
Sourcepub fn nulls(self, nulls: NullOrdering) -> Self
pub fn nulls(self, nulls: NullOrdering) -> Self
Set NULL ordering.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OrderExpr
impl !RefUnwindSafe for OrderExpr
impl !Send for OrderExpr
impl !Sync for OrderExpr
impl Unpin for OrderExpr
impl UnsafeUnpin for OrderExpr
impl !UnwindSafe for OrderExpr
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