pub trait CreateIndex<'until_build> {
// Required methods
fn unique(self) -> Self;
fn if_not_exists(self) -> Self;
fn add_column(self, column: &'until_build str) -> Self;
fn set_condition(self, condition: String) -> Self;
fn build(self) -> Result<String, Error>;
}
Expand description
Representation of a CREATE INDEX builder.
Required Methods§
Sourcefn unique(self) -> Self
fn unique(self) -> Self
Creates a unique index.
Null values are considered different from all other null values.
Sourcefn if_not_exists(self) -> Self
fn if_not_exists(self) -> Self
Creates the index only if it doesn’t exist yet.
Sourcefn add_column(self, column: &'until_build str) -> Self
fn add_column(self, column: &'until_build str) -> Self
Adds a column to the index.
Parameter:
column
: String representing the column to index.
Sourcefn set_condition(self, condition: String) -> Self
fn set_condition(self, condition: String) -> Self
Sets the condition to apply. This will build a partial index.
Parameter:
condition
: String representing condition to apply the index to
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.