pub struct Blueprint {
pub table_name: String,
pub table: TableCreateStatement,
pub alter: TableAlterStatement,
pub is_alter: bool,
pub indices: Vec<IndexCreateStatement>,
pub columns: Vec<ColumnDef>,
pub auto_id: bool,
pub timestamps: bool,
}Fields§
§table_name: String§table: TableCreateStatement§alter: TableAlterStatement§is_alter: bool§indices: Vec<IndexCreateStatement>§columns: Vec<ColumnDef>§auto_id: bool§timestamps: boolImplementations§
Source§impl Blueprint
impl Blueprint
pub fn new(table_name: &str) -> Self
pub fn no_id(&mut self) -> &mut Self
pub fn no_timestamps(&mut self) -> &mut Self
pub fn id(&mut self) -> &mut Self
pub fn string<'a>(&'a mut self, name: &str) -> ColumnBuilder<'a>
pub fn text<'a>(&'a mut self, name: &str) -> ColumnBuilder<'a>
pub fn integer<'a>(&'a mut self, name: &str) -> ColumnBuilder<'a>
pub fn big_integer<'a>(&'a mut self, name: &str) -> ColumnBuilder<'a>
pub fn float<'a>(&'a mut self, name: &str) -> ColumnBuilder<'a>
pub fn double<'a>(&'a mut self, name: &str) -> ColumnBuilder<'a>
pub fn decimal<'a>(&'a mut self, name: &str) -> ColumnBuilder<'a>
pub fn char<'a>(&'a mut self, name: &str) -> ColumnBuilder<'a>
pub fn boolean<'a>(&'a mut self, name: &str) -> ColumnBuilder<'a>
pub fn date_time<'a>(&'a mut self, name: &str) -> ColumnBuilder<'a>
pub fn timestamp<'a>(&'a mut self, name: &str) -> ColumnBuilder<'a>
pub fn uuid<'a>(&'a mut self, name: &str) -> ColumnBuilder<'a>
pub fn json<'a>(&'a mut self, name: &str) -> ColumnBuilder<'a>
pub fn json_binary<'a>(&'a mut self, name: &str) -> ColumnBuilder<'a>
pub fn binary<'a>(&'a mut self, name: &str) -> ColumnBuilder<'a>
pub fn timestamps(&mut self) -> &mut Self
pub fn drop_column(&mut self, name: &str) -> &mut Self
pub fn foreign<'a>(&'a mut self, from_col: &str) -> ForeignKeyBuilder<'a>
Auto Trait Implementations§
impl Freeze for Blueprint
impl !RefUnwindSafe for Blueprint
impl Send for Blueprint
impl Sync for Blueprint
impl Unpin for Blueprint
impl UnsafeUnpin for Blueprint
impl !UnwindSafe for Blueprint
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request