Trait Table

Source
pub trait Table<C, R>
where C: Connection<R>, R: Row,
{ // Required methods fn create(&self, conn: &mut C) -> Result<()>; fn create_if_not_exist(&self, conn: &mut C) -> Result<()>; fn drop(&self, conn: &mut C) -> Result<()>; }
Expand description

Trait to manage table - create, check if exists, and drop

Required Methods§

Source

fn create(&self, conn: &mut C) -> Result<()>

Create a table. Error if the table already exists

Source

fn create_if_not_exist(&self, conn: &mut C) -> Result<()>

Create a table if it does not already exist

Source

fn drop(&self, conn: &mut C) -> Result<()>

Delete the table

Implementors§

Source§

impl<C, R, S> Table<C, R> for S