pub trait ForeignKeyBuilder: QuotedBuilder + TableRefBuilder {
// Required method
fn prepare_table_ref_fk_stmt(
&self,
table_ref: &TableRef,
sql: &mut dyn SqlWriter,
);
// Provided methods
fn prepare_foreign_key_create_statement(
&self,
create: &ForeignKeyCreateStatement,
sql: &mut dyn SqlWriter,
) { ... }
fn prepare_foreign_key_drop_statement(
&self,
drop: &ForeignKeyDropStatement,
sql: &mut dyn SqlWriter,
) { ... }
fn prepare_foreign_key_action(
&self,
foreign_key_action: &ForeignKeyAction,
sql: &mut dyn SqlWriter,
) { ... }
}
Required Methods§
sourcefn prepare_table_ref_fk_stmt(
&self,
table_ref: &TableRef,
sql: &mut dyn SqlWriter,
)
fn prepare_table_ref_fk_stmt( &self, table_ref: &TableRef, sql: &mut dyn SqlWriter, )
Translate TableRef
into SQL statement.
Provided Methods§
sourcefn prepare_foreign_key_create_statement(
&self,
create: &ForeignKeyCreateStatement,
sql: &mut dyn SqlWriter,
)
fn prepare_foreign_key_create_statement( &self, create: &ForeignKeyCreateStatement, sql: &mut dyn SqlWriter, )
Translate ForeignKeyCreateStatement
into SQL statement.
sourcefn prepare_foreign_key_drop_statement(
&self,
drop: &ForeignKeyDropStatement,
sql: &mut dyn SqlWriter,
)
fn prepare_foreign_key_drop_statement( &self, drop: &ForeignKeyDropStatement, sql: &mut dyn SqlWriter, )
Translate ForeignKeyDropStatement
into SQL statement.
sourcefn prepare_foreign_key_action(
&self,
foreign_key_action: &ForeignKeyAction,
sql: &mut dyn SqlWriter,
)
fn prepare_foreign_key_action( &self, foreign_key_action: &ForeignKeyAction, sql: &mut dyn SqlWriter, )
Translate ForeignKeyAction
into SQL statement.
Implementors§
impl ForeignKeyBuilder for MysqlQueryBuilder
Available on crate feature
backend-mysql
only.impl ForeignKeyBuilder for PostgresQueryBuilder
Available on crate feature
backend-postgres
only.impl ForeignKeyBuilder for SqliteQueryBuilder
Available on crate feature
backend-sqlite
only.