Skip to content

Commit

Permalink
chore: re-export sea_query::BlobSize in sea_orm::entity::prelude (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
billy1624 committed Mar 20, 2023
1 parent 5ba9aba commit f646aa7
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
20 changes: 10 additions & 10 deletions sea-orm-codegen/src/entity/column.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,19 +143,19 @@ impl Column {
ColumnType::Time => quote! { ColumnType::Time },
ColumnType::Date => quote! { ColumnType::Date },
ColumnType::Binary(BlobSize::Blob(None)) => {
quote! { ColumnType::Binary(sea_orm::sea_query::BlobSize::Blob(None)) }
quote! { ColumnType::Binary(BlobSize::Blob(None)) }
}
ColumnType::Binary(BlobSize::Blob(Some(s))) => {
quote! { ColumnType::Binary(sea_orm::sea_query::BlobSize::Blob(Some(#s))) }
quote! { ColumnType::Binary(BlobSize::Blob(Some(#s))) }
}
ColumnType::Binary(BlobSize::Tiny) => {
quote! { ColumnType::Binary(sea_orm::sea_query::BlobSize::Tiny) }
quote! { ColumnType::Binary(BlobSize::Tiny) }
}
ColumnType::Binary(BlobSize::Medium) => {
quote! { ColumnType::Binary(sea_orm::sea_query::BlobSize::Medium) }
quote! { ColumnType::Binary(BlobSize::Medium) }
}
ColumnType::Binary(BlobSize::Long) => {
quote! { ColumnType::Binary(sea_orm::sea_query::BlobSize::Long) }
quote! { ColumnType::Binary(BlobSize::Long) }
}
ColumnType::VarBinary(s) => {
quote! { ColumnType::VarBinary(#s) }
Expand Down Expand Up @@ -517,11 +517,11 @@ mod tests {
"ColumnType::BigUnsigned.def()",
"ColumnType::Float.def()",
"ColumnType::Double.def()",
"ColumnType::Binary(sea_orm::sea_query::BlobSize::Blob(None)).def()",
"ColumnType::Binary(sea_orm::sea_query::BlobSize::Blob(Some(10u32))).def()",
"ColumnType::Binary(sea_orm::sea_query::BlobSize::Tiny).def()",
"ColumnType::Binary(sea_orm::sea_query::BlobSize::Medium).def()",
"ColumnType::Binary(sea_orm::sea_query::BlobSize::Long).def()",
"ColumnType::Binary(BlobSize::Blob(None)).def()",
"ColumnType::Binary(BlobSize::Blob(Some(10u32))).def()",
"ColumnType::Binary(BlobSize::Tiny).def()",
"ColumnType::Binary(BlobSize::Medium).def()",
"ColumnType::Binary(BlobSize::Long).def()",
"ColumnType::VarBinary(10u32).def()",
"ColumnType::Boolean.def()",
"ColumnType::Date.def()",
Expand Down
10 changes: 5 additions & 5 deletions src/entity/prelude.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
pub use crate::{
error::*, ActiveEnum, ActiveModelBehavior, ActiveModelTrait, ColumnDef, ColumnTrait,
ColumnType, ColumnTypeTrait, ConnectionTrait, CursorTrait, DatabaseConnection, DbConn,
EntityName, EntityTrait, EnumIter, ForeignKeyAction, Iden, IdenStatic, Linked, LoaderTrait,
ModelTrait, PaginatorTrait, PrimaryKeyToColumn, PrimaryKeyTrait, QueryFilter, QueryResult,
Related, RelationDef, RelationTrait, Select, Value,
error::*, sea_query::BlobSize, ActiveEnum, ActiveModelBehavior, ActiveModelTrait, ColumnDef,
ColumnTrait, ColumnType, ColumnTypeTrait, ConnectionTrait, CursorTrait, DatabaseConnection,
DbConn, EntityName, EntityTrait, EnumIter, ForeignKeyAction, Iden, IdenStatic, Linked,
LoaderTrait, ModelTrait, PaginatorTrait, PrimaryKeyToColumn, PrimaryKeyTrait, QueryFilter,
QueryResult, Related, RelationDef, RelationTrait, Select, Value,
};

#[cfg(feature = "macros")]
Expand Down
2 changes: 1 addition & 1 deletion tests/common/features/binary.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use sea_orm::{entity::prelude::*, sea_query::BlobSize};
use sea_orm::entity::prelude::*;

#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel)]
#[sea_orm(table_name = "binary")]
Expand Down

0 comments on commit f646aa7

Please sign in to comment.