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§

source

fn unique(self) -> Self

Creates a unique index.

Null values are considered different from all other null values.

source

fn if_not_exists(self) -> Self

Creates the index only if it doesn’t exist yet.

source

fn add_column(self, column: &'until_build str) -> Self

Adds a column to the index.

Parameter:

  • column: String representing the column to index.
source

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
source

fn build(self) -> Result<String, Error>

This method is used to build the create index operation

Implementors§

source§

impl<'until_build> CreateIndex<'until_build> for CreateIndexImpl<'until_build>