Merge pull request #361 from SeaQL/pulls/361

Rename `sea-strum` lib back to `strum`
This commit is contained in:
Chris Tsang 2021-12-25 18:30:54 +08:00 committed by GitHub
commit c31227a8bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 10 deletions

View File

@ -31,7 +31,7 @@ tracing = { version = "0.1", features = ["log"] }
rust_decimal = { version = "^1", optional = true }
sea-orm-macros = { version = "^0.4.2", path = "sea-orm-macros", optional = true }
sea-query = { version = "^0.20.0", features = ["thread-safe"] }
sea-strum = { version = "^0.21", features = ["derive", "sea-orm"] }
sea-strum = { version = "^0.23", features = ["derive", "sea-orm"] }
serde = { version = "^1.0", features = ["derive"] }
serde_json = { version = "^1", optional = true }
sqlx = { version = "^0.5", optional = true }

View File

@ -4,7 +4,7 @@ use crate::{
RelationTrait, RelationType, Select, Update, UpdateMany, UpdateOne,
};
use sea_query::{Alias, Iden, IntoIden, IntoTableRef, IntoValueTuple, TableRef};
pub use sea_strum::IntoEnumIterator as Iterable;
pub use strum::IntoEnumIterator as Iterable;
use std::fmt::Debug;
/// Ensure the identifier for an Entity can be converted to a static str

View File

@ -388,7 +388,7 @@ pub trait TryGetableMany: Sized {
/// ```
fn find_by_statement<C>(stmt: Statement) -> SelectorRaw<SelectGetableValue<Self, C>>
where
C: sea_strum::IntoEnumIterator + sea_query::Iden,
C: strum::IntoEnumIterator + sea_query::Iden,
{
SelectorRaw::<SelectGetableValue<Self, C>>::with_columns(stmt)
}

View File

@ -46,7 +46,7 @@ pub trait SelectorTrait {
pub struct SelectGetableValue<T, C>
where
T: TryGetableMany,
C: sea_strum::IntoEnumIterator + sea_query::Iden,
C: strum::IntoEnumIterator + sea_query::Iden,
{
columns: PhantomData<C>,
model: PhantomData<T>,
@ -74,7 +74,7 @@ where
impl<T, C> SelectorTrait for SelectGetableValue<T, C>
where
T: TryGetableMany,
C: sea_strum::IntoEnumIterator + sea_query::Iden,
C: strum::IntoEnumIterator + sea_query::Iden,
{
type Item = T;
@ -248,7 +248,7 @@ where
pub fn into_values<T, C>(self) -> Selector<SelectGetableValue<T, C>>
where
T: TryGetableMany,
C: sea_strum::IntoEnumIterator + sea_query::Iden,
C: strum::IntoEnumIterator + sea_query::Iden,
{
Selector::<SelectGetableValue<T, C>>::with_columns(self.query)
}
@ -408,7 +408,7 @@ where
pub fn with_columns<T, C>(query: SelectStatement) -> Selector<SelectGetableValue<T, C>>
where
T: TryGetableMany,
C: sea_strum::IntoEnumIterator + sea_query::Iden,
C: strum::IntoEnumIterator + sea_query::Iden,
{
Selector {
query,
@ -481,7 +481,7 @@ where
pub fn with_columns<T, C>(stmt: Statement) -> SelectorRaw<SelectGetableValue<T, C>>
where
T: TryGetableMany,
C: sea_strum::IntoEnumIterator + sea_query::Iden,
C: strum::IntoEnumIterator + sea_query::Iden,
{
SelectorRaw {
stmt,

View File

@ -310,5 +310,5 @@ pub use sea_query::Iden;
#[cfg(feature = "macros")]
pub use sea_query::Iden as DeriveIden;
pub use sea_strum;
pub use sea_strum::EnumIter;
pub use strum;
pub use strum::EnumIter;