Skip to content

Commit

Permalink
Merge branch 'master' into pr/2326
Browse files Browse the repository at this point in the history
  • Loading branch information
billy1624 committed Oct 4, 2024
2 parents 99ef226 + 8339dbb commit 88d89ba
Show file tree
Hide file tree
Showing 171 changed files with 19,225 additions and 1,485 deletions.
77 changes: 40 additions & 37 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ on:
- '.github/ISSUE_TEMPLATE/**'
branches:
- master
- 1.*.x
- 0.*.x
- pr/**/ci
- ci-*
Expand Down Expand Up @@ -92,7 +93,7 @@ jobs:
contains(steps.git-log.outputs.message, '[issues]')
}}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- id: git-log
Expand All @@ -102,7 +103,7 @@ jobs:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
Expand All @@ -117,7 +118,7 @@ jobs:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
Expand All @@ -141,9 +142,9 @@ jobs:
runtime: [async-std]
tls: [native-tls, rustls]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: |
~/.cargo/registry
Expand All @@ -168,9 +169,9 @@ jobs:
runtime: [actix]
tls: [native-tls, rustls]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: |
~/.cargo/registry
Expand All @@ -195,9 +196,9 @@ jobs:
runtime: [tokio]
tls: [native-tls, rustls]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: |
~/.cargo/registry
Expand All @@ -211,7 +212,7 @@ jobs:
name: Unit Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo test --workspace
- run: cargo test --manifest-path sea-orm-cli/Cargo.toml
Expand All @@ -222,7 +223,7 @@ jobs:
if: ${{ (needs.init.outputs.run-partial == 'true' && needs.init.outputs.run-cli == 'true') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo install --path sea-orm-cli --debug

Expand All @@ -238,19 +239,20 @@ jobs:
examples/basic,
examples/graphql_example,
examples/jsonrpsee_example,
examples/loco_example,
examples/loco_starter,
examples/loco_seaography,
# examples/loco_example,
# examples/loco_starter,
# examples/loco_seaography,
examples/poem_example,
examples/proxy_gluesql_example,
# examples/react_admin,
examples/rocket_example,
examples/rocket_okapi_example,
examples/salvo_example,
examples/seaography_example,
examples/tonic_example,
]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- if: ${{ contains(matrix.path, 'tonic_example') }}
uses: arduino/setup-protoc@v1
- uses: dtolnay/rust-toolchain@master
Expand All @@ -259,6 +261,7 @@ jobs:
components: rustfmt
- run: find ${{ matrix.path }} -type f -name 'Cargo.toml' -print0 | xargs -t -0 -I {} cargo fmt --manifest-path {} -- --check
- uses: dtolnay/rust-toolchain@stable
- run: find ${{ matrix.path }} -type f -name 'Cargo.toml' -print0 | xargs -t -0 -I {} cargo update --manifest-path {}
- run: find ${{ matrix.path }} -type f -name 'Cargo.toml' -print0 | xargs -t -0 -I {} cargo build --manifest-path {}
- run: find ${{ matrix.path }} -type f -name 'Cargo.toml' -print0 | xargs -t -0 -I {} cargo test --manifest-path {}
- run: ${{'! '}}${{ '[ -d "' }}${{ matrix.path }}${{ '/service" ]' }} || find ${{ matrix.path }}/service -type f -name 'Cargo.toml' -print0 | xargs -t -0 -I {} cargo test --manifest-path {} --features mock
Expand All @@ -269,7 +272,7 @@ jobs:
if: ${{ (needs.init.outputs.run-partial == 'true' && needs.init.outputs.run-issues == 'true') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- id: set-matrix
run: echo "path_matrix=$(find issues -type f -name 'Cargo.toml' -printf '%P\0' | jq -Rc '[ split("\u0000") | .[] | "issues/\(.)" ]')" >> $GITHUB_OUTPUT
outputs:
Expand All @@ -287,7 +290,7 @@ jobs:
matrix:
path: ${{ fromJson(needs.issues-matrix.outputs.path_matrix) }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo build --manifest-path ${{ matrix.path }}
- run: cargo test --manifest-path ${{ matrix.path }}
Expand All @@ -311,9 +314,9 @@ jobs:
runtime: [async-std]
tls: [native-tls, rustls]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: |
~/.cargo/registry
Expand Down Expand Up @@ -342,7 +345,7 @@ jobs:
strategy:
fail-fast: false
matrix:
version: [8.0, 5.7]
version: [lts, 5.7]
runtime: [actix]
tls: [native-tls]
services:
Expand All @@ -354,7 +357,6 @@ jobs:
MYSQL_USER: sea
MYSQL_PASSWORD: sea
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_ROOT_PASSWORD:
ports:
- "3306:3306"
options: >-
Expand All @@ -363,9 +365,9 @@ jobs:
--health-timeout=5s
--health-retries=3
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: |
~/.cargo/registry
Expand All @@ -392,30 +394,31 @@ jobs:
strategy:
fail-fast: false
matrix:
version: [10.6]
version: [lts]
runtime: [actix]
tls: [native-tls]
services:
mysql:
mariadb:
image: mariadb:${{ matrix.version }}
env:
MYSQL_HOST: 127.0.0.1
MYSQL_DB: mysql
MYSQL_USER: sea
MYSQL_PASSWORD: sea
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_ROOT_PASSWORD:
MARIADB_HOST: 127.0.0.1
MARIADB_DB: mysql
MARIADB_USER: sea
MARIADB_PASSWORD: sea
MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: yes
ports:
- "3306:3306"
options: >-
--health-cmd="mysqladmin ping"
--health-cmd="healthcheck.sh
--connect
--innodb_initialized"
--health-interval=10s
--health-timeout=5s
--health-retries=3
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: |
~/.cargo/registry
Expand All @@ -441,7 +444,7 @@ jobs:
strategy:
fail-fast: false
matrix:
version: [14, 15, 16]
version: [14, 16]
runtime: [tokio]
tls: [native-tls]
services:
Expand All @@ -459,9 +462,9 @@ jobs:
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: |
~/.cargo/registry
Expand Down
41 changes: 41 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,47 @@ 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.0 - Pending

### Versions

+ `1.1.0-rc.1`: 2024-08-09

### Enhancements

* [sea-orm-macros] Call `EnumIter::get` using fully qualified syntax https://github.com/SeaQL/sea-orm/pull/2321
* Construct `DatabaseConnection` directly from `sqlx::PgPool`, `sqlx::SqlitePool` and `sqlx::MySqlPool` https://github.com/SeaQL/sea-orm/pull/2348

### Upgrades

* Upgrade `sqlx` to `0.8.2` https://github.com/SeaQL/sea-orm/pull/2305, https://github.com/SeaQL/sea-orm/pull/2371
* Upgrade `bigdecimal` to `0.4` https://github.com/SeaQL/sea-orm/pull/2305
* Upgrade `sea-query` to `0.32.0-rc` https://github.com/SeaQL/sea-orm/pull/2305
* Upgrade `sea-query-binder` to `0.7.0-rc` https://github.com/SeaQL/sea-orm/pull/2305
* Upgrade `sea-schema` to `0.16.0-rc` https://github.com/SeaQL/sea-orm/pull/2305
* Upgrade `ouroboros` to `0.18` https://github.com/SeaQL/sea-orm/pull/2353

### House keeping

* Fix typos https://github.com/SeaQL/sea-orm/pull/2360
* Update documentations https://github.com/SeaQL/sea-orm/pull/2345

## 1.0.1 - 2024-08-26

### New Features

* Added `ConnectOptions::connect_lazy` for creating DB connection pools without establishing connections up front https://github.com/SeaQL/sea-orm/pull/2268

### Breaking Changes

* Changed `ProxyDatabaseTrait` methods to async. It's a breaking change, but it should have been part of the 1.0 release.
The feature is behind the feature guard `proxy`, and we believe it shouldn't impact majority of users.
https://github.com/SeaQL/sea-orm/pull/2278

### Bug Fixes

* [sea-orm-codegen] Fix `ColumnType` to Rust type resolution https://github.com/SeaQL/sea-orm/pull/2313

## 1.0.0 - 2024-08-02

### Versions
Expand Down
2 changes: 1 addition & 1 deletion COMMUNITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ If you have built an app using SeaORM and want to showcase it, feel free to open

#### Url Shortener
- [Dinoly](https://github.com/ippsav/Dinoly) | An url shortener using Axum web framework and SeaORM | DB: Postgres
- [SlashURL](https://github.com/henriquekirchheck/slashurl) | A url shortener using Rust designed to be implemented anywere | DB: PostgreSQL
- [SlashURL](https://github.com/henriquekirchheck/slashurl) | A url shortener using Rust designed to be implemented anywhere | DB: PostgreSQL
- [url_shortener](https://github.com/michidk/url_shortener) | A simple self-hosted URL shortener written in Rust | DB: MySQL, Postgres, SQLite

#### Desktop / CLI Apps
Expand Down
16 changes: 8 additions & 8 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.0.0"
version = "1.1.0-rc.1"
authors = ["Chris Tsang <[email protected]>"]
edition = "2021"
description = "🐚 An async & dynamic ORM for Rust"
Expand Down Expand Up @@ -32,16 +32,16 @@ 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"] }
rust_decimal = { version = "1", default-features = false, optional = true }
bigdecimal = { version = "0.3", default-features = false, optional = true }
sea-orm-macros = { version = "~1.0.0", path = "sea-orm-macros", default-features = false, features = ["strum"] }
sea-query = { version = "0.31.0", default-features = false, features = ["thread-safe", "hashable-value", "backend-mysql", "backend-postgres", "backend-sqlite"] }
sea-query-binder = { version = "0.6.0", default-features = false, optional = true }
bigdecimal = { version = "0.4", default-features = false, optional = true }
sea-orm-macros = { version = "~1.1.0-rc.1", path = "sea-orm-macros", default-features = false, features = ["strum"] }
sea-query = { version = "0.32.0-rc.1", default-features = false, features = ["thread-safe", "hashable-value", "backend-mysql", "backend-postgres", "backend-sqlite"] }
sea-query-binder = { version = "0.7.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 }
sqlx = { version = "0.7", default-features = false, optional = true }
sqlx = { version = "0.8.2", default-features = false, optional = true }
uuid = { version = "1", default-features = false, optional = true }
ouroboros = { version = "0.17", default-features = false }
ouroboros = { version = "0.18", default-features = false }
url = { version = "2.2", default-features = false }
thiserror = { version = "1", default-features = false }

Expand Down Expand Up @@ -76,7 +76,7 @@ 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-json = ["serde_json", "sea-query/with-json", "chrono?/serde", "rust_decimal?/serde", "bigdecimal?/serde", "uuid?/serde", "time?/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"]
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.0.0" # sea-orm version
version = "~1.1.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 = "~1.0.0" # sea-orm-migration version
version = "~1.1.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
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.0.0" # sea-orm version
version = "~1.1.0-rc.1" # sea-orm version
features = [
"debug-print",
"runtime-async-std-native-tls",
Expand Down
6 changes: 3 additions & 3 deletions examples/axum_example/api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ async fn create_post(

let data = FlashData {
kind: "success".to_owned(),
message: "Post succcessfully added".to_owned(),
message: "Post successfully added".to_owned(),
};

Ok(post_response(&mut cookies, data))
Expand Down Expand Up @@ -179,7 +179,7 @@ async fn update_post(

let data = FlashData {
kind: "success".to_owned(),
message: "Post succcessfully updated".to_owned(),
message: "Post successfully updated".to_owned(),
};

Ok(post_response(&mut cookies, data))
Expand All @@ -196,7 +196,7 @@ async fn delete_post(

let data = FlashData {
kind: "success".to_owned(),
message: "Post succcessfully deleted".to_owned(),
message: "Post successfully deleted".to_owned(),
};

Ok(post_response(&mut cookies, data))
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.0.0" # sea-orm version
version = "~1.1.0-rc.1" # sea-orm version
Loading

0 comments on commit 88d89ba

Please sign in to comment.