pub trait CreateTable<'until_build, 'post_build> {
    // Required methods
    fn add_column(
        self,
        column: CreateColumnImpl<'until_build, 'post_build>
    ) -> Self;
    fn if_not_exists(self) -> Self;
    fn build(self) -> Result<Vec<(String, Vec<Value<'post_build>>)>, Error>;
}
Expand description

The trait representing a create table builder

Required Methods§

source

fn add_column(self, column: CreateColumnImpl<'until_build, 'post_build>) -> Self

Add a column to the table.

source

fn if_not_exists(self) -> Self

Sets the IF NOT EXISTS trait on the table

source

fn build(self) -> Result<Vec<(String, Vec<Value<'post_build>>)>, Error>

This method is used to convert the current state for the given dialect in a list of tuples.

Each tuple consists of the query string and the corresponding bind parameters.

Implementors§

source§

impl<'until_build, 'post_build> CreateTable<'until_build, 'post_build> for CreateTableImpl<'until_build, 'post_build>