Skip to content

Commit

Permalink
Merge branch 'master' into insert-no-panic
Browse files Browse the repository at this point in the history
  • Loading branch information
billy1624 committed Dec 2, 2024
2 parents f7561c7 + 760b825 commit d279f3e
Show file tree
Hide file tree
Showing 52 changed files with 105 additions and 64 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ 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/).


## 1.1.2 - 2024-12-02

### Enhancements

- Added `ColumnTrait::enum_type_name()` to signify enum types https://github.com/SeaQL/sea-orm/pull/2415
- Added `DbBackend::boolean_value()` for database dependent boolean value https://github.com/SeaQL/sea-orm/pull/2415

## 1.1.1 - 2024-11-04

### Enhancements
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ members = [".", "sea-orm-macros", "sea-orm-codegen"]

[package]
name = "sea-orm"
version = "1.1.1"
version = "1.1.2"
authors = ["Chris Tsang <[email protected]>"]
edition = "2021"
description = "🐚 An async & dynamic ORM for Rust"
Expand Down Expand Up @@ -33,7 +33,7 @@ log = { version = "0.4", default-features = false }
tracing = { version = "0.1", default-features = false, features = ["attributes", "log"] }
rust_decimal = { version = "1", default-features = false, optional = true }
bigdecimal = { version = "0.4", default-features = false, optional = true }
sea-orm-macros = { version = "~1.1.1", path = "sea-orm-macros", default-features = false, features = ["strum"] }
sea-orm-macros = { version = "~1.1.2", path = "sea-orm-macros", default-features = false, features = ["strum"] }
sea-query = { version = "0.32.1", default-features = false, features = ["thread-safe", "hashable-value", "backend-mysql", "backend-postgres", "backend-sqlite"] }
sea-query-binder = { version = "0.7.0", default-features = false, optional = true }
strum = { version = "0.26", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion examples/actix_example/entity/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ serde = { version = "1", features = ["derive"] }

[dependencies.sea-orm]
path = "../../../" # remove this line in your own project
version = "~1.1.1" # sea-orm version
version = "~1.1.2" # sea-orm version
2 changes: 1 addition & 1 deletion examples/actix_example/migration/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ async-std = { version = "1", features = ["attributes", "tokio1"] }

[dependencies.sea-orm-migration]
path = "../../../sea-orm-migration" # remove this line in your own project
version = "~1.1.1" # sea-orm-migration version
version = "~1.1.2" # sea-orm-migration version
features = [
# Enable following runtime and db backend features if you want to run migration via CLI
# "runtime-actix-native-tls",
Expand Down
2 changes: 1 addition & 1 deletion examples/actix_example/service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ entity = { path = "../entity" }

[dependencies.sea-orm]
path = "../../../" # remove this line in your own project
version = "~1.1.1" # sea-orm version
version = "~1.1.2" # sea-orm version
features = [
"debug-print",
"runtime-async-std-native-tls",
Expand Down
2 changes: 1 addition & 1 deletion examples/axum_example/entity/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ serde = { version = "1", features = ["derive"] }

[dependencies.sea-orm]
path = "../../../" # remove this line in your own project
version = "~1.1.1" # sea-orm version
version = "~1.1.2" # sea-orm version
2 changes: 1 addition & 1 deletion examples/axum_example/migration/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ async-std = { version = "1", features = ["attributes", "tokio1"] }

[dependencies.sea-orm-migration]
path = "../../../sea-orm-migration" # remove this line in your own project
version = "~1.1.1" # sea-orm-migration version
version = "~1.1.2" # sea-orm-migration version
features = [
# Enable following runtime and db backend features if you want to run migration via CLI
# "runtime-tokio-native-tls",
Expand Down
2 changes: 1 addition & 1 deletion examples/axum_example/service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ entity = { path = "../entity" }

[dependencies.sea-orm]
path = "../../../" # remove this line in your own project
version = "~1.1.1" # sea-orm version
version = "~1.1.2" # sea-orm version
features = [
"debug-print",
"runtime-tokio-native-tls",
Expand Down
2 changes: 1 addition & 1 deletion examples/graphql_example/entity/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ version = "5.0.10"

[dependencies.sea-orm]
path = "../../../" # remove this line in your own project
version = "~1.1.1" # sea-orm version
version = "~1.1.2" # sea-orm version
2 changes: 1 addition & 1 deletion examples/graphql_example/migration/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ async-std = { version = "1", features = ["attributes", "tokio1"] }

[dependencies.sea-orm-migration]
path = "../../../sea-orm-migration" # remove this line in your own project
version = "~1.1.1" # sea-orm-migration version
version = "~1.1.2" # sea-orm-migration version
features = [
# Enable following runtime and db backend features if you want to run migration via CLI
# "runtime-tokio-native-tls",
Expand Down
2 changes: 1 addition & 1 deletion examples/graphql_example/service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ entity = { path = "../entity" }

[dependencies.sea-orm]
path = "../../../" # remove this line in your own project
version = "~1.1.1" # sea-orm version
version = "~1.1.2" # sea-orm version
features = [
"debug-print",
"runtime-async-std-native-tls",
Expand Down
2 changes: 1 addition & 1 deletion examples/jsonrpsee_example/entity/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ serde = { version = "1", features = ["derive"] }

[dependencies.sea-orm]
path = "../../../" # remove this line in your own project
version = "~1.1.1" # sea-orm version
version = "~1.1.2" # sea-orm version
2 changes: 1 addition & 1 deletion examples/jsonrpsee_example/migration/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ async-std = { version = "1", features = ["attributes", "tokio1"] }

[dependencies.sea-orm-migration]
path = "../../../sea-orm-migration" # remove this line in your own project
version = "~1.1.1" # sea-orm-migration version
version = "~1.1.2" # sea-orm-migration version
features = [
# Enable following runtime and db backend features if you want to run migration via CLI
# "runtime-tokio-native-tls",
Expand Down
2 changes: 1 addition & 1 deletion examples/jsonrpsee_example/service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ entity = { path = "../entity" }

[dependencies.sea-orm]
path = "../../../" # remove this line in your own project
version = "~1.1.1" # sea-orm version
version = "~1.1.2" # sea-orm version
features = [
"debug-print",
"runtime-tokio-native-tls",
Expand Down
2 changes: 1 addition & 1 deletion examples/loco_example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ tracing-subscriber = { version = "0.3.17", features = ["env-filter", "json"] }

[dependencies.sea-orm]
path = "../../" # remove this line in your own project
version = "~1.1.1" # sea-orm version
version = "~1.1.2" # sea-orm version
features = [
"sqlx-sqlite",
"sqlx-postgres",
Expand Down
2 changes: 1 addition & 1 deletion examples/loco_example/migration/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ loco-rs = { version = "0.7" }

[dependencies.sea-orm-migration]
path = "../../../sea-orm-migration" # remove this line in your own project
version = "~1.1.1" # sea-orm-migration version
version = "~1.1.2" # sea-orm-migration version
features = [
# Enable at least one `ASYNC_RUNTIME` and `DATABASE_DRIVER` feature if you want to run migration via CLI.
# View the list of supported features at https://www.sea-ql.org/SeaORM/docs/install-and-config/database-and-async-runtime.
Expand Down
2 changes: 1 addition & 1 deletion examples/loco_seaography/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ tower-service = { version = "0.3" }

[dependencies.sea-orm]
path = "../../" # remove this line in your own project
version = "~1.1.1" # sea-orm version
version = "~1.1.2" # sea-orm version
features = [
"sqlx-sqlite",
"sqlx-postgres",
Expand Down
2 changes: 1 addition & 1 deletion examples/loco_seaography/migration/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ loco-rs = { version = "0.7.0" }

[dependencies.sea-orm-migration]
path = "../../../sea-orm-migration" # remove this line in your own project
version = "~1.1.1" # sea-orm-migration version
version = "~1.1.2" # sea-orm-migration version
features = [
# Enable at least one `ASYNC_RUNTIME` and `DATABASE_DRIVER` feature if you want to run migration via CLI.
# View the list of supported features at https://www.sea-ql.org/SeaORM/docs/install-and-config/database-and-async-runtime.
Expand Down
2 changes: 1 addition & 1 deletion examples/loco_starter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ tracing-subscriber = { version = "0.3.17", features = ["env-filter", "json"] }

[dependencies.sea-orm]
path = "../../" # remove this line in your own project
version = "~1.1.1" # sea-orm version
version = "~1.1.2" # sea-orm version
features = [
"sqlx-sqlite",
"sqlx-postgres",
Expand Down
2 changes: 1 addition & 1 deletion examples/loco_starter/migration/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ loco-rs = { version = "0.7.0" }

[dependencies.sea-orm-migration]
path = "../../../sea-orm-migration" # remove this line in your own project
version = "~1.1.1" # sea-orm-migration version
version = "~1.1.2" # sea-orm-migration version
features = [
# Enable at least one `ASYNC_RUNTIME` and `DATABASE_DRIVER` feature if you want to run migration via CLI.
# View the list of supported features at https://www.sea-ql.org/SeaORM/docs/install-and-config/database-and-async-runtime.
Expand Down
2 changes: 1 addition & 1 deletion examples/poem_example/entity/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ serde = { version = "1", features = ["derive"] }

[dependencies.sea-orm]
path = "../../../" # remove this line in your own project
version = "~1.1.1" # sea-orm version
version = "~1.1.2" # sea-orm version
2 changes: 1 addition & 1 deletion examples/poem_example/migration/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ async-std = { version = "1", features = ["attributes", "tokio1"] }

[dependencies.sea-orm-migration]
path = "../../../sea-orm-migration" # remove this line in your own project
version = "~1.1.1" # sea-orm-migration version
version = "~1.1.2" # sea-orm-migration version
features = [
# Enable following runtime and db backend features if you want to run migration via CLI
# "runtime-tokio-native-tls",
Expand Down
2 changes: 1 addition & 1 deletion examples/poem_example/service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ entity = { path = "../entity" }

[dependencies.sea-orm]
path = "../../../" # remove this line in your own project
version = "~1.1.1" # sea-orm version
version = "~1.1.2" # sea-orm version
features = [
"debug-print",
"runtime-async-std-native-tls",
Expand Down
2 changes: 1 addition & 1 deletion examples/react_admin/backend/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ tower-service = { version = "0.3" }

[dependencies.sea-orm]
path = "../../../" # remove this line in your own project
version = "~1.1.1" # sea-orm version
version = "~1.1.2" # sea-orm version
features = [
"sqlx-sqlite",
"sqlx-postgres",
Expand Down
2 changes: 1 addition & 1 deletion examples/react_admin/backend/migration/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ loco-rs = { version = "0.7.0" }

[dependencies.sea-orm-migration]
path = "../../../../sea-orm-migration" # remove this line in your own project
version = "~1.1.1" # sea-orm-migration version
version = "~1.1.2" # sea-orm-migration version
features = [
# Enable at least one `ASYNC_RUNTIME` and `DATABASE_DRIVER` feature if you want to run migration via CLI.
# View the list of supported features at https://www.sea-ql.org/SeaORM/docs/install-and-config/database-and-async-runtime.
Expand Down
2 changes: 1 addition & 1 deletion examples/rocket_example/entity/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ rocket = { version = "0.5.0", features = ["json"] }

[dependencies.sea-orm]
path = "../../../" # remove this line in your own project
version = "~1.1.1" # sea-orm version
version = "~1.1.2" # sea-orm version
2 changes: 1 addition & 1 deletion examples/rocket_example/migration/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ async-std = { version = "1", features = ["attributes", "tokio1"] }

[dependencies.sea-orm-migration]
path = "../../../sea-orm-migration" # remove this line in your own project
version = "~1.1.1" # sea-orm-migration version
version = "~1.1.2" # sea-orm-migration version
features = [
# Enable following runtime and db backend features if you want to run migration via CLI
# "runtime-tokio-native-tls",
Expand Down
2 changes: 1 addition & 1 deletion examples/rocket_example/service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ entity = { path = "../entity" }

[dependencies.sea-orm]
path = "../../../" # remove this line in your own project
version = "~1.1.1" # sea-orm version
version = "~1.1.2" # sea-orm version
features = [
"runtime-tokio-native-tls",
"sqlx-postgres",
Expand Down
2 changes: 1 addition & 1 deletion examples/rocket_okapi_example/entity/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ rocket = { version = "0.5.0", features = ["json"] }

[dependencies.sea-orm]
path = "../../../" # remove this line in your own project
version = "~1.1.1" # sea-orm version
version = "~1.1.2" # sea-orm version

[dependencies.rocket_okapi]
version = "0.8.0"
2 changes: 1 addition & 1 deletion examples/rocket_okapi_example/migration/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ async-std = { version = "1", features = ["attributes", "tokio1"] }

[dependencies.sea-orm-migration]
path = "../../../sea-orm-migration" # remove this line in your own project
version = "~1.1.1" # sea-orm-migration version
version = "~1.1.2" # sea-orm-migration version
features = [
# Enable following runtime and db backend features if you want to run migration via CLI
# "runtime-tokio-native-tls",
Expand Down
2 changes: 1 addition & 1 deletion examples/rocket_okapi_example/service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ entity = { path = "../entity" }

[dependencies.sea-orm]
path = "../../../" # remove this line in your own project
version = "~1.1.1" # sea-orm version
version = "~1.1.2" # sea-orm version
features = [
"runtime-tokio-native-tls",
# "sqlx-postgres",
Expand Down
2 changes: 1 addition & 1 deletion examples/salvo_example/entity/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ salvo = { version = "0.50" }

[dependencies.sea-orm]
path = "../../../" # remove this line in your own project
version = "~1.1.1" # sea-orm version
version = "~1.1.2" # sea-orm version
2 changes: 1 addition & 1 deletion examples/salvo_example/migration/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ async-std = { version = "1", features = ["attributes", "tokio1"] }

[dependencies.sea-orm-migration]
path = "../../../sea-orm-migration" # remove this line in your own project
version = "~1.1.1" # sea-orm-migration version
version = "~1.1.2" # sea-orm-migration version
features = [
# Enable following runtime and db backend features if you want to run migration via CLI
# "runtime-tokio-native-tls",
Expand Down
2 changes: 1 addition & 1 deletion examples/salvo_example/service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ entity = { path = "../entity" }

[dependencies.sea-orm]
path = "../../../" # remove this line in your own project
version = "~1.1.1" # sea-orm version
version = "~1.1.2" # sea-orm version
features = [
"debug-print",
"runtime-tokio-native-tls",
Expand Down
4 changes: 2 additions & 2 deletions examples/seaography_example/migration/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ async-std = { version = "1", features = ["attributes", "tokio1"] }

[dependencies.sea-orm]
path = "../../../" # remove this line in your own project
version = "~1.1.1" # sea-orm version
version = "~1.1.2" # sea-orm version

[dependencies.sea-orm-migration]
path = "../../../sea-orm-migration" # remove this line in your own project
version = "~1.1.1" # sea-orm-migration version
version = "~1.1.2" # sea-orm-migration version
features = [
"runtime-async-std-native-tls",
"sqlx-mysql",
Expand Down
2 changes: 1 addition & 1 deletion examples/tonic_example/entity/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ serde = { version = "1", features = ["derive"] }

[dependencies.sea-orm]
path = "../../../" # remove this line in your own project
version = "~1.1.1" # sea-orm version
version = "~1.1.2" # sea-orm version
2 changes: 1 addition & 1 deletion examples/tonic_example/migration/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ async-std = { version = "1", features = ["attributes", "tokio1"] }

[dependencies.sea-orm-migration]
path = "../../../sea-orm-migration" # remove this line in your own project
version = "~1.1.1" # sea-orm-migration version
version = "~1.1.2" # sea-orm-migration version
features = [
# Enable following runtime and db backend features if you want to run migration via CLI
# "runtime-tokio-rustls",
Expand Down
2 changes: 1 addition & 1 deletion examples/tonic_example/service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ entity = { path = "../entity" }

[dependencies.sea-orm]
path = "../../../" # remove this line in your own project
version = "~1.1.1" # sea-orm version
version = "~1.1.2" # sea-orm version
features = [
"debug-print",
"runtime-tokio-rustls",
Expand Down
4 changes: 2 additions & 2 deletions sea-orm-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

[package]
name = "sea-orm-cli"
version = "1.1.1"
version = "1.1.2"
authors = [
"Chris Tsang <[email protected]>",
"Billy Chan <[email protected]>",
Expand Down Expand Up @@ -37,7 +37,7 @@ required-features = ["cli", "codegen"]
clap = { version = "4.3", features = ["env", "derive"], optional = true }
dotenvy = { version = "0.15", default-features = false, optional = true }
async-std = { version = "1.9", default-features = false, features = ["attributes", "tokio1"], optional = true }
sea-orm-codegen = { version = "=1.1.1", path = "../sea-orm-codegen", default-features = false, optional = true }
sea-orm-codegen = { version = "=1.1.2", path = "../sea-orm-codegen", default-features = false, optional = true }
sea-schema = { version = "0.16.0" }
sqlx = { version = "0.8.2", default-features = false, features = ["mysql", "postgres"], optional = true }
tracing-subscriber = { version = "0.3.17", default-features = false, features = ["env-filter", "fmt"] }
Expand Down
2 changes: 1 addition & 1 deletion sea-orm-codegen/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "sea-orm-codegen"
version = "1.1.1"
version = "1.1.2"
authors = ["Billy Chan <[email protected]>"]
edition = "2021"
description = "Code Generator for SeaORM"
Expand Down
2 changes: 1 addition & 1 deletion sea-orm-macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "sea-orm-macros"
version = "1.1.1"
version = "1.1.2"
authors = [ "Billy Chan <[email protected]>" ]
edition = "2021"
description = "Derive macros for SeaORM"
Expand Down
4 changes: 4 additions & 0 deletions sea-orm-macros/src/derives/active_enum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,10 @@ impl ActiveEnum {
.to_owned()
.into()
}

fn enum_type_name() -> Option<&'static str> {
Some(stringify!(#ident))
}
}

#[automatically_derived]
Expand Down
2 changes: 1 addition & 1 deletion sea-orm-macros/src/derives/case_style.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ impl CaseStyleHelpers for Ident {
}
}

impl<'meta> TryFrom<&ParseNestedMeta<'meta>> for CaseStyle {
impl TryFrom<&ParseNestedMeta<'_>> for CaseStyle {
type Error = syn::Error;

fn try_from(value: &ParseNestedMeta) -> Result<Self, Self::Error> {
Expand Down
Loading

0 comments on commit d279f3e

Please sign in to comment.