sea_query::backend

Trait IndexBuilder

source
pub trait IndexBuilder: QuotedBuilder + TableRefBuilder {
    // Required methods
    fn prepare_index_create_statement(
        &self,
        create: &IndexCreateStatement,
        sql: &mut dyn SqlWriter,
    );
    fn prepare_table_ref_index_stmt(
        &self,
        table_ref: &TableRef,
        sql: &mut dyn SqlWriter,
    );
    fn prepare_index_drop_statement(
        &self,
        drop: &IndexDropStatement,
        sql: &mut dyn SqlWriter,
    );

    // Provided method
    fn prepare_table_index_expression(
        &self,
        create: &IndexCreateStatement,
        sql: &mut dyn SqlWriter,
    ) { ... }
}

Required Methods§

source

fn prepare_index_create_statement( &self, create: &IndexCreateStatement, sql: &mut dyn SqlWriter, )

Translate IndexCreateStatement into SQL statement.

source

fn prepare_table_ref_index_stmt( &self, table_ref: &TableRef, sql: &mut dyn SqlWriter, )

Translate TableRef into SQL statement.

source

fn prepare_index_drop_statement( &self, drop: &IndexDropStatement, sql: &mut dyn SqlWriter, )

Translate IndexDropStatement into SQL statement.

Provided Methods§

source

fn prepare_table_index_expression( &self, create: &IndexCreateStatement, sql: &mut dyn SqlWriter, )

Translate IndexCreateStatement into SQL expression. This is the default implementation for PostgresQueryBuilder and SqliteQueryBuilder. MysqlQueryBuilder overrides this default implementation.

Implementors§

source§

impl IndexBuilder for MysqlQueryBuilder

Available on crate feature backend-mysql only.
source§

impl IndexBuilder for PostgresQueryBuilder

Available on crate feature backend-postgres only.
source§

impl IndexBuilder for SqliteQueryBuilder

Available on crate feature backend-sqlite only.