Rename sea-strum lib back to strum

This commit is contained in:
Billy Chan 2021-12-07 17:21:03 +08:00
parent 871a5e8de6
commit af1ffdad83
No known key found for this signature in database
GPG Key ID: A2D690CAC7DF3CC7
5 changed files with 10 additions and 10 deletions

View File

@ -31,7 +31,7 @@ log = { version = "^0.4", optional = true }
rust_decimal = { version = "^1", optional = true }
sea-orm-macros = { version = "^0.4.1", path = "sea-orm-macros", optional = true }
sea-query = { version = "^0.19.1", features = ["thread-safe"] }
sea-strum = { version = "^0.21", features = ["derive", "sea-orm"] }
sea-strum = { version = "^0.21", git = "https://github.com/SeaQL/strum.git", branch = "pulls/1", 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

@ -378,7 +378,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

@ -45,7 +45,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>,
@ -73,7 +73,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;
@ -247,7 +247,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)
}
@ -407,7 +407,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,
@ -480,7 +480,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

@ -305,5 +305,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;