Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update rust crate sea-orm to 0.12 - autoclosed #3

Closed
wants to merge 1 commit into from

Conversation

renovate[bot]
Copy link

@renovate renovate bot commented Oct 15, 2021

This PR contains the following updates:

Package Type Update Change
sea-orm (source) dependencies minor 0.2 -> 0.12

Release Notes

SeaQL/sea-orm (sea-orm)

v0.12.15

Compare Source

Enhancements
#[derive(DerivePartialModel)]
#[sea_orm(entity = "<entity::Model as ModelTrait>::Entity")]
struct EntityNameNotAIdent {
    #[sea_orm(from_col = "foo2")]
    _foo: i32,
    #[sea_orm(from_col = "bar2")]
    _bar: String,
}
assert_eq!(
    cake::Entity::find()
        .join_as(
            JoinType::LeftJoin,
            cake_filling::Relation::Cake.def().rev(),
            cf.clone()
        )
        .join(
            JoinType::LeftJoin,
            cake_filling::Relation::Filling.def().from_alias(cf)
        )
        .build(DbBackend::MySql)
        .to_string(),
    [
        "SELECT `cake`.`id`, `cake`.`name` FROM `cake`",
        "LEFT JOIN `cake_filling` AS `cf` ON `cake`.`id` = `cf`.`cake_id`",
        "LEFT JOIN `filling` ON `cf`.`filling_id` = `filling`.`id`",
    ]
    .join(" ")
);

v0.12.14

Compare Source

v0.12.12

Compare Source

Bug Fixes
Enhancements
  • Added ConnectOptions::test_before_acquire

v0.12.11

Compare Source

New Features
Enhancements
Bug Fixes
House keeping

v0.12.10

Compare Source

New Features
Enhancements
Upgrades

v0.12.9

Compare Source

Enhancements
Upgrades

v0.12.8

Compare Source

Enhancements
Upgrades

v0.12.7

Compare Source

Enhancements
Upgrades

v0.12.6

Compare Source

New Features

v0.12.5

Compare Source

Bug Fixes

v0.12.4

Compare Source

New Features
#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel)]
#[sea_orm(table_name = "json_struct_vec")]
pub struct Model {
    #[sea_orm(primary_key)]
    pub id: i32,
    #[sea_orm(column_type = "Json")]
    pub struct_vec: Vec<JsonColumn>,
}

#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize, FromJsonQueryResult)]
pub struct JsonColumn {
    pub value: String,
}
Enhancements
Upgrades

v0.12.3

Compare Source

New Features
Enhancements
Bug Fixes
Upgrades
House keeping

v0.12.2

Compare Source

Enhancements
Bug fixes

v0.12.1

v0.11.3

Compare Source

Enhancements
#[derive(FromQueryResult)]
struct GenericTest<T: TryGetable> {
    foo: i32,
    bar: T,
}
trait MyTrait {
    type Item: TryGetable;
}

#[derive(FromQueryResult)]
struct TraitAssociateTypeTest<T>
where
    T: MyTrait,
{
    foo: T::Item,
}
Bug Fixes

v0.11.2

Compare Source

Enhancements

v0.11.1

Compare Source

Bug Fixes
#[derive(Clone, Debug, PartialEq, DeriveEntityModel, Eq)]
#[sea_orm(table_name = "binary")]
pub struct Model {
    #[sea_orm(primary_key)]
    pub id: i32,
    #[sea_orm(column_type = "Binary(BlobSize::Blob(None))")]
    pub binary: Vec<u8>,
    #[sea_orm(column_type = "Binary(BlobSize::Blob(Some(10)))")]
    pub binary_10: Vec<u8>,
    #[sea_orm(column_type = "Binary(BlobSize::Tiny)")]
    pub binary_tiny: Vec<u8>,
    #[sea_orm(column_type = "Binary(BlobSize::Medium)")]
    pub binary_medium: Vec<u8>,
    #[sea_orm(column_type = "Binary(BlobSize::Long)")]
    pub binary_long: Vec<u8>,
    #[sea_orm(column_type = "VarBinary(10)")]
    pub var_binary: Vec<u8>,
}
  • The CLI command sea-orm-cli generate entity -u '<DB-URL>' --expanded-format will now generate the following code for each Binary or VarBinary columns in expanded format https://github.com/SeaQL/sea-orm/pull/1529
