diff --git a/CHANGELOG.md b/CHANGELOG.md index eaa4da1ad6..b9e8ed2f07 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,61 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## 0.4.0 - 2021-11-19 + +### Fixed Issues +* Disable SQLx query logging https://github.com/SeaQL/sea-orm/issues/290 +* Code generated by `sea-orm-cli` cannot pass clippy https://github.com/SeaQL/sea-orm/issues/296 +* Should return detailed error message for connection failure https://github.com/SeaQL/sea-orm/issues/310 +* `DateTimeWithTimeZone` does not implement `Serialize` and `Deserialize` https://github.com/SeaQL/sea-orm/issues/319 +* Support returning clause to avoid database hits https://github.com/SeaQL/sea-orm/issues/183 + +### Merged PRs +* chore: update to Rust 2021 Edition by @sno2 in https://github.com/SeaQL/sea-orm/pull/273 +* Enumeration - 3 by @billy1624 in https://github.com/SeaQL/sea-orm/pull/274 +* Enumeration - 2 by @billy1624 in https://github.com/SeaQL/sea-orm/pull/261 +* Codegen fix clippy warnings by @billy1624 in https://github.com/SeaQL/sea-orm/pull/303 +* Add axum example by @YoshieraHuang in https://github.com/SeaQL/sea-orm/pull/297 +* Enumeration by @billy1624 in https://github.com/SeaQL/sea-orm/pull/258 +* Add `PaginatorTrait` and `CountTrait` for more constrains by @YoshieraHuang in https://github.com/SeaQL/sea-orm/pull/306 +* Continue `PaginatorTrait` by @billy1624 in https://github.com/SeaQL/sea-orm/pull/307 +* Refactor `Schema` by @billy1624 in https://github.com/SeaQL/sea-orm/pull/309 +* Detailed connection errors by @billy1624 in https://github.com/SeaQL/sea-orm/pull/312 +* Suppress `ouroboros` missing docs warnings by @billy1624 in https://github.com/SeaQL/sea-orm/pull/288 +* `with-json` feature requires `chrono/serde` by @billy1624 in https://github.com/SeaQL/sea-orm/pull/320 +* Pass the argument `entity.table_ref()` instead of just `entity`. by @josh-codes in https://github.com/SeaQL/sea-orm/pull/318 +* Unknown types could be a newtypes instead of `ActiveEnum` by @billy1624 in https://github.com/SeaQL/sea-orm/pull/324 +* Returning by @billy1624 in https://github.com/SeaQL/sea-orm/pull/292 + +## Breaking Changes +* Refactor `paginate()` & `count()` utilities into `PaginatorTrait`. You can use the paginator as usual but you might need to import `PaginatorTrait` manually when upgrading from previous version. + ```rust + use futures::TryStreamExt; + use sea_orm::{entity::*, query::*, tests_cfg::cake}; + + let mut cake_stream = cake::Entity::find() + .order_by_asc(cake::Column::Id) + .paginate(db, 50) + .into_stream(); + + while let Some(cakes) = cake_stream.try_next().await? { + // Do something on cakes: Vec + } + ``` +* The helper struct `Schema` converting `EntityTrait` into different `sea-query` statement now has to be initialized with `DbBackend`. + ```rust + use sea_orm::{tests_cfg::*, DbBackend, Schema}; + use sea_orm::sea_query::TableCreateStatement; + + // Before `0.4.x` + let _: TableCreateStatement = Schema::create_table_from_entity(cake::Entity); + + // Now + let schema: Schema = Schema::new(DbBackend::MySql); + let _: TableCreateStatement = schema.create_table_from_entity(cake::Entity); + ``` + +**Full Changelog**: https://github.com/SeaQL/sea-orm/compare/0.3.2...0.4.0 ## 0.3.2 - 2021-11-03 ### Fixed Issues