Struct bison_orm::builder::TableBuilder [−][src]
A query builder for CREATE TABLE
statements.
Implementations
impl TableBuilder
[src]
pub fn new(name: impl Into<String>) -> Self
[src]
Returns a query builder for the CREATE TABLE
statement.
pub fn if_not_exists(&mut self) -> &mut Self
[src]
Appends the IF NOT EXISTS
clause to the CREATE TABLE
statement.
pub fn column(&mut self, column: ColumnBuilder) -> &mut Self
[src]
Appends the given column to the CREATE TABLE
statement.
pub fn primary_key(&mut self, primary: impl Into<String>) -> &mut Self
[src]
Adds a column to the primary-key constraint in the statement.
pub fn foreign_key(&mut self, key: ForeignKeyBuilder) -> &mut Self
[src]
Adds a foreign-key to the statement (without constraints).
pub fn constraint(&mut self, mut constraint: ForeignKeyBuilder) -> &mut Self
[src]
Adds a foreign-key constraint to the statement.
pub fn charset(&mut self, set: impl Into<String>) -> &mut Self
[src]
Sets the CHARACTER SET
clause to the statement. MySQL only.
pub fn collation(&mut self, collation: impl Into<String>) -> &mut Self
[src]
Sets the COLLATE
clause to the statement. MySQL only.
pub fn options(&mut self, options: impl Into<String>) -> &mut Self
[src]
Adds additional options to to the statement (MySQL only).
Trait Implementations
impl Builder for TableBuilder
[src]
impl Default for TableBuilder
[src]
fn default() -> TableBuilder
[src]
Auto Trait Implementations
impl !RefUnwindSafe for TableBuilder
[src]
impl !Send for TableBuilder
[src]
impl !Sync for TableBuilder
[src]
impl Unpin for TableBuilder
[src]
impl !UnwindSafe for TableBuilder
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> BuilderExt for T where
T: ChildBuilder,
[src]
T: ChildBuilder,
pub fn quote(&Self, impl Into<String>) -> String
[src]
pub fn schema(&mut Self, impl AsRef<str>) -> &mut T
[src]
pub fn ident(&mut Self, impl AsRef<str>) -> &mut T
[src]
pub fn ident_comma<I, S>(&mut Self, I) -> &mut T where
I: IntoIterator<Item = S>,
S: AsRef<str>,
[src]
I: IntoIterator<Item = S>,
S: AsRef<str>,
pub fn op(&mut Self, Op) -> &mut T
[src]
pub fn arg(&mut Self, impl ToString) -> &mut T
[src]
pub fn join(&mut Self, impl Builder) -> &mut T
[src]
pub fn join_many<I, B>(&mut Self, I) -> &mut T where
I: IntoIterator<Item = B>,
B: Builder,
[src]
I: IntoIterator<Item = B>,
B: Builder,
pub fn nested(&mut Self, impl FnOnce(&mut BaseBuilder)) -> &mut T
[src]
pub fn push_str(&mut Self, impl AsRef<str>) -> &mut T
[src]
pub fn push(&mut Self, char) -> &mut T
[src]
pub fn prefix(&mut Self, impl AsRef<str>) -> &mut T
[src]
pub fn comma(&mut Self) -> &mut T
[src]
pub fn pad(&mut Self) -> &mut T
[src]
pub fn is_ident(&Self, impl AsRef<str>) -> bool
[src]
pub fn dialect(&Self) -> &Dialect
[src]
pub fn set_dialect(&mut Self, Dialect) -> &mut T
[src]
pub fn total(&Self) -> usize
[src]
pub fn set_total(&mut Self, usize) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,