impl ColumnTrait for Column {
    type EntityName = Entity;
    fn def(&self) -> ColumnDef {
        match self {
            Self::Id => ColumnType::Integer.def(),
            Self::Binary => ColumnType::Binary(sea_orm::sea_query::BlobSize::Blob(None)).def(),
            Self::Binary10 => {
                ColumnType::Binary(sea_orm::sea_query::BlobSize::Blob(Some(10u32))).def()
            }
            Self::BinaryTiny => ColumnType::Binary(sea_orm::sea_query::BlobSize::Tiny).def(),
            Self::BinaryMedium => ColumnType::Binary(sea_orm::sea_query::BlobSize::Medium).def(),
            Self::BinaryLong => ColumnType::Binary(sea_orm::sea_query::BlobSize::Long).def(),
            Self::VarBinary => ColumnType::VarBinary(10u32).def(),
        }
    }
}

v0.11.0

Compare Source

  • 2023-02-02: 0.11.0-rc.1
  • 2023-02-04: 0.11.0-rc.2
New Features
SeaORM Core
SeaORM CLI
SeaORM Migration
Enhancements
Upgrades
House Keeping
Bug Fixes
Breaking Changes
// then
fn try_get(res: &QueryResult, pre: &str, col: &str) -> Result<Self, TryGetError>;
// now; ColIdx can be `&str` or `usize`
fn try_get_by<I: ColIdx>(res: &QueryResult, index: I) -> Result<Self, TryGetError>;

So if you implemented it yourself:

impl TryGetable for XXX {
-   fn try_get(res: &QueryResult, pre: &str, col: &str) -> Result<Self, TryGetError> {
+   fn try_get_by<I: sea_orm::ColIdx>(res: &QueryResult, idx: I) -> Result<Self, TryGetError> {
-       let value: YYY = res.try_get(pre, col).map_err(TryGetError::DbErr)?;
+       let value: YYY = res.try_get_by(idx).map_err(TryGetError::DbErr)?;
        ..
    }
}
#[async_trait::async_trait]
impl ActiveModelBehavior for ActiveModel {
    async fn before_save<C>(self, db: &C, insert: bool) -> Result<Self, DbErr>
    where
        C: ConnectionTrait,
    {
        // ...
    }

    // ...
}
let res = Update::one(cake::ActiveModel {
        name: Set("Cheese Cake".to_owned()),
        ..model.into_active_model()
    })
    .exec(&db)
    .await;

// then
assert_eq!(
    res,
    Err(DbErr::RecordNotFound(
        "None of the database rows are affected".to_owned()
    ))
);

// now
assert_eq!(res, Err(DbErr::RecordNotUpdated));
  • sea_orm::ColumnType was replaced by sea_query::ColumnType https://github.com/SeaQL/sea-orm/pull/1395
    • Method ColumnType::def was moved to ColumnTypeTrait
    • ColumnType::Binary becomes a tuple variant which takes in additional option sea_query::BlobSize
    • ColumnType::Custom takes a sea_query::DynIden instead of String and thus a new method custom is added (note the lowercase)
// Compact Entity

#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel)]
#[sea_orm(table_name = "fruit")]
pub struct Model {
-   #[sea_orm(column_type = r#"Custom("citext".to_owned())"#)]
+   #[sea_orm(column_type = r#"custom("citext")"#)]
    pub column: String,
}
// Expanded Entity
impl ColumnTrait for Column {
    type EntityName = Entity;

