pub struct IndexDef { /* private fields */ }Expand description
Index definition
This struct represents an index definition for CREATE INDEX.
Note: The name and table fields are defined for future use in CREATE TABLE statements
with inline index definitions, but are not yet used in the current backend implementations.
The dead_code warning is allowed because this is part of the planned API.
Implementations§
Source§impl IndexDef
impl IndexDef
Sourcepub fn columns<I, C>(self, cols: I) -> Selfwhere
I: IntoIterator<Item = C>,
C: IntoIden,
pub fn columns<I, C>(self, cols: I) -> Selfwhere
I: IntoIterator<Item = C>,
C: IntoIden,
Add multiple columns to the index
Sourcepub fn where(self, expr: SimpleExpr) -> Self
pub fn where(self, expr: SimpleExpr) -> Self
Set WHERE clause for partial index
Trait Implementations§
Auto Trait Implementations§
impl Freeze for IndexDef
impl !RefUnwindSafe for IndexDef
impl !Send for IndexDef
impl !Sync for IndexDef
impl Unpin for IndexDef
impl UnsafeUnpin for IndexDef
impl !UnwindSafe for IndexDef
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