mirror of
https://github.com/zhaofengli/attic.git
synced 2025-03-05 08:17:05 +00:00
Update sea-orm to 0.11.3
This commit drops support of Nixpkgs 22.11. Users should upgrade to 23.05 or use the pinned nixpkgs version in the flake.
This commit is contained in:
parent
ebb13b6e6f
commit
564b4be0f9
4 changed files with 42 additions and 73 deletions
95
Cargo.lock
generated
95
Cargo.lock
generated
|
@ -333,17 +333,6 @@ dependencies = [
|
|||
"tracing",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "atty"
|
||||
version = "0.2.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
|
||||
dependencies = [
|
||||
"hermit-abi 0.1.19",
|
||||
"libc",
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "autocfg"
|
||||
version = "1.1.0"
|
||||
|
@ -819,6 +808,17 @@ version = "1.6.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b"
|
||||
|
||||
[[package]]
|
||||
name = "bigdecimal"
|
||||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a6773ddc0eafc0e509fb60e48dff7f450f8e674a0686ae8605e8d9901bd5eefa"
|
||||
dependencies = [
|
||||
"num-bigint",
|
||||
"num-integer",
|
||||
"num-traits",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "binstring"
|
||||
version = "0.1.1"
|
||||
|
@ -1005,14 +1005,11 @@ version = "3.2.25"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123"
|
||||
dependencies = [
|
||||
"atty",
|
||||
"bitflags",
|
||||
"clap_derive 3.2.25",
|
||||
"clap_lex 0.2.4",
|
||||
"indexmap",
|
||||
"once_cell",
|
||||
"strsim",
|
||||
"termcolor",
|
||||
"textwrap",
|
||||
]
|
||||
|
||||
|
@ -1226,21 +1223,6 @@ dependencies = [
|
|||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crc"
|
||||
version = "3.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "86ec7a15cbe22e59248fc7eadb1907dab5ba09372595da4d73dd805ed4417dfe"
|
||||
dependencies = [
|
||||
"crc-catalog",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "crc-catalog"
|
||||
version = "2.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9cace84e55f07e7301bae1c519df89cdad8cc3cd868413d3fdbdeca9ff3db484"
|
||||
|
||||
[[package]]
|
||||
name = "crc32c"
|
||||
version = "0.6.3"
|
||||
|
@ -1884,15 +1866,6 @@ dependencies = [
|
|||
"unicode-segmentation",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hermit-abi"
|
||||
version = "0.1.19"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33"
|
||||
dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hermit-abi"
|
||||
version = "0.2.6"
|
||||
|
@ -3264,14 +3237,15 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "sea-orm"
|
||||
version = "0.10.6"
|
||||
source = "git+https://github.com/zhaofengli/sea-orm?branch=attic#bc765b2ceede7fb225a9a7a38109c6e23726d70b"
|
||||
version = "0.11.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fade86e8d41fd1a4721f84cb834f4ca2783f973cc30e6212b7fafc134f169214"
|
||||
dependencies = [
|
||||
"async-stream",
|
||||
"async-trait",
|
||||
"bigdecimal",
|
||||
"chrono",
|
||||
"futures",
|
||||
"futures-util",
|
||||
"log",
|
||||
"ouroboros",
|
||||
"rust_decimal",
|
||||
|
@ -3291,8 +3265,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "sea-orm-cli"
|
||||
version = "0.10.6"
|
||||
source = "git+https://github.com/zhaofengli/sea-orm?branch=attic#bc765b2ceede7fb225a9a7a38109c6e23726d70b"
|
||||
version = "0.11.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "efbf34a2caf70c2e3be9bb1e674e9540f6dfd7c8f40f6f05daf3b9740e476005"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
"clap 3.2.25",
|
||||
|
@ -3306,8 +3281,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "sea-orm-macros"
|
||||
version = "0.10.6"
|
||||
source = "git+https://github.com/zhaofengli/sea-orm?branch=attic#bc765b2ceede7fb225a9a7a38109c6e23726d70b"
|
||||
version = "0.11.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "28936f26d62234ff0be16f80115dbdeb3237fe9c25cf18fbcd1e3b3592360f20"
|
||||
dependencies = [
|
||||
"bae",
|
||||
"heck 0.3.3",
|
||||
|
@ -3318,12 +3294,14 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "sea-orm-migration"
|
||||
version = "0.10.5"
|
||||
source = "git+https://github.com/zhaofengli/sea-orm?branch=attic#bc765b2ceede7fb225a9a7a38109c6e23726d70b"
|
||||
version = "0.11.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "278d3adfd0832b6ffc17d3cfbc574d3695a5c1b38814e0bc8ac238d33f3d87cf"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"clap 3.2.25",
|
||||
"dotenvy",
|
||||
"futures",
|
||||
"sea-orm",
|
||||
"sea-orm-cli",
|
||||
"sea-schema",
|
||||
|
@ -3333,10 +3311,11 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "sea-query"
|
||||
version = "0.27.2"
|
||||
version = "0.28.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a4f0fc4d8e44e1d51c739a68d336252a18bc59553778075d5e32649be6ec92ed"
|
||||
checksum = "bbab99b8cd878ab7786157b7eb8df96333a6807cc6e45e8888c85b51534b401a"
|
||||
dependencies = [
|
||||
"bigdecimal",
|
||||
"chrono",
|
||||
"rust_decimal",
|
||||
"sea-query-derive",
|
||||
|
@ -3347,10 +3326,11 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "sea-query-binder"
|
||||
version = "0.2.2"
|
||||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9c2585b89c985cfacfe0ec9fc9e7bb055b776c1a2581c4e3c6185af2b8bf8865"
|
||||
checksum = "4cea85029985b40dfbf18318d85fe985c04db7c1b4e5e8e0a0a0cdff5f1e30f9"
|
||||
dependencies = [
|
||||
"bigdecimal",
|
||||
"chrono",
|
||||
"rust_decimal",
|
||||
"sea-query",
|
||||
|
@ -3362,11 +3342,11 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "sea-query-derive"
|
||||
version = "0.2.0"
|
||||
version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "34cdc022b4f606353fe5dc85b09713a04e433323b70163e81513b141c6ae6eb5"
|
||||
checksum = "63f62030c60f3a691f5fe251713b4e220b306e50a71e1d6f9cce1f24bb781978"
|
||||
dependencies = [
|
||||
"heck 0.3.3",
|
||||
"heck 0.4.1",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn 1.0.109",
|
||||
|
@ -3375,9 +3355,9 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "sea-schema"
|
||||
version = "0.10.3"
|
||||
version = "0.11.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "38d5fda574d980e9352b6c7abd6fc75697436fe0078cac2b548559b52643ad3b"
|
||||
checksum = "eeb2940bb5a10bc6cd05b450ce6cd3993e27fddd7eface2becb97fc5af3a040e"
|
||||
dependencies = [
|
||||
"futures",
|
||||
"sea-query",
|
||||
|
@ -3741,11 +3721,11 @@ dependencies = [
|
|||
"ahash 0.7.6",
|
||||
"atoi",
|
||||
"base64 0.13.1",
|
||||
"bigdecimal",
|
||||
"bitflags",
|
||||
"byteorder",
|
||||
"bytes",
|
||||
"chrono",
|
||||
"crc",
|
||||
"crossbeam-queue",
|
||||
"dirs",
|
||||
"dotenvy",
|
||||
|
@ -3806,7 +3786,6 @@ dependencies = [
|
|||
"proc-macro2",
|
||||
"quote",
|
||||
"serde_json",
|
||||
"sha2",
|
||||
"sqlx-core",
|
||||
"sqlx-rt",
|
||||
"syn 1.0.109",
|
||||
|
|
|
@ -71,12 +71,7 @@ features = [
|
|||
]
|
||||
|
||||
[dependencies.sea-orm]
|
||||
# Temporary workaround for nixpkgs 22.11 w/ Rust 1.64.0.
|
||||
# TODO: Remove once 23.05 becomes stable
|
||||
git = "https://github.com/zhaofengli/sea-orm"
|
||||
branch = "attic"
|
||||
|
||||
version = "0.10.6"
|
||||
version = "0.11.3"
|
||||
features = [
|
||||
"runtime-tokio-rustls",
|
||||
"macros",
|
||||
|
@ -86,12 +81,7 @@ features = [
|
|||
]
|
||||
|
||||
[dependencies.sea-orm-migration]
|
||||
# Temporary workaround for nixpkgs 22.11 w/ Rust 1.64.0.
|
||||
# TODO: Remove once 23.05 becomes stable
|
||||
git = "https://github.com/zhaofengli/sea-orm"
|
||||
branch = "attic"
|
||||
|
||||
version = "0.10.5"
|
||||
version = "0.11.3"
|
||||
|
||||
[dependencies.tokio]
|
||||
version = "1.28.2"
|
||||
|
|
|
@ -29,8 +29,8 @@ impl<T: Serialize + DeserializeOwned> From<Json<T>> for Value {
|
|||
}
|
||||
|
||||
impl<T: Serialize + DeserializeOwned> TryGetable for Json<T> {
|
||||
fn try_get(res: &QueryResult, pre: &str, col: &str) -> Result<Self, TryGetError> {
|
||||
let json_str: String = res.try_get(pre, col).map_err(TryGetError::DbErr)?;
|
||||
fn try_get_by<I: sea_orm::ColIdx>(res: &QueryResult, idx: I) -> Result<Self, TryGetError> {
|
||||
let json_str: String = res.try_get_by(idx).map_err(TryGetError::DbErr)?;
|
||||
|
||||
serde_json::from_str(&json_str).map_err(|e| TryGetError::DbErr(DbErr::Json(e.to_string())))
|
||||
}
|
||||
|
|
|
@ -76,7 +76,7 @@ async fn run_time_based_garbage_collection(state: &State) -> Result<()> {
|
|||
.column(cache::Column::Id)
|
||||
.column(cache::Column::Name)
|
||||
.column_as(retention_period.clone(), "retention_period")
|
||||
.filter(retention_period.not_equals(0))
|
||||
.filter(retention_period.ne(0))
|
||||
.into_model::<CacheIdAndRetentionPeriod>()
|
||||
.all(db)
|
||||
.await?;
|
||||
|
|
Loading…
Add table
Reference in a new issue