Struct barrel::backend::Sqlite

source ·
pub struct Sqlite;
Expand description

We call this struct Sqlite instead of Sqlite3 because we hope not to have to break the API further down the road

Trait Implementations§

source§

impl SqlGenerator for Sqlite

source§

fn create_index( table: &str, schema: Option<&str>, name: &str, _type: &Type ) -> String

Create a multi-column index

source§

fn drop_index(name: &str) -> String

Drop a multi-column index

source§

fn create_table(name: &str, schema: Option<&str>) -> String

Create a new table with a name
source§

fn create_table_if_not_exists(name: &str, schema: Option<&str>) -> String

Create a new table with a name, only if it doesn’t exist
source§

fn drop_table(name: &str, schema: Option<&str>) -> String

Drop a table with a name
source§

fn drop_table_if_exists(name: &str, schema: Option<&str>) -> String

Drop a table with a name, only if it exists
source§

fn rename_table(old: &str, new: &str, schema: Option<&str>) -> String

Rename a table from to
source§

fn alter_table(name: &str, schema: Option<&str>) -> String

Modify a table in some other way
source§

fn add_column(ex: bool, _: Option<&str>, name: &str, tt: &Type) -> String

Create a new column with a type
source§

fn create_constraint(name: &str, _type: &Type, _schema: Option<&str>) -> String

Create a constraint
source§

fn drop_column(_: &str) -> String

Drop an existing column from the table
source§

fn rename_column(_: &str, _: &str) -> String

Rename an existing column
source§

fn add_foreign_key( columns: &[String], table: &str, relation_columns: &[String], _: Option<&str> ) -> String

Add a foreign key
source§

fn add_primary_key(columns: &[String]) -> String

source§

fn create_partial_index( table: &str, schema: Option<&str>, name: &str, _type: &Type, conditions: &str ) -> String

Create a multi-column index

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.