pub struct CreateIndex { /* private fields */ }Expand description
A CREATE INDEX statement.
Implementations§
Source§impl CreateIndex
impl CreateIndex
Sourcepub fn new() -> CreateIndex
pub fn new() -> CreateIndex
Starts a CREATE INDEX.
Sourcepub fn name(self, name: impl IntoIden) -> CreateIndex
pub fn name(self, name: impl IntoIden) -> CreateIndex
Sets the index name.
Sourcepub fn table(self, table: impl IntoIden) -> CreateIndex
pub fn table(self, table: impl IntoIden) -> CreateIndex
Sets the indexed table.
Sourcepub fn col(self, column: impl IntoIden) -> CreateIndex
pub fn col(self, column: impl IntoIden) -> CreateIndex
Adds an indexed column.
Sourcepub fn col_order(self, column: impl IntoIden, order: Order) -> CreateIndex
pub fn col_order(self, column: impl IntoIden, order: Order) -> CreateIndex
Adds an indexed column with a sort order.
Sourcepub fn unique(self) -> CreateIndex
pub fn unique(self) -> CreateIndex
Makes the index UNIQUE.
Sourcepub fn if_not_exists(self) -> CreateIndex
pub fn if_not_exists(self) -> CreateIndex
Sets IF NOT EXISTS.
Sourcepub fn and_where(self, expr: Expr) -> CreateIndex
pub fn and_where(self, expr: Expr) -> CreateIndex
Sets the partial-index WHERE expression.
Sourcepub fn using(self, method: &'static str) -> CreateIndex
pub fn using(self, method: &'static str) -> CreateIndex
Sets the Turso extension USING fts / USING <method> —
experimental.
Trait Implementations§
Source§impl Build for CreateIndex
impl Build for CreateIndex
Source§impl Clone for CreateIndex
impl Clone for CreateIndex
Source§fn clone(&self) -> CreateIndex
fn clone(&self) -> CreateIndex
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 CreateIndex
impl Debug for CreateIndex
Source§impl Default for CreateIndex
impl Default for CreateIndex
Source§fn default() -> CreateIndex
fn default() -> CreateIndex
Returns the “default value” for a type. Read more
Source§impl PartialEq for CreateIndex
impl PartialEq for CreateIndex
impl StructuralPartialEq for CreateIndex
Auto Trait Implementations§
impl Freeze for CreateIndex
impl RefUnwindSafe for CreateIndex
impl Send for CreateIndex
impl Sync for CreateIndex
impl Unpin for CreateIndex
impl UnsafeUnpin for CreateIndex
impl UnwindSafe for CreateIndex
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more