Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,10 @@ jobs:
kind: build
- label: tokio native-tls mysql
kind: test
features: sqlx-mysql,runtime-tokio-native-tls
features: sqlx-mysql,runtime-tokio-native-tls,unimplemented-jiff-sqlx-mysql
- label: tokio rustls mysql
kind: test
features: sqlx-mysql,runtime-tokio-rustls
features: sqlx-mysql,runtime-tokio-rustls,unimplemented-jiff-sqlx-mysql
- label: tokio native-tls postgres
kind: test
features: sqlx-postgres,runtime-tokio-native-tls
Expand Down Expand Up @@ -367,8 +367,10 @@ jobs:
- working-directory: ./sea-orm-sync
run: cargo test --test '*' --features tests-features,rusqlite
- working-directory: ./sea-orm-sync/examples/quickstart
name: run quickstart example
run: cargo run
- working-directory: ./sea-orm-sync/examples/parquet_example
name: run parquet example
run: cargo run

mysql:
Expand Down Expand Up @@ -417,8 +419,8 @@ jobs:
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-mysql-tests-${{ hashFiles('**/Cargo.toml') }}
- uses: mozilla-actions/sccache-action@v0.0.9
- run: cargo test --test '*' --features tests-features,sqlx-mysql,runtime-${{ matrix.runtime }}-${{ matrix.tls }} --no-run
- run: cargo test --test '*' --features tests-features,sqlx-mysql,runtime-${{ matrix.runtime }}-${{ matrix.tls }}
- run: cargo test --test '*' --features tests-features,sqlx-mysql,runtime-${{ matrix.runtime }}-${{ matrix.tls }},unimplemented-jiff-sqlx-mysql --no-run
- run: cargo test --test '*' --features tests-features,sqlx-mysql,runtime-${{ matrix.runtime }}-${{ matrix.tls }},unimplemented-jiff-sqlx-mysql
- run: cargo test --manifest-path sea-orm-migration/Cargo.toml --test '*' --features sqlx-mysql,runtime-${{ matrix.runtime }}-${{ matrix.tls }} --no-run
- run: cargo test --manifest-path sea-orm-migration/Cargo.toml --test '*' --features sqlx-mysql,runtime-${{ matrix.runtime }}-${{ matrix.tls }}

Expand Down Expand Up @@ -470,8 +472,8 @@ jobs:
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-mariadb-tests-${{ hashFiles('**/Cargo.toml') }}
- uses: mozilla-actions/sccache-action@v0.0.9
- run: cargo test --test '*' --features tests-features,sqlx-mysql,runtime-${{ matrix.runtime }}-${{ matrix.tls }} --no-run
- run: cargo test --test '*' --features tests-features,sqlx-mysql,runtime-${{ matrix.runtime }}-${{ matrix.tls }}
- run: cargo test --test '*' --features tests-features,sqlx-mysql,runtime-${{ matrix.runtime }}-${{ matrix.tls }},unimplemented-jiff-sqlx-mysql --no-run
- run: cargo test --test '*' --features tests-features,sqlx-mysql,runtime-${{ matrix.runtime }}-${{ matrix.tls }},unimplemented-jiff-sqlx-mysql