    fn def(&self) -> ColumnDef {
        match self {
-           Self::Column => ColumnType::Custom("citext".to_owned()).def(),
+           Self::Column => ColumnType::custom("citext").def(),
        }
    }
}
Miscellaneous

Full Changelog: SeaQL/sea-orm@0.10.0...0.11.0

v0.10.7

Compare Source

Bug Fixes

v0.10.6

Compare Source

Enhancements
Bug Fixes

v0.10.5

Compare Source

New Features
Bug Fixes
Enhancements

v0.10.4

Compare Source

Bug Fixes
Enhancements

v0.10.3

Compare Source

Bug Fixes
Enhancements
House Keeping

v0.10.2

Compare Source

Enhancements
Bug Fixes
Upgrades
  • Update MSRV to 1.65

v0.10.1

Compare Source

Enhancements
Bug Fixes
House Keeping
Upgrades

v0.10.0

Compare Source

New Features
Enhancements
Bug Fixes
Breaking Changes
enum ColumnType {
    // then
    Enum(String, Vec<String>)

    // now
    Enum {
        /// Name of enum
        name: DynIden,
        /// Variants of enum
        variants: Vec<DynIden>,
    }
    ...
}

// example

#[derive(Iden)]
enum TeaEnum {
    #[iden = "tea"]
    Enum,
    #[iden = "EverydayTea"]
    EverydayTea,
    #[iden = "BreakfastTea"]
    BreakfastTea,
}

// then
ColumnDef::new(active_enum_child::Column::Tea)
    .enumeration("tea", vec!["EverydayTea", "BreakfastTea"])

// now
ColumnDef::new(active_enum_child::Column::Tea)
    .enumeration(TeaEnum::Enum, [TeaEnum::EverydayTea, TeaEnum::BreakfastTea])
  • A new method array_type was added to ValueType:
impl sea_orm::sea_query::ValueType for MyType {
    fn array_type() -> sea_orm::sea_query::ArrayType {
        sea_orm::sea_query::ArrayType::TypeName
    }
    ...
}
  • ActiveEnum::name() changed return type to DynIden:
#[derive(Debug, Iden)]
#[iden = "category"]
pub struct CategoryEnum;

impl ActiveEnum for Category {
    // then
    fn name() -> String {
        "category".to_owned()
    }

    // now
    fn name() -> DynIden {
        SeaRc::new(CategoryEnum)
    }
    ...
}
House Keeping
Integration
Upgrades

Full Changelog: SeaQL/sea-orm@0.9.0...0.10.0

v0.9.3

Compare Source

Enhancements
Bug Fixes

v0.9.2

Compare Source

Enhancements
House Keeping
Notes

In this minor release, we removed time v0.1 from the dependency graph

v0.9.1

Compare Source

Enhancements
Bug Fixes
House Keeping

v0.9.0

Compare Source

New Features
Enhancements
Upgrades
House Keeping
Bug Fixes
Breaking Changes
  • SelectTwoMany::one() has been dropped https://github.com/SeaQL/sea-orm/pull/813, you can get (Entity, Vec<RelatedEntity>) by first querying a single model from Entity, then use [ModelTrait::find_related] on the model.
  • Feature flag revamp

    We now adopt the weak dependency syntax in Cargo. That means the flags ["sqlx-json", "sqlx-chrono", "sqlx-decimal", "sqlx-uuid", "sqlx-time"] are not needed and now removed. Instead, with-time will enable sqlx?/time only if sqlx is already enabled. As a consequence, now the features with-json, with-chrono, with-rust_decimal, with-uuid, with-time will not be enabled as a side-effect of enabling sqlx.

Full Changelog: SeaQL/sea-orm@0.8.0...0.9.0

v0.8.0

Compare Source

New Features
Enhancements
Bug Fixes
Breaking Changes
  • Migration utilities are moved from sea-schema to sea-orm repo, under a new sub-crate sea-orm-migration. sea_schema::migration::prelude should be replaced by sea_orm_migration::prelude in all migration files
Upgrades
Fixed Issues

Full Changelog: SeaQL/sea-orm@0.7.1...0.8.0

v0.7.1

Compare Source

