pub struct IndexColumn {
pub value: Cow<'static, str>,
pub is_expression: bool,
pub asc: bool,
pub nulls_first: bool,
pub opclass: Option<Opclass>,
}Expand description
Runtime index column entity for serde serialization
Fields§
§value: Cow<'static, str>Column name or expression
is_expression: boolWhether this is an expression (vs column name)
asc: boolAscending order (true) or descending (false)
nulls_first: boolNULLS FIRST ordering
opclass: Option<Opclass>Operator class (optional)
Implementations§
Source§impl IndexColumn
impl IndexColumn
Sourcepub fn expression(expr: impl Into<Cow<'static, str>>) -> Self
pub fn expression(expr: impl Into<Cow<'static, str>>) -> Self
Create an expression-based index column
Sourcepub const fn nulls_first(self) -> Self
pub const fn nulls_first(self) -> Self
Set NULLS FIRST
Sourcepub fn with_opclass(self, opclass: Opclass) -> Self
pub fn with_opclass(self, opclass: Opclass) -> Self
Set operator class
Trait Implementations§
Source§impl Clone for IndexColumn
impl Clone for IndexColumn
Source§fn clone(&self) -> IndexColumn
fn clone(&self) -> IndexColumn
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 IndexColumn
impl Debug for IndexColumn
Source§impl From<IndexColumnDef> for IndexColumn
impl From<IndexColumnDef> for IndexColumn
Source§fn from(def: IndexColumnDef) -> Self
fn from(def: IndexColumnDef) -> Self
Converts to this type from the input type.
Source§impl PartialEq for IndexColumn
impl PartialEq for IndexColumn
Source§fn eq(&self, other: &IndexColumn) -> bool
fn eq(&self, other: &IndexColumn) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for IndexColumn
impl StructuralPartialEq for IndexColumn
Auto Trait Implementations§
impl Freeze for IndexColumn
impl RefUnwindSafe for IndexColumn
impl Send for IndexColumn
impl Sync for IndexColumn
impl Unpin for IndexColumn
impl UnsafeUnpin for IndexColumn
impl UnwindSafe for IndexColumn
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