Skip to content

Commit

Permalink
[Blog] Edit
Browse files Browse the repository at this point in the history
  • Loading branch information
tyt2y3 committed Aug 4, 2024
1 parent 1e65a01 commit 233dbbe
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions Blog/blog/2024-08-04-sea-orm-1.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -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<E: EntityTrait>() -> usize {
E::PrimaryKey::iter().count() // before; runtime
<<E::PrimaryKey as PrimaryKeyTrait>::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`

Expand Down Expand Up @@ -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<E: EntityTrait>() -> usize {
E::PrimaryKey::iter().count() // before; runtime
<<E::PrimaryKey as PrimaryKeyTrait>::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)]
Expand Down

0 comments on commit 233dbbe

Please sign in to comment.