Struct TypeCreateStatement
pub struct TypeCreateStatement { /* private fields */ }Implementations§
§impl TypeCreateStatement
impl TypeCreateStatement
pub fn new() -> Self
pub fn schema<I>(&mut self, name: I) -> &mut Selfwhere
I: IntoIden,
pub fn alias<I, F>(&mut self, name: I, func: F) -> &mut Self
pub fn alias<I, F>(&mut self, name: I, func: F) -> &mut Self
Create a type alias.
use sea_query::{extension::mssql::Type, tests_cfg::*, *};
assert_eq!(
Type::create()
.schema(Font::Table)
.alias(Font::Name, |ty| {
ty.string_len(50).not_null();
})
.to_string(MsSqlQueryBuilder),
r#"CREATE TYPE [font].[name] FROM nvarchar(50) NOT NULL"#
);§impl TypeCreateStatement
impl TypeCreateStatement
pub fn build_ref<T: TypeStatementBuilder>(&self, type_builder: &T) -> String
pub fn build_collect<T: TypeStatementBuilder>( &self, type_builder: T, sql: &mut impl SqlWriter, ) -> String
pub fn build_collect_ref<T: TypeStatementBuilder>( &self, type_builder: &T, sql: &mut impl SqlWriter, ) -> String
pub fn to_string<T>(&self, type_builder: T) -> Stringwhere
T: TypeStatementBuilder + QueryBuilder,
pub fn to_string<T>(&self, type_builder: T) -> Stringwhere
T: TypeStatementBuilder + QueryBuilder,
Build corresponding SQL statement and return SQL string
Trait Implementations§
§impl Clone for TypeCreateStatement
impl Clone for TypeCreateStatement
§fn clone(&self) -> TypeCreateStatement
fn clone(&self) -> TypeCreateStatement
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for TypeCreateStatement
impl RefUnwindSafe for TypeCreateStatement
impl !Send for TypeCreateStatement
impl !Sync for TypeCreateStatement
impl Unpin for TypeCreateStatement
impl UnwindSafe for TypeCreateStatement
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