From 233dbbeebee7d77768d01e8a8b64327404ad17cd Mon Sep 17 00:00:00 2001 From: Chris Tsang Date: Sun, 4 Aug 2024 13:14:59 +0100 Subject: [PATCH] [Blog] Edit --- Blog/blog/2024-08-04-sea-orm-1.0.md | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/Blog/blog/2024-08-04-sea-orm-1.0.md b/Blog/blog/2024-08-04-sea-orm-1.0.md index bcb3234854..798c9b95c6 100644 --- a/Blog/blog/2024-08-04-sea-orm-1.0.md +++ b/Blog/blog/2024-08-04-sea-orm-1.0.md @@ -114,18 +114,7 @@ Data types will be mapped to SQLite types with a custom naming scheme following The full type mapping table is [documented here](https://docs.rs/sea-query/0.31.0-rc.4/sea_query/table/enum.ColumnType.html). For more information, please refer to our [previous blog post](/blog/2024-04-08-whats-new-in-seaorm-1.0-rc.x). -### Introduce `PrimaryKeyArity` with `ARITY` Constant - -[#2185](https://github.com/SeaQL/sea-orm/pull/2185) Introduce `PrimaryKeyArity` with `ARITY` constant - -```rust -fn get_arity_of() -> usize { - E::PrimaryKey::iter().count() // before; runtime - <::ValueType as PrimaryKeyArity>::ARITY // now; compile-time -} -``` - -### Auto Generated ActiveEnum String Values and Model Column Names +### Alternative casing support for `EntityModel` & `ActiveEnum` [#2170](https://github.com/SeaQL/sea-orm/pull/2170) Added `rename_all` attribute to `DeriveEntityModel` & `DeriveActiveEnum` @@ -155,6 +144,15 @@ pub enum TestEnum { ### Other Enhancements +* [#2185](https://github.com/SeaQL/sea-orm/pull/2185) `PrimaryKeyArity` trait with `ARITY` Constant + +```rust +fn get_arity_of() -> usize { + E::PrimaryKey::iter().count() // before; runtime + <::ValueType as PrimaryKeyArity>::ARITY // now; compile-time +} +``` + * [#2137](https://github.com/SeaQL/sea-orm/pull/2137) `DerivePartialModel` macro attribute `entity` now supports `syn::Type` ```rust #[derive(DerivePartialModel)]