Trait IndexBuilder
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§
fn prepare_index_create_statement(
&self,
create: &IndexCreateStatement,
sql: &mut dyn SqlWriter,
)
fn prepare_index_create_statement( &self, create: &IndexCreateStatement, sql: &mut dyn SqlWriter, )
Translate IndexCreateStatement
into SQL statement.
fn prepare_table_ref_index_stmt(
&self,
table_ref: &TableRef,
sql: &mut dyn SqlWriter,
)
fn prepare_table_ref_index_stmt( &self, table_ref: &TableRef, sql: &mut dyn SqlWriter, )
Translate TableRef
into SQL statement.
fn prepare_index_drop_statement(
&self,
drop: &IndexDropStatement,
sql: &mut dyn SqlWriter,
)
fn prepare_index_drop_statement( &self, drop: &IndexDropStatement, sql: &mut dyn SqlWriter, )
Translate IndexDropStatement
into SQL statement.
Provided Methods§
fn prepare_table_index_expression(
&self,
create: &IndexCreateStatement,
sql: &mut dyn SqlWriter,
)
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.