Skip to content

Commit

Permalink
Merge branch 'master' into pr/2088
Browse files Browse the repository at this point in the history
  • Loading branch information
billy1624 committed Feb 6, 2024
2 parents d64864d + 6995dd6 commit b9de343
Show file tree
Hide file tree
Showing 146 changed files with 19,146 additions and 423 deletions.
1 change: 1 addition & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ jobs:
examples/basic,
examples/graphql_example,
examples/jsonrpsee_example,
examples/loco_example,
examples/poem_example,
examples/proxy_gluesql_example,
examples/rocket_example,
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ Cargo.lock
.vscode
.idea/*
*/.idea/*
.env.local
.env.local
.DS_Store
21 changes: 17 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,25 @@ 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/).

## Master - Pending
## 1.0.0-rc.2 - Pending

### Breaking Changes

* Updated Strum to version 0.26 https://github.com/SeaQL/sea-orm/pull/2088

## 1.0.0-rc.1 - 2024-02-06

### Breaking Changes

* Rework SQLite type mappings https://github.com/SeaQL/sea-orm/pull/2078
* Updated `sea-query` to `0.31`

## 0.12.14 - 2024-02-05

* Added feature flag `sqlite-use-returning-for-3_35` to use SQLite's returning https://github.com/SeaQL/sea-orm/pull/2070
* Update Strum to version 0.26 https://github.com/SeaQL/sea-orm/pull/2088
* Added Loco example https://github.com/SeaQL/sea-orm/pull/2092

## 0.12.12 - 2023-01-22
## 0.12.12 - 2024-01-22

### Bug Fixes

Expand All @@ -21,7 +34,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

* Added `ConnectOptions::test_before_acquire`

## 0.12.11 - 2023-01-14
## 0.12.11 - 2024-01-14

### New Features

Expand Down
101 changes: 16 additions & 85 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 = "0.12.12"
version = "1.0.0-rc.1"
authors = ["Chris Tsang <[email protected]>"]
edition = "2021"
description = "🐚 An async & dynamic ORM for Rust"
Expand All @@ -16,15 +16,7 @@ keywords = ["async", "orm", "mysql", "postgres", "sqlite"]
rust-version = "1.65"

[package.metadata.docs.rs]
features = [
"default",
"sqlx-all",
"mock",
"proxy",
"runtime-async-std-native-tls",
"postgres-array",
"sea-orm-internal",
]
features = ["default", "sqlx-all", "mock", "proxy", "runtime-async-std-native-tls", "postgres-array", "sea-orm-internal"]
rustdoc-args = ["--cfg", "docsrs"]

[lib]
Expand All @@ -38,23 +30,12 @@ chrono = { version = "0.4.30", default-features = false, optional = true }
time = { version = "0.3", default-features = false, optional = true }
futures = { version = "0.3", default-features = false, features = ["std"] }
log = { version = "0.4", default-features = false }
tracing = { version = "0.1", default-features = false, features = [
"attributes",
"log",
] }
tracing = { version = "0.1", default-features = false, features = ["attributes", "log"] }
rust_decimal = { version = "1", default-features = false, optional = true }
bigdecimal = { version = "0.3", default-features = false, optional = true }
sea-orm-macros = { version = "0.12.12", path = "sea-orm-macros", default-features = false, features = [
"strum",
] }
sea-query = { version = "0.30.4", default-features = false, features = [
"thread-safe",
"hashable-value",
"backend-mysql",
"backend-postgres",
"backend-sqlite",
] }
sea-query-binder = { version = "0.5.0", default-features = false, optional = true }
sea-orm-macros = { version = "1.0.0-rc.1", path = "sea-orm-macros", default-features = false, features = ["strum"] }
sea-query = { version = "0.31.0-rc.3", default-features = false, features = ["thread-safe", "hashable-value", "backend-mysql", "backend-postgres", "backend-sqlite"] }
sea-query-binder = { version = "0.6.0-rc.1", default-features = false, optional = true }
strum = { version = "0.26", default-features = false }
serde = { version = "1.0", default-features = false }
serde_json = { version = "1.0", default-features = false, optional = true }
Expand All @@ -73,13 +54,7 @@ tokio = { version = "1.6", features = ["full"] }
actix-rt = { version = "2.2.0" }
maplit = { version = "1" }
tracing-subscriber = { version = "0.3.17", features = ["env-filter"] }
sea-orm = { path = ".", features = [
"mock",
"debug-print",
"tests-cfg",
"postgres-array",
"sea-orm-internal",
] }
sea-orm = { path = ".", features = ["mock", "debug-print", "tests-cfg", "postgres-array", "sea-orm-internal"] }
pretty_assertions = { version = "0.7" }
time = { version = "0.3", features = ["macros"] }
uuid = { version = "1", features = ["v4"] }
Expand All @@ -101,63 +76,19 @@ default = [
macros = ["sea-orm-macros/derive"]
mock = []
proxy = ["serde_json", "serde/derive"]
with-json = [
"serde_json",
"sea-query/with-json",
"chrono?/serde",
"time?/serde",
"uuid?/serde",
"sea-query-binder?/with-json",
"sqlx?/json",
]
with-chrono = [
"chrono",
"sea-query/with-chrono",
"sea-query-binder?/with-chrono",
"sqlx?/chrono",
]
with-rust_decimal = [
"rust_decimal",
"sea-query/with-rust_decimal",
"sea-query-binder?/with-rust_decimal",
"sqlx?/rust_decimal",
]
with-bigdecimal = [
"bigdecimal",
"sea-query/with-bigdecimal",
"sea-query-binder?/with-bigdecimal",
"sqlx?/bigdecimal",
]
with-uuid = [
"uuid",
"sea-query/with-uuid",
"sea-query-binder?/with-uuid",
"sqlx?/uuid",
]
with-time = [
"time",
"sea-query/with-time",
"sea-query-binder?/with-time",
"sqlx?/time",
]
postgres-array = [
"sea-query/postgres-array",
"sea-query-binder?/postgres-array",
"sea-orm-macros/postgres-array",
]
json-array = [
"postgres-array",
] # this does not actually enable sqlx-postgres, but only a few traits to support array in sea-query
with-json = ["serde_json", "sea-query/with-json", "chrono?/serde", "time?/serde", "uuid?/serde", "sea-query-binder?/with-json", "sqlx?/json"]
with-chrono = ["chrono", "sea-query/with-chrono", "sea-query-binder?/with-chrono", "sqlx?/chrono"]
with-rust_decimal = ["rust_decimal", "sea-query/with-rust_decimal", "sea-query-binder?/with-rust_decimal", "sqlx?/rust_decimal"]
with-bigdecimal = ["bigdecimal", "sea-query/with-bigdecimal", "sea-query-binder?/with-bigdecimal", "sqlx?/bigdecimal"]
with-uuid = ["uuid", "sea-query/with-uuid", "sea-query-binder?/with-uuid", "sqlx?/uuid"]
with-time = ["time", "sea-query/with-time", "sea-query-binder?/with-time", "sqlx?/time"]
postgres-array = ["sea-query/postgres-array", "sea-query-binder?/postgres-array", "sea-orm-macros/postgres-array"]
json-array = ["postgres-array"] # this does not actually enable sqlx-postgres, but only a few traits to support array in sea-query
sea-orm-internal = []
sqlx-dep = []
sqlx-all = ["sqlx-mysql", "sqlx-postgres", "sqlx-sqlite"]
sqlx-mysql = ["sqlx-dep", "sea-query-binder/sqlx-mysql", "sqlx/mysql"]
sqlx-postgres = [
"sqlx-dep",
"sea-query-binder/sqlx-postgres",
"sqlx/postgres",
"postgres-array",
]
sqlx-postgres = ["sqlx-dep", "sea-query-binder/sqlx-postgres", "sqlx/postgres", "postgres-array"]
sqlx-sqlite = ["sqlx-dep", "sea-query-binder/sqlx-sqlite", "sqlx/sqlite"]
sqlite-use-returning-for-3_35 = []
runtime-async-std = []
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,15 @@ A big shout out to our contributors!

We invite you to participate, contribute and together help build Rust's future.

### Gold Sponsors

<a href="https://osmos.io/">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://www.sea-ql.org/static/sponsors/Osmos-dark.svg">
<img src="https://www.sea-ql.org/static/sponsors/Osmos.svg" width="238">
</picture>
</a>

## Mascot

A friend of Ferris, Terres the hermit crab is the official mascot of SeaORM. His hobby is collecting shells.
Expand Down
2 changes: 1 addition & 1 deletion examples/actix3_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 = "0.12.12" # sea-orm version
version = "1.0.0-rc.1" # sea-orm version
2 changes: 1 addition & 1 deletion examples/actix3_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 = "0.12.12" # sea-orm-migration version
version = "1.0.0-rc.1" # sea-orm-migration version
features = [
# Enable following runtime and db backend features if you want to run migration via CLI
# "runtime-async-std-native-tls",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use sea_orm_migration::prelude::*;
use sea_orm_migration::{prelude::*, schema::*};

#[derive(DeriveMigrationName)]
pub struct Migration;
Expand All @@ -11,15 +11,9 @@ impl MigrationTrait for Migration {
Table::create()
.table(Posts::Table)
.if_not_exists()
.col(
ColumnDef::new(Posts::Id)
.integer()
.not_null()
.auto_increment()
.primary_key(),
)
.col(ColumnDef::new(Posts::Title).string().not_null())
.col(ColumnDef::new(Posts::Text).string().not_null())
.col(pk_auto(Posts::Id))
.col(string(Posts::Title))
.col(string(Posts::Text))
.to_owned(),
)
.await
Expand Down
2 changes: 1 addition & 1 deletion examples/actix3_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 = "0.12.12" # sea-orm version
version = "1.0.0-rc.1" # sea-orm version
features = [
"debug-print",
"runtime-async-std-native-tls",
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 = "0.12.12" # sea-orm version
version = "1.0.0-rc.1" # 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 = "0.12.12" # sea-orm-migration version
version = "1.0.0-rc.1" # 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
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use sea_orm_migration::prelude::*;
use sea_orm_migration::{prelude::*, schema::*};

#[derive(DeriveMigrationName)]
pub struct Migration;
Expand All @@ -11,15 +11,9 @@ impl MigrationTrait for Migration {
Table::create()
.table(Posts::Table)
.if_not_exists()
.col(
ColumnDef::new(Posts::Id)
.integer()
.not_null()
.auto_increment()
.primary_key(),
)
.col(ColumnDef::new(Posts::Title).string().not_null())
.col(ColumnDef::new(Posts::Text).string().not_null())
.col(pk_auto(Posts::Id))
.col(string(Posts::Title))
.col(string(Posts::Text))
.to_owned(),
)
.await
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 = "0.12.12" # sea-orm version
version = "1.0.0-rc.1" # 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 = "0.12.12" # sea-orm version
version = "1.0.0-rc.1" # 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 = "0.12.12" # sea-orm-migration version
version = "1.0.0-rc.1" # 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
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use sea_orm_migration::prelude::*;
use sea_orm_migration::{prelude::*, schema::*};

#[derive(DeriveMigrationName)]
pub struct Migration;
Expand All @@ -11,15 +11,9 @@ impl MigrationTrait for Migration {
Table::create()
.table(Posts::Table)
.if_not_exists()
.col(
ColumnDef::new(Posts::Id)
.integer()
.not_null()
.auto_increment()
.primary_key(),
)
.col(ColumnDef::new(Posts::Title).string().not_null())
.col(ColumnDef::new(Posts::Text).string().not_null())
.col(pk_auto(Posts::Id))
.col(string(Posts::Title))
.col(string(Posts::Text))
.to_owned(),
)
.await
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 = "0.12.12" # sea-orm version
version = "1.0.0-rc.1" # sea-orm version
features = [
"debug-print",
"runtime-tokio-native-tls",
Expand Down
2 changes: 1 addition & 1 deletion examples/basic/src/example_filling.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ impl ColumnTrait for Column {
fn def(&self) -> ColumnDef {
match self {
Self::Id => ColumnType::Integer.def(),
Self::Name => ColumnType::String(None).def(),
Self::Name => ColumnType::string(None).def(),
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion examples/basic/src/example_fruit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ impl ColumnTrait for Column {
fn def(&self) -> ColumnDef {
match self {
Self::Id => ColumnType::Integer.def(),
Self::Name => ColumnType::String(None).def(),
Self::Name => ColumnType::string(None).def(),
Self::CakeId => ColumnType::Integer.def(),
}
}
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 = "0.12.12" # sea-orm version
version = "1.0.0-rc.1" # 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 = "0.12.12" # sea-orm-migration version
version = "1.0.0-rc.1" # 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
Loading

0 comments on commit b9de343

Please sign in to comment.