DeriveActiveEnum
generate code that depends on sea-query inside sea-orm
This commit is contained in:
parent
2b841b1b5d
commit
f64f1e9216
@ -229,8 +229,8 @@ impl ActiveEnum {
|
|||||||
|
|
||||||
#[automatically_derived]
|
#[automatically_derived]
|
||||||
#[allow(clippy::from_over_into)]
|
#[allow(clippy::from_over_into)]
|
||||||
impl Into<sea_query::Value> for #ident {
|
impl Into<sea_orm::sea_query::Value> for #ident {
|
||||||
fn into(self) -> sea_query::Value {
|
fn into(self) -> sea_orm::sea_query::Value {
|
||||||
<Self as sea_orm::ActiveEnum>::to_value(&self).into()
|
<Self as sea_orm::ActiveEnum>::to_value(&self).into()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -244,17 +244,17 @@ impl ActiveEnum {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[automatically_derived]
|
#[automatically_derived]
|
||||||
impl sea_query::ValueType for #ident {
|
impl sea_orm::sea_query::ValueType for #ident {
|
||||||
fn try_from(v: sea_query::Value) -> Result<Self, sea_query::ValueTypeErr> {
|
fn try_from(v: sea_orm::sea_query::Value) -> Result<Self, sea_orm::sea_query::ValueTypeErr> {
|
||||||
let value = <<Self as sea_orm::ActiveEnum>::Value as sea_query::ValueType>::try_from(v)?;
|
let value = <<Self as sea_orm::ActiveEnum>::Value as sea_orm::sea_query::ValueType>::try_from(v)?;
|
||||||
<Self as sea_orm::ActiveEnum>::try_from_value(&value).map_err(|_| sea_query::ValueTypeErr)
|
<Self as sea_orm::ActiveEnum>::try_from_value(&value).map_err(|_| sea_orm::sea_query::ValueTypeErr)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn type_name() -> String {
|
fn type_name() -> String {
|
||||||
<<Self as sea_orm::ActiveEnum>::Value as sea_query::ValueType>::type_name()
|
<<Self as sea_orm::ActiveEnum>::Value as sea_orm::sea_query::ValueType>::type_name()
|
||||||
}
|
}
|
||||||
|
|
||||||
fn column_type() -> sea_query::ColumnType {
|
fn column_type() -> sea_orm::sea_query::ColumnType {
|
||||||
<Self as sea_orm::ActiveEnum>::db_type()
|
<Self as sea_orm::ActiveEnum>::db_type()
|
||||||
.get_column_type()
|
.get_column_type()
|
||||||
.to_owned()
|
.to_owned()
|
||||||
@ -263,9 +263,9 @@ impl ActiveEnum {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[automatically_derived]
|
#[automatically_derived]
|
||||||
impl sea_query::Nullable for #ident {
|
impl sea_orm::sea_query::Nullable for #ident {
|
||||||
fn null() -> sea_query::Value {
|
fn null() -> sea_orm::sea_query::Value {
|
||||||
<<Self as sea_orm::ActiveEnum>::Value as sea_query::Nullable>::null()
|
<<Self as sea_orm::ActiveEnum>::Value as sea_orm::sea_query::Nullable>::null()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user