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§
sourcefn 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.
sourcefn 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.
sourcefn 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§
sourcefn 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.
Implementors§
impl IndexBuilder for MysqlQueryBuilder
Available on crate feature
backend-mysql
only.impl IndexBuilder for PostgresQueryBuilder
Available on crate feature
backend-postgres
only.impl IndexBuilder for SqliteQueryBuilder
Available on crate feature
backend-sqlite
only.