Enum sea_schema::mysql::def::Type

source ·
pub enum Type {
Show 42 variants Serial, Bit(NumericAttr), TinyInt(NumericAttr), Bool, SmallInt(NumericAttr), MediumInt(NumericAttr), Int(NumericAttr), BigInt(NumericAttr), Decimal(NumericAttr), Float(NumericAttr), Double(NumericAttr), Date, Time(TimeAttr), DateTime(TimeAttr), Timestamp(TimeAttr), Year, Char(StringAttr), NChar(StringAttr), Varchar(StringAttr), NVarchar(StringAttr), Binary(StringAttr), Varbinary(StringAttr), Text(StringAttr), TinyText(StringAttr), MediumText(StringAttr), LongText(StringAttr), Blob(BlobAttr), TinyBlob, MediumBlob, LongBlob, Enum(EnumDef), Set(SetDef), Geometry(GeometryAttr), Point(GeometryAttr), LineString(GeometryAttr), Polygon(GeometryAttr), MultiPoint(GeometryAttr), MultiLineString(GeometryAttr), MultiPolygon(GeometryAttr), GeometryCollection(GeometryAttr), Json, Unknown(String),
}
Available on crate features mysql and def only.
Expand description

All built-in types of MySQL, excluding synonyms

Variants§

§

Serial

§

Bit(NumericAttr)

§

TinyInt(NumericAttr)

§

Bool

§

SmallInt(NumericAttr)

§

MediumInt(NumericAttr)

§

Int(NumericAttr)

§

BigInt(NumericAttr)

§

Decimal(NumericAttr)

§

Float(NumericAttr)

§

Double(NumericAttr)

§

Date

§

Time(TimeAttr)

§

DateTime(TimeAttr)

§

Timestamp(TimeAttr)

§

Year

§

Char(StringAttr)

§

NChar(StringAttr)

§

Varchar(StringAttr)

§

NVarchar(StringAttr)

§

Binary(StringAttr)

§

Varbinary(StringAttr)

§

Text(StringAttr)

§

TinyText(StringAttr)

§

MediumText(StringAttr)

§

LongText(StringAttr)

§

Blob(BlobAttr)

§

TinyBlob

§

MediumBlob

§

LongBlob

§

Enum(EnumDef)

§

Set(SetDef)

§

Geometry(GeometryAttr)

§

Point(GeometryAttr)

§

LineString(GeometryAttr)

§

Polygon(GeometryAttr)

§

MultiPoint(GeometryAttr)

§

MultiLineString(GeometryAttr)

§

MultiPolygon(GeometryAttr)

§

GeometryCollection(GeometryAttr)

§

Json

§

Unknown(String)

Implementations§

source§

impl Type

source

pub fn is_numeric(&self) -> bool

source

pub fn is_date(&self) -> bool

source

pub fn is_time(&self) -> bool

source

pub fn is_string(&self) -> bool

source

pub fn is_blob(&self) -> bool

source

pub fn is_free_size_blob(&self) -> bool

source

pub fn is_geometry(&self) -> bool

source

pub fn is_enum(&self) -> bool

source

pub fn is_set(&self) -> bool

source

pub fn is_other(&self) -> bool

source

pub fn is_unknown(&self) -> bool

source

pub fn get_numeric_attr_mut(&mut self) -> &mut NumericAttr

source

pub fn get_time_attr_mut(&mut self) -> &mut TimeAttr

source

pub fn get_string_attr_mut(&mut self) -> &mut StringAttr

source

pub fn get_blob_attr_mut(&mut self) -> &mut BlobAttr

source

pub fn get_enum_def_mut(&mut self) -> &mut EnumDef

source

pub fn get_set_def_mut(&mut self) -> &mut SetDef

source

pub fn get_geometry_attr_mut(&mut self) -> &mut GeometryAttr

source§

impl Type

source

pub fn write_numeric_attr(s: &mut dyn Write, num: &NumericAttr)

Available on crate feature writer only.
source

pub fn write_time_attr(s: &mut dyn Write, attr: &TimeAttr)

Available on crate feature writer only.
source

pub fn write_string_attr(s: &mut dyn Write, attr: &StringAttr)

Available on crate feature writer only.
source

pub fn write_blob_attr(s: &mut dyn Write, attr: &BlobAttr)

Available on crate feature writer only.
source

pub fn write_enum_def(s: &mut dyn Write, def: &EnumDef)

Available on crate feature writer only.
source

pub fn write_set_def(s: &mut dyn Write, def: &SetDef)

Available on crate feature writer only.
source

pub fn write_geometry_attr(s: &mut dyn Write, attr: &GeometryAttr)

Available on crate feature writer only.

Trait Implementations§

source§

impl Clone for Type

source§

fn clone(&self) -> Type

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Type

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Iden for Type

Available on crate feature writer only.
source§

fn unquoted(&self, s: &mut dyn Write)

source§

fn prepare(&self, s: &mut dyn Write, q: Quote)

source§

fn quoted(&self, q: Quote) -> String

source§

fn to_string(&self) -> String

source§

impl PartialEq for Type

source§

fn eq(&self, other: &Type) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for Type

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where 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<I> IdenList for I
where I: IntoIden,

source§

impl<T, U> Into<U> for T
where 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> IntoColumnRef for T
where T: 'static + IntoIden,

source§

impl<T> IntoIden for T
where T: 'static + Iden,

source§

fn into_iden(self) -> SeaRc<dyn Iden>

source§

impl<I> IntoIndexColumn for I
where I: IntoIden,

source§

impl<T> IntoTableRef for T
where T: 'static + IntoIden,

source§

impl<I> IntoTypeRef for I
where I: IntoIden,

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where 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 T
where 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.