Releases: SeaQL/sea-orm
Releases Β· SeaQL/sea-orm
0.10.4
Bug Fixes
- Fix DeriveActiveEnum expand enum variant starts with number #1219
- [sea-orm-cli] Generate entity file for specified tables only #1245
- Support appending
DbErr
toMockDatabase
#1241
Enhancements
- Filter rows with
IS IN
enum values expression #1183 - [sea-orm-cli] Generate entity with relation variant order by name of reference table #1229
Full Changelog: 0.10.3...0.10.4
0.10.3
Bug Fixes
- [sea-orm-cli] Set search path when initializing Postgres connection for CLI generate entity #1212
- [sea-orm-cli] Generate
_
prefix to enum variant starts with number #1211 - Fix composite key cursor pagination #1216
- The logic for single-column primary key was correct, but for composite keys the logic was incorrect
Enhancements
- Added
Insert::exec_without_returning
#1208
House Keeping
- Remove dependency when not needed #1207
Full Changelog: 0.10.2...0.10.3
0.10.2
Enhancements
- [sea-orm-rocket] added
sqlx_logging
toConfig
#1192 - Collecting metrics for
query_one/all
#1165 - use GAT to elide
StreamTrait
lifetime #1161
Bug Fixes
- corrected the error name
UpdateGetPrimaryKey
#1180
Upgrades
- Update MSRV to 1.65
New Contributors
- @phidiaLam made their first contribution in #1160
- @sousandrei made their first contribution in #1168
- @frederikhors made their first contribution in #1174
- @jayay made their first contribution in #1192
Full Changelog: 0.10.1...0.10.2
0.10.1
Enhancements
- [sea-orm-cli] Escape module name defined with Rust keywords #1052
- [sea-orm-cli] Check to make sure migration name doesn't contain hyphen
-
in it #879, #1155 - Support
time
crate for SQLite #995
Bug Fixes
- [sea-orm-cli] Generate
Related
for m-to-n relation #1075 - [sea-orm-cli] Generate model entity with Postgres Enum field #1153
- [sea-orm-cli] Migrate up command apply all pending migrations #1010
- [sea-orm-cli] Conflicting short flag
-u
when executingmigrate generate
command #1157 - Prefix the usage of types with
sea_orm::
insideDeriveActiveEnum
derive macros #1146, #1154 - [sea-orm-cli] Generate model with
Vec<f32>
orVec<f64>
should not deriveEq
on the model struct #1158
House Keeping
- [sea-orm-cli] [sea-orm-migration] Add
cli
feature to optionally include dependencies that are required by the CLI #978
Upgrades
- Upgrade
sea-schema
to 0.10.2 #1153
New Contributors
- @andy128k made their first contribution in #1052
- @Rheydskey made their first contribution in #978
Full Changelog: 0.10.0...0.10.1
0.10.0
https://www.sea-ql.org/blog/2022-11-10-whats-new-in-0.10.x/
New Features
- Better error types (carrying SQLx Error) #1002
- Support array datatype in PostgreSQL #1132
- [sea-orm-cli] Generate entity files as a library or module #953
- [sea-orm-cli] Generate a new migration template with name prefix of unix timestamp #947
- [sea-orm-cli] Generate migration in modules #933
- [sea-orm-cli] Generate
DeriveRelation
on emptyRelation
enum #1019 - [sea-orm-cli] Generate entity derive
Eq
if possible #988 - [sea-orm-cli] Run migration on any PostgreSQL schema #1056
Enhancements
- Support
distinct
&distinct_on
expression #902 fn column()
also handle enum type #973- Added
acquire_timeout
onConnectOptions
#897 - [sea-orm-cli]
migrate fresh
command will drop all PostgreSQL types #864, #991 - Better compile error for entity without primary key #1020
- Added blanket implementations of
IntoActiveValue
forOption
values #833 - Added
into_model
&into_json
toCursor
#1112 - Added
set_schema_search_path
method toConnectOptions
for setting schema search path of PostgreSQL connection #1056 - Serialize
time
types asserde_json::Value
#1042 - Implements
fmt::Display
forActiveEnum
#986 - Implements
TryFrom<ActiveModel>
forModel
#990
Bug fixes
- Trim spaces when paginating raw SQL #1094
Breaking changes
- Replaced
usize
withu64
inPaginatorTrait
#789 - Type signature of
DbErr
changed as a result of #1002 ColumnType::Enum
structure changed:
enum ColumnType {
// then
Enum(String, Vec<String>)
// now
Enum {
/// Name of enum
name: DynIden,
/// Variants of enum
variants: Vec<DynIden>,
}
...
}
- A new method
array_type
was added toValueType
:
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 toDynIden
:
#[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
- Documentation grammar fixes #1050
- Replace
dotenv
withdotenvy
in examples #1085 - Exclude test_cfg module from SeaORM #1077
Integration
- Support
rocket_okapi
#1071
Upgrades
- Upgrade
sea-query
to 0.26 #985
New Contributors
- @mohs8421 made their first contribution in #750
- @STBoyden made their first contribution in #1015
- @wyatt-herkamp made their first contribution in #1012
- @FistedByDionysus made their first contribution in #1013
- @michidk made their first contribution in #1014
- @zoedberg made their first contribution in #1027
- @jimmycuadra made their first contribution in #1041
- @remlse made their first contribution in #933
- @shpun817 made their first contribution in #890
- @banool made their first contribution in #1060
- @Animeshz made their first contribution in #947
- @w93163red made their first contribution in #988
- @tusharxoxoxo made their first contribution in #1050
- @p0rtL6 made their first contribution in #1095
- @Sylk made their first contribution in #1100
- @wdcocq made their first contribution in #833
- @eum602 made their first contribution in #1071
- @tsirysndr made their first contribution in #1127
- @EstebanBorai made their first contribution in #1136
- @onichandame made their first contribution in #1135
Full Changelog: 0.9.0...0.10.0
0.9.3
0.9.2
Enhancements
- [sea-orm-cli] Migrator CLI handles init and generate commands #931
- [sea-orm-cli] added
with-copy-enums
flag to conditional deriveCopy
onActiveEnum
#936
House keeping
- Exclude
chrono
default features #950 - Set minimal rustc version to
1.60
#938 - Update
sea-query
to0.26.3
Notes
In this minor release, we removed time
v0.1 from the dependency graph
0.9.1
0.9.0
https://www.sea-ql.org/blog/2022-07-17-whats-new-in-0.9.0/
New Features
- Cursor pagination (#822)
- Custom join on conditions (#793)
DeriveMigrationName
andsea_orm_migration::util::get_file_stem
(#736)FromJsonQueryResult
for deserializingJson
from query result (#794)
Enhancements
- Added
sqlx_logging_level
toConnectOptions
(#800) - Added
num_items_and_pages
toPaginator
(#768) - Added
TryFromU64
fortime
(#849) - Added
Insert::on_conflict
(#791) - Added
QuerySelect::join_as
andQuerySelect::join_as_rev
(#852) - Include column name in
TryGetError::Null
(#853) - [sea-orm-cli] Improve logging (#735)
- [sea-orm-cli] Generate enum with numeric like variants (#588)
- [sea-orm-cli] Allow old pending migration to be applied (#755)
- [sea-orm-cli] Skip generating entity for ignored tables (#837)
- [sea-orm-cli] Generate code for
time
crate (#724) - [sea-orm-cli] Add various blob column types (#850)
- [sea-orm-cli] Generate entity files with Postgres's schema name (#422)
Upgrades
- Upgrade
clap
to 3.2 (#706) - Upgrade
time
to 0.3 (#834) - Upgrade
sqlx
to 0.6 (#834) - Upgrade
uuid
to 1.0 (#834) - Upgrade
sea-query
to 0.26 (#834) - Upgrade
sea-schema
to 0.9 (#834)
House keeping
- Refactor stream metrics (#778)
Bug Fixes
- [sea-orm-cli] skip checking connection string for credentials (#851)
Breaking changes
SelectTwoMany::one()
has been dropped #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 enablesqlx?/time
only ifsqlx
is already enabled. As a consequence, now the featureswith-json
,with-chrono
,with-rust_decimal
,with-uuid
,with-time
will not be enabled as a side-effects of enablingsqlx
.
New Contributors
- @itsparser made their first contribution in #714
- @Eugeny made their first contribution in #716
- @SH11235 made their first contribution in #717
- @Technik97 made their first contribution in #718
- @frankhorv made their first contribution in #719
- @hilary888 made their first contribution in #741
- @aslamplr made their first contribution in #776
- @Tricked-dev made their first contribution in #712
- @kyoto7250 made their first contribution in #735
- @cache-missing made their first contribution in #792
- @POPPIN-FUMI made their first contribution in #803
- @xiaoquisme made their first contribution in #818
- @SandaruKasa made their first contribution in #800
- @liberwang1013 made their first contribution in #791
- @smonv made their first contribution in #706
- @fistons made their first contribution in #768
- @dragonnn made their first contribution in #769
- @lingdu1234 made their first contribution in #857
- @nahuakang made their first contribution in #724
- @a5huynh made their first contribution in #856
Full Changelog: 0.8.0...0.9.0
0.8.0
https://www.sea-ql.org/blog/2022-05-15-whats-new-in-0.8.0/
New Features
- [sea-orm-cli]
sea migrate generate
to generate a new, empty migration file #656
Enhancements
- Add
max_connections
option to CLI #670 - Derive
Eq
,Clone
forDbErr
#677 - Add
is_changed
toActiveModelTrait
#683
Bug Fixes
- Fix
DerivePrimaryKey
with custom primary key column name #694 - Fix
DeriveEntityModel
macros override column name #695 - Fix Insert with no value supplied using
DEFAULT
#589
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 bysea_orm_migration::prelude
in all migration files
Upgrades
- Upgrade
sea-query
to 0.24.x,sea-schema
to 0.8.x - Upgrade example to Actix Web 4, Actix Web 3 remains #638
- Added Tonic gRPC example #659
- Upgrade GraphQL example to use axum 0.5.x
- Upgrade axum example to 0.5.x
Fixed Issues
- Failed to insert row with only default values #420
- Reduce database connections to 1 during codegen #511
- Column names with single letters separated by underscores are concatenated #630
- Update Actix Web examples #639
- Lower function missing #672
- is_changed on active_model #674
- Failing find_with_related with column_name attribute #693
New Contributors
- @niuhuan made their first contribution in #636
- @Chaostheorie made their first contribution in #638
- @giripriyadarshan made their first contribution in #659
- @fairingrey made their first contribution in #667
- @mibes404 made their first contribution in #673
- @benluelo made their first contribution in #670
- @SebastienGllmt made their first contribution in #677
- @viktorbahr made their first contribution in #656
- @kirawi made their first contribution in #683
Full Changelog: 0.7.1...0.8.0