sea_query::backend

Trait TableBuilder

source
pub trait TableBuilder:
    IndexBuilder
    + ForeignKeyBuilder
    + QuotedBuilder
    + TableRefBuilder
    + QueryBuilder {
Show 19 methods // Required methods fn prepare_column_def( &self, column_def: &ColumnDef, sql: &mut dyn SqlWriter, ); fn prepare_column_type( &self, column_type: &ColumnType, sql: &mut dyn SqlWriter, ); fn column_spec_auto_increment_keyword(&self) -> &str; fn prepare_table_alter_statement( &self, alter: &TableAlterStatement, sql: &mut dyn SqlWriter, ); fn prepare_table_rename_statement( &self, rename: &TableRenameStatement, sql: &mut dyn SqlWriter, ); // Provided methods fn prepare_table_create_statement( &self, create: &TableCreateStatement, sql: &mut dyn SqlWriter, ) { ... } fn prepare_table_ref_table_stmt( &self, table_ref: &TableRef, sql: &mut dyn SqlWriter, ) { ... } fn prepare_column_def_internal( &self, _is_alter_column: bool, column_def: &ColumnDef, sql: &mut dyn SqlWriter, ) { ... } fn prepare_column_spec( &self, column_spec: &ColumnSpec, sql: &mut dyn SqlWriter, ) { ... } fn column_comment(&self, _comment: &str, _sql: &mut dyn SqlWriter) { ... } fn prepare_table_opt( &self, create: &TableCreateStatement, sql: &mut dyn SqlWriter, ) { ... } fn prepare_table_opt_def( &self, create: &TableCreateStatement, sql: &mut dyn SqlWriter, ) { ... } fn prepare_table_partition( &self, _table_partition: &TablePartition, _sql: &mut dyn SqlWriter, ) { ... } fn prepare_table_drop_statement( &self, drop: &TableDropStatement, sql: &mut dyn SqlWriter, ) { ... } fn prepare_table_drop_opt( &self, drop_opt: &TableDropOpt, sql: &mut dyn SqlWriter, ) { ... } fn prepare_table_truncate_statement( &self, truncate: &TableTruncateStatement, sql: &mut dyn SqlWriter, ) { ... } fn prepare_check_constraint( &self, check: &SimpleExpr, sql: &mut dyn SqlWriter, ) { ... } fn prepare_generated_column( &self, gen: &SimpleExpr, stored: bool, sql: &mut dyn SqlWriter, ) { ... } fn prepare_create_table_if_not_exists( &self, create: &TableCreateStatement, sql: &mut dyn SqlWriter, ) { ... }
}

Required Methods§

source

fn prepare_column_def(&self, column_def: &ColumnDef, sql: &mut dyn SqlWriter)

Translate ColumnDef into SQL statement.

source

fn prepare_column_type(&self, column_type: &ColumnType, sql: &mut dyn SqlWriter)

Translate ColumnType into SQL statement.

source

fn column_spec_auto_increment_keyword(&self) -> &str

The keyword for setting a column to be auto increment.

source

fn prepare_table_alter_statement( &self, alter: &TableAlterStatement, sql: &mut dyn SqlWriter, )

Translate TableAlterStatement into SQL statement.

source

fn prepare_table_rename_statement( &self, rename: &TableRenameStatement, sql: &mut dyn SqlWriter, )

Translate TableRenameStatement into SQL statement.

Provided Methods§

source

fn prepare_table_create_statement( &self, create: &TableCreateStatement, sql: &mut dyn SqlWriter, )

Translate TableCreateStatement into SQL statement.

source

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

Translate TableRef into SQL statement.

source

fn prepare_column_def_internal( &self, _is_alter_column: bool, column_def: &ColumnDef, sql: &mut dyn SqlWriter, )

Translate ColumnDef into SQL statement.

source

fn prepare_column_spec(&self, column_spec: &ColumnSpec, sql: &mut dyn SqlWriter)

Translate ColumnSpec into SQL statement.

source

fn column_comment(&self, _comment: &str, _sql: &mut dyn SqlWriter)

column comment

source

fn prepare_table_opt( &self, create: &TableCreateStatement, sql: &mut dyn SqlWriter, )

Translate TableOpt into SQL statement.

source

fn prepare_table_opt_def( &self, create: &TableCreateStatement, sql: &mut dyn SqlWriter, )

Default function

source

fn prepare_table_partition( &self, _table_partition: &TablePartition, _sql: &mut dyn SqlWriter, )

Translate TablePartition into SQL statement.

source

fn prepare_table_drop_statement( &self, drop: &TableDropStatement, sql: &mut dyn SqlWriter, )

Translate TableDropStatement into SQL statement.

source

fn prepare_table_drop_opt( &self, drop_opt: &TableDropOpt, sql: &mut dyn SqlWriter, )

Translate TableDropOpt into SQL statement.

source

fn prepare_table_truncate_statement( &self, truncate: &TableTruncateStatement, sql: &mut dyn SqlWriter, )

Translate TableTruncateStatement into SQL statement.

source

fn prepare_check_constraint(&self, check: &SimpleExpr, sql: &mut dyn SqlWriter)

Translate the check constraint into SQL statement

source

fn prepare_generated_column( &self, gen: &SimpleExpr, stored: bool, sql: &mut dyn SqlWriter, )

Translate the generated column into SQL statement

source

fn prepare_create_table_if_not_exists( &self, create: &TableCreateStatement, sql: &mut dyn SqlWriter, )

Translate IF NOT EXISTS expression in TableCreateStatement.

Implementors§

source§

impl TableBuilder for MysqlQueryBuilder

Available on crate feature backend-mysql only.
source§

impl TableBuilder for PostgresQueryBuilder

Available on crate feature backend-postgres only.
source§

impl TableBuilder for SqliteQueryBuilder

Available on crate feature backend-sqlite only.