sea_query::backend

Trait ForeignKeyBuilder

source
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§

source

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

Translate TableRef into SQL statement.

Provided Methods§

source

fn prepare_foreign_key_create_statement( &self, create: &ForeignKeyCreateStatement, sql: &mut dyn SqlWriter, )

Translate ForeignKeyCreateStatement into SQL statement.

source

fn prepare_foreign_key_drop_statement( &self, drop: &ForeignKeyDropStatement, sql: &mut dyn SqlWriter, )

Translate ForeignKeyDropStatement into SQL statement.

source

fn prepare_foreign_key_action( &self, foreign_key_action: &ForeignKeyAction, sql: &mut dyn SqlWriter, )

Translate ForeignKeyAction into SQL statement.

Implementors§

source§

impl ForeignKeyBuilder for MysqlQueryBuilder

Available on crate feature backend-mysql only.
source§

impl ForeignKeyBuilder for PostgresQueryBuilder

Available on crate feature backend-postgres only.
source§

impl ForeignKeyBuilder for SqliteQueryBuilder

Available on crate feature backend-sqlite only.