pub struct IndexColumnDef {
pub value: &'static str,
pub is_expression: bool,
pub asc: bool,
pub nulls_first: bool,
pub opclass: Option<OpclassDef>,
}Expand description
Const-friendly index column definition
Fields§
§value: &'static strColumn 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<OpclassDef>Operator class (optional)
Implementations§
Source§impl IndexColumnDef
impl IndexColumnDef
Sourcepub const fn expression(expr: &'static str) -> Self
pub const fn expression(expr: &'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 const fn opclass(self, opclass: OpclassDef) -> Self
pub const fn opclass(self, opclass: OpclassDef) -> Self
Set operator class
Sourcepub const fn opclass_name(self, name: &'static str) -> Self
pub const fn opclass_name(self, name: &'static str) -> Self
Set operator class by name (convenience method)
Trait Implementations§
Source§impl Clone for IndexColumnDef
impl Clone for IndexColumnDef
Source§fn clone(&self) -> IndexColumnDef
fn clone(&self) -> IndexColumnDef
Returns a duplicate of the value. Read more
1.0.0 · 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 IndexColumnDef
impl Debug for IndexColumnDef
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 Hash for IndexColumnDef
impl Hash for IndexColumnDef
Source§impl PartialEq for IndexColumnDef
impl PartialEq for IndexColumnDef
impl Copy for IndexColumnDef
impl Eq for IndexColumnDef
impl StructuralPartialEq for IndexColumnDef
Auto Trait Implementations§
impl Freeze for IndexColumnDef
impl RefUnwindSafe for IndexColumnDef
impl Send for IndexColumnDef
impl Sync for IndexColumnDef
impl Unpin for IndexColumnDef
impl UnwindSafe for IndexColumnDef
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