postgres:
name: Postgres
Expand Down
22 changes: 21 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ futures-util = { version = "0.3", default-features = false, features = [
inventory = { version = "0.3", optional = true }
ipnetwork = { version = "0.20", default-features = false, optional = true }
itertools = "0.14.0"
jiff = { version = "0.2.15", default-features = false, optional = true, features = [
"std",
"perf-inline",
] }
jiff-sqlx = { version = "0.1.1", default-features = false, optional = true }
log = { version = "0.4", default-features = false }
mac_address = { version = "1.1", default-features = false, optional = true }
ouroboros = { version = "0.18", default-features = false }
Expand Down Expand Up @@ -98,6 +103,7 @@ sea-orm = { path = ".", features = [
"mock",
"postgres-array",
"tests-cfg",
"with-jiff",
] }
smol = { version = "1.2" }
smol-potat = { version = "1.1" }
Expand Down Expand Up @@ -165,12 +171,14 @@ sqlx-mysql = [
sqlx-postgres = [
"sqlx-dep",
"sea-query-sqlx/sqlx-postgres",
"jiff-sqlx?/postgres",
"postgres-array",
"sea-schema?/sqlx-postgres",
]
sqlx-sqlite = [
"sqlx-dep",
"sea-query-sqlx/sqlx-sqlite",
"jiff-sqlx?/sqlite",
"sea-schema?/sqlx-sqlite",
]
sync = []
Expand All @@ -182,9 +190,13 @@ tests-features = [
"schema-sync",
"with-arrow",
"with-bigdecimal",
"with-jiff",
"with-ipnetwork",
]
tracing-spans = []
unimplemented-jiff-sqlx-mysql = [
"sea-query-sqlx?/unimplemented-jiff-sqlx-mysql",
]
with-arrow = ["sea-orm-arrow", "sea-orm-macros/with-arrow"]
with-bigdecimal = [
"bigdecimal",
Expand All @@ -203,11 +215,18 @@ with-ipnetwork = [
"sea-query/with-ipnetwork",
"sea-query-sqlx?/with-ipnetwork",
]
with-jiff = [
"jiff",
"jiff-sqlx",
"sea-query/with-jiff",
"sea-query-sqlx?/with-jiff",
Comment thread
Huliiiiii marked this conversation as resolved.
]
Comment on lines +218 to +223
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Gate with-jiff away from Arrow conversions

When a project enables both with-jiff and with-arrow, Arrow round-trips for Jiff-backed models are still unsupported even though this feature set is now exposed. ActiveModel::from_arrow only retries chrono→time conversions (src/entity/active_model.rs:563-586), and sea-orm-arrow/src/lib.rs:154-170,1272-1403 only produces/extracts chrono/time Value variants, never Value::Jiff*. As a result, entities with JiffDate/JiffTime/JiffDateTime/JiffTimestamp cannot be imported from or exported to Arrow batches.

Useful? React with 👍 / 👎.

Comment thread
Huliiiiii marked this conversation as resolved.
with-json = [
"serde_json",
"sea-query/with-json",
"sea-orm-macros/with-json",
"chrono?/serde",
"jiff?/serde",
"rust_decimal?/serde",
"bigdecimal?/serde",
"uuid?/serde",
Expand Down Expand Up @@ -237,5 +256,6 @@ with-uuid = ["uuid", "sea-query/with-uuid", "sea-query-sqlx?/with-uuid"]

# This allows us to develop using a local version of sea-query
[patch.crates-io]
# sea-query = { path = "../sea-query" }
sea-query = { git = "https://github.com/Huliiiiii/sea-query", branch = "jiff" }
sea-query-sqlx = { git = "https://github.com/Huliiiiii/sea-query", branch = "jiff" }
# sea-query = { git = "https://github.com/SeaQL/sea-query", branch = "master" }
4 changes: 4 additions & 0 deletions examples/actix_example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ members = [".", "api", "entity", "migration"]

[dependencies]
actix-example-api = { path = "api" }

[patch.crates-io]
sea-query = { git = "https://github.com/Huliiiiii/sea-query", branch = "jiff" }
sea-query-sqlx = { git = "https://github.com/Huliiiiii/sea-query", branch = "jiff" }
4 changes: 4 additions & 0 deletions examples/axum_example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ members = [".", "api", "entity", "migration"]

[dependencies]
axum-example-api = { path = "api" }

[patch.crates-io]
sea-query = { git = "https://github.com/Huliiiiii/sea-query", branch = "jiff" }
sea-query-sqlx = { git = "https://github.com/Huliiiiii/sea-query", branch = "jiff" }
4 changes: 4 additions & 0 deletions examples/basic/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,7 @@ sea-orm = { path = "../../", features = [
] }
serde_json = { version = "1" }
tokio = { version = "1", features = ["full"] }

[patch.crates-io]
sea-query = { git = "https://github.com/Huliiiiii/sea-query", branch = "jiff" }
sea-query-sqlx = { git = "https://github.com/Huliiiiii/sea-query", branch = "jiff" }
4 changes: 4 additions & 0 deletions examples/graphql_example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,7 @@ members = [".", "api", "entity", "migration"]

[dependencies]
graphql-example-api = { path = "api" }

[patch.crates-io]
sea-query = { git = "https://github.com/Huliiiiii/sea-query", branch = "jiff" }
sea-query-sqlx = { git = "https://github.com/Huliiiiii/sea-query", branch = "jiff" }
4 changes: 4 additions & 0 deletions examples/jsonrpsee_example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ members = [".", "api", "entity", "migration"]

[dependencies]
jsonrpsee-example-api = { path = "api" }

[patch.crates-io]
sea-query = { git = "https://github.com/Huliiiiii/sea-query", branch = "jiff" }
sea-query-sqlx = { git = "https://github.com/Huliiiiii/sea-query", branch = "jiff" }
4 changes: 4 additions & 0 deletions examples/parquet_example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,7 @@ features = [
"with-rust_decimal",
]
path = "../../"

[patch.crates-io]
sea-query = { git = "https://github.com/Huliiiiii/sea-query", branch = "jiff" }
sea-query-sqlx = { git = "https://github.com/Huliiiiii/sea-query", branch = "jiff" }
4 changes: 4 additions & 0 deletions examples/poem_example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ members = [".", "api", "entity", "migration"]

[dependencies]
poem-example-api = { path = "api" }

[patch.crates-io]
sea-query = { git = "https://github.com/Huliiiiii/sea-query", branch = "jiff" }
sea-query-sqlx = { git = "https://github.com/Huliiiiii/sea-query", branch = "jiff" }
4 changes: 4 additions & 0 deletions examples/proxy_gluesql_example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,7 @@ sqlparser = "0.40"
[dev-dependencies]
smol = { version = "1.2" }
smol-potat = { version = "1.1" }

[patch.crates-io]
sea-query = { git = "https://github.com/Huliiiiii/sea-query", branch = "jiff" }
sea-query-sqlx = { git = "https://github.com/Huliiiiii/sea-query", branch = "jiff" }
4 changes: 4 additions & 0 deletions examples/quickstart/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,7 @@ features = [
"schema-sync",
]
path = "../../"

[patch.crates-io]
sea-query = { git = "https://github.com/Huliiiiii/sea-query", branch = "jiff" }
sea-query-sqlx = { git = "https://github.com/Huliiiiii/sea-query", branch = "jiff" }
4 changes: 4 additions & 0 deletions examples/rocket_example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ members = [".", "api", "entity", "migration"]

[dependencies]
rocket-example-api = { path = "api" }

[patch.crates-io]
sea-query = { git = "https://github.com/Huliiiiii/sea-query", branch = "jiff" }
sea-query-sqlx = { git = "https://github.com/Huliiiiii/sea-query", branch = "jiff" }
4 changes: 4 additions & 0 deletions examples/rocket_okapi_example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,7 @@ members = [".", "api", "service", "entity", "migration", "dto"]

[dependencies]
rocket-example-api = { path = "api" }

[patch.crates-io]
sea-query = { git = "https://github.com/Huliiiiii/sea-query", branch = "jiff" }
sea-query-sqlx = { git = "https://github.com/Huliiiiii/sea-query", branch = "jiff" }
4 changes: 4 additions & 0 deletions examples/salvo_example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ members = [".", "api", "entity", "migration"]

[dependencies]
salvo-example-api = { path = "api" }

[patch.crates-io]
sea-query = { git = "https://github.com/Huliiiiii/sea-query", branch = "jiff" }
sea-query-sqlx = { git = "https://github.com/Huliiiiii/sea-query", branch = "jiff" }
4 changes: 4 additions & 0 deletions examples/seaography_example/migration/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,7 @@ features = [
]
path = "../../../sea-orm-migration" # remove this line in your own project
version = "~2.0.0-rc.37" # sea-orm-migration version

[patch.crates-io]
sea-query = { git = "https://github.com/Huliiiiii/sea-query", branch = "jiff" }
sea-query-sqlx = { git = "https://github.com/Huliiiiii/sea-query", branch = "jiff" }
4 changes: 4 additions & 0 deletions examples/tonic_example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,7 @@ path = "./src/server.rs"
[[bin]]
name = "client"
path = "./src/client.rs"

[patch.crates-io]
sea-query = { git = "https://github.com/Huliiiiii/sea-query", branch = "jiff" }
sea-query-sqlx = { git = "https://github.com/Huliiiiii/sea-query", branch = "jiff" }
3 changes: 2 additions & 1 deletion sea-orm-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -128,5 +128,6 @@ runtime-tokio-rustls = [

# This allows us to develop using an overridden version of sea-query
[patch.crates-io]
# sea-query = { path = "../sea-query" }
sea-query = { git = "https://github.com/Huliiiiii/sea-query", branch = "jiff" }
sea-query-sqlx = { git = "https://github.com/Huliiiiii/sea-query", branch = "jiff" }
# sea-query = { git = "https://github.com/SeaQL/sea-query", branch = "master" }
1 change: 1 addition & 0 deletions sea-orm-cli/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -399,6 +399,7 @@ pub enum DateTimeCrate {
#[default]
Chrono,
Time,
Jiff,
}

#[derive(Copy, Clone, Debug, PartialEq, Eq, ValueEnum, Default)]
Expand Down
1 change: 1 addition & 0 deletions sea-orm-cli/src/commands/generate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@ impl From<DateTimeCrate> for CodegenDateTimeCrate {
match date_time_crate {
DateTimeCrate::Chrono => CodegenDateTimeCrate::Chrono,
DateTimeCrate::Time => CodegenDateTimeCrate::Time,
DateTimeCrate::Jiff => CodegenDateTimeCrate::Jiff,
}
}
}
Expand Down
Loading
Loading