  • Fix sea-orm-cli error
  • Fix sea-orm cannot build without with-json

v0.7.0

Compare Source

New Features
Enhancements
Bug Fixes
Breaking Changes
Documentations
Fixed Issues

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot changed the title fix(deps): update rust crate sea-orm to 0.3 fix(deps): update rust crate sea-orm to 0.4 Nov 19, 2021
@renovate renovate bot force-pushed the renovate/sea-orm-0.x branch from fa9d711 to 37b670f Compare November 19, 2021 15:52
@renovate renovate bot force-pushed the renovate/sea-orm-0.x branch from 37b670f to 3df777a Compare March 7, 2022 08:37
@renovate renovate bot changed the title fix(deps): update rust crate sea-orm to 0.4 fix(deps): update rust crate sea-orm to 0.6 Mar 7, 2022
@renovate renovate bot changed the title fix(deps): update rust crate sea-orm to 0.6 fix(deps): update rust crate sea-orm to 0.7 Mar 26, 2022
@renovate renovate bot force-pushed the renovate/sea-orm-0.x branch from 3df777a to 2ba579e Compare March 26, 2022 15:24
@renovate renovate bot force-pushed the renovate/sea-orm-0.x branch from 2ba579e to 0534624 Compare May 16, 2022 02:19
@renovate renovate bot changed the title fix(deps): update rust crate sea-orm to 0.7 fix(deps): update rust crate sea-orm to 0.8 May 16, 2022
@renovate renovate bot force-pushed the renovate/sea-orm-0.x branch from 0534624 to fd4c5ca Compare September 25, 2022 15:06
@renovate renovate bot changed the title fix(deps): update rust crate sea-orm to 0.8 fix(deps): update rust crate sea-orm to 0.9 Sep 25, 2022
@renovate renovate bot force-pushed the renovate/sea-orm-0.x branch from fd4c5ca to 12bc65c Compare November 20, 2022 09:32
@renovate renovate bot changed the title fix(deps): update rust crate sea-orm to 0.9 fix(deps): update rust crate sea-orm to 0.10 Nov 20, 2022
@renovate renovate bot changed the title fix(deps): update rust crate sea-orm to 0.10 fix(deps): update rust crate sea-orm to 0.11 Mar 17, 2023
@renovate renovate bot force-pushed the renovate/sea-orm-0.x branch from 12bc65c to add53dd Compare March 17, 2023 06:10
@renovate renovate bot force-pushed the renovate/sea-orm-0.x branch from add53dd to 621107e Compare July 28, 2023 05:30
@renovate renovate bot changed the title fix(deps): update rust crate sea-orm to 0.11 fix(deps): update rust crate sea-orm to 0.12 Jul 28, 2023
@renovate renovate bot force-pushed the renovate/sea-orm-0.x branch from 621107e to 73db10c Compare May 1, 2024 08:59
@renovate renovate bot changed the title fix(deps): update rust crate sea-orm to 0.12 fix(deps): update rust crate sea-orm to 0.12.15 May 1, 2024
@renovate renovate bot force-pushed the renovate/sea-orm-0.x branch from 73db10c to 326890a Compare May 6, 2024 05:16
@renovate renovate bot changed the title fix(deps): update rust crate sea-orm to 0.12.15 fix(deps): update rust crate sea-orm to 0.12 May 6, 2024
@renovate renovate bot changed the title fix(deps): update rust crate sea-orm to 0.12 fix(deps): update rust crate sea-orm to 0.12 - autoclosed Dec 11, 2024
@renovate renovate bot closed this Dec 11, 2024
@renovate renovate bot deleted the renovate/sea-orm-0.x branch December 11, 2024 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants