use prisma-client-rust main branch (#2471)

* use primsa-client-rust main branch

* remove as i64
This commit is contained in:
Brendan Allan 2024-05-10 23:54:34 +08:00 committed by GitHub
parent 69412accae
commit d3ce2e8917
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 100 additions and 102 deletions

133
Cargo.lock generated
View file

@ -1190,7 +1190,6 @@ dependencies = [
"num-bigint",
"num-integer",
"num-traits",
"serde",
]
[[package]]
@ -1204,6 +1203,7 @@ dependencies = [
"num-bigint",
"num-integer",
"num-traits",
"serde",
]
[[package]]
@ -1476,7 +1476,7 @@ checksum = "41bfbdb21256b87a8b5e80fab81a8eed158178e812fd7ba451907518b2742f16"
[[package]]
name = "builtin-psl-connectors"
version = "0.1.0"
source = "git+https://github.com/Brendonovich/prisma-engines?branch=new-4.14.0-pcr#45b026c8b64ed0b60cb03deed5f478c457de645b"
source = "git+https://github.com/Brendonovich/prisma-engines?branch=5.1.0-patched#75852858f43e426c423b263f7e1473f49044f788"
dependencies = [
"connection-string",
"either",
@ -2430,7 +2430,7 @@ checksum = "5c297a1c74b71ae29df00c3e22dd9534821d60eb9af5a0192823fa2acea70c2a"
[[package]]
name = "datamodel-renderer"
version = "0.1.0"
source = "git+https://github.com/Brendonovich/prisma-engines?branch=new-4.14.0-pcr#45b026c8b64ed0b60cb03deed5f478c457de645b"
source = "git+https://github.com/Brendonovich/prisma-engines?branch=5.1.0-patched#75852858f43e426c423b263f7e1473f49044f788"
dependencies = [
"base64 0.13.1",
"once_cell",
@ -2520,7 +2520,7 @@ dependencies = [
[[package]]
name = "diagnostics"
version = "0.1.0"
source = "git+https://github.com/Brendonovich/prisma-engines?branch=new-4.14.0-pcr#45b026c8b64ed0b60cb03deed5f478c457de645b"
source = "git+https://github.com/Brendonovich/prisma-engines?branch=5.1.0-patched#75852858f43e426c423b263f7e1473f49044f788"
dependencies = [
"colored",
"indoc",
@ -2672,7 +2672,7 @@ dependencies = [
[[package]]
name = "dmmf"
version = "0.1.0"
source = "git+https://github.com/Brendonovich/prisma-engines?branch=new-4.14.0-pcr#45b026c8b64ed0b60cb03deed5f478c457de645b"
source = "git+https://github.com/Brendonovich/prisma-engines?branch=5.1.0-patched#75852858f43e426c423b263f7e1473f49044f788"
dependencies = [
"bigdecimal 0.3.1",
"indexmap 1.9.3",
@ -2684,10 +2684,10 @@ dependencies = [
]
[[package]]
name = "dotenv"
version = "0.15.0"
name = "dotenvy"
version = "0.15.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f"
checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b"
[[package]]
name = "downcast-rs"
@ -3890,11 +3890,11 @@ dependencies = [
[[package]]
name = "hashlink"
version = "0.7.0"
version = "0.8.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7249a3129cbc1ffccd74857f81464a323a152173cdb134e0fd81bc803b29facf"
checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7"
dependencies = [
"hashbrown 0.11.2",
"hashbrown 0.14.3",
]
[[package]]
@ -4182,7 +4182,7 @@ dependencies = [
"httpdate",
"itoa 1.0.10",
"pin-project-lite",
"socket2 0.5.5",
"socket2 0.4.10",
"tokio",
"tower-service",
"tracing",
@ -4743,7 +4743,7 @@ dependencies = [
[[package]]
name = "json-rpc-api-build"
version = "0.1.0"
source = "git+https://github.com/Brendonovich/prisma-engines?branch=new-4.14.0-pcr#45b026c8b64ed0b60cb03deed5f478c457de645b"
source = "git+https://github.com/Brendonovich/prisma-engines?branch=5.1.0-patched#75852858f43e426c423b263f7e1473f49044f788"
dependencies = [
"backtrace",
"heck 0.3.3",
@ -5448,9 +5448,9 @@ dependencies = [
[[package]]
name = "libsqlite3-sys"
version = "0.22.2"
version = "0.26.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "290b64917f8b0cb885d9de0f9959fe1f775d7fa12f1da2db9001c1c8ab60f89d"
checksum = "afc22eff61b133b115c6e8c74e818c628d6d5e7a502afea6f64dee076dd94326"
dependencies = [
"cc",
"pkg-config",
@ -6848,12 +6848,13 @@ dependencies = [
[[package]]
name = "parser-database"
version = "0.1.0"
source = "git+https://github.com/Brendonovich/prisma-engines?branch=new-4.14.0-pcr#45b026c8b64ed0b60cb03deed5f478c457de645b"
source = "git+https://github.com/Brendonovich/prisma-engines?branch=5.1.0-patched#75852858f43e426c423b263f7e1473f49044f788"
dependencies = [
"diagnostics",
"either",
"enumflags2",
"indexmap 1.9.3",
"rustc-hash",
"schema-ast",
]
@ -7390,18 +7391,19 @@ dependencies = [
[[package]]
name = "prisma-client-rust"
version = "0.6.8"
source = "git+https://github.com/spacedriveapp/prisma-client-rust?rev=528ab1cd02c25a1b183c0a8bc44e28954fdd0bfd#528ab1cd02c25a1b183c0a8bc44e28954fdd0bfd"
source = "git+https://github.com/brendonovich/prisma-client-rust?rev=4f9ef9d38ca732162accff72b2eb684d2f120bab#4f9ef9d38ca732162accff72b2eb684d2f120bab"
dependencies = [
"base64 0.13.1",
"bigdecimal 0.3.1",
"bigdecimal 0.4.2",
"chrono",
"diagnostics",
"dotenv",
"dotenvy",
"futures",
"include_dir",
"indexmap 1.9.3",
"paste",
"prisma-client-rust-macros",
"prisma-client-rust-generator-macros",
"prisma-models",
"psl",
"query-core",
@ -7412,7 +7414,7 @@ dependencies = [
"serde-value",
"serde_json",
"specta",
"tempdir",
"tempfile",
"thiserror",
"tokio",
"tracing",
@ -7423,7 +7425,7 @@ dependencies = [
[[package]]
name = "prisma-client-rust-cli"
version = "0.6.8"
source = "git+https://github.com/spacedriveapp/prisma-client-rust?rev=528ab1cd02c25a1b183c0a8bc44e28954fdd0bfd#528ab1cd02c25a1b183c0a8bc44e28954fdd0bfd"
source = "git+https://github.com/brendonovich/prisma-client-rust?rev=4f9ef9d38ca732162accff72b2eb684d2f120bab#4f9ef9d38ca732162accff72b2eb684d2f120bab"
dependencies = [
"directories 4.0.1",
"flate2",
@ -7443,11 +7445,12 @@ dependencies = [
[[package]]
name = "prisma-client-rust-generator"
version = "0.6.8"
source = "git+https://github.com/spacedriveapp/prisma-client-rust?rev=528ab1cd02c25a1b183c0a8bc44e28954fdd0bfd#528ab1cd02c25a1b183c0a8bc44e28954fdd0bfd"
source = "git+https://github.com/brendonovich/prisma-client-rust?rev=4f9ef9d38ca732162accff72b2eb684d2f120bab#4f9ef9d38ca732162accff72b2eb684d2f120bab"
dependencies = [
"directories 4.0.1",
"flate2",
"http 0.2.11",
"prisma-client-rust-generator-shared",
"prisma-client-rust-sdk",
"proc-macro2",
"quote",
@ -7461,21 +7464,33 @@ dependencies = [
]
[[package]]
name = "prisma-client-rust-macros"
name = "prisma-client-rust-generator-macros"
version = "0.6.8"
source = "git+https://github.com/spacedriveapp/prisma-client-rust?rev=528ab1cd02c25a1b183c0a8bc44e28954fdd0bfd#528ab1cd02c25a1b183c0a8bc44e28954fdd0bfd"
source = "git+https://github.com/brendonovich/prisma-client-rust?rev=4f9ef9d38ca732162accff72b2eb684d2f120bab#4f9ef9d38ca732162accff72b2eb684d2f120bab"
dependencies = [
"convert_case 0.6.0",
"prisma-client-rust-generator-shared",
"proc-macro2",
"quote",
"syn 1.0.109",
]
[[package]]
name = "prisma-client-rust-generator-shared"
version = "0.1.0"
source = "git+https://github.com/brendonovich/prisma-client-rust?rev=4f9ef9d38ca732162accff72b2eb684d2f120bab#4f9ef9d38ca732162accff72b2eb684d2f120bab"
dependencies = [
"convert_case 0.6.0",
"prisma-client-rust-sdk",
"proc-macro2",
"quote",
"specta",
"syn 1.0.109",
]
[[package]]
name = "prisma-client-rust-sdk"
version = "0.6.8"
source = "git+https://github.com/spacedriveapp/prisma-client-rust?rev=528ab1cd02c25a1b183c0a8bc44e28954fdd0bfd#528ab1cd02c25a1b183c0a8bc44e28954fdd0bfd"
source = "git+https://github.com/brendonovich/prisma-client-rust?rev=4f9ef9d38ca732162accff72b2eb684d2f120bab#4f9ef9d38ca732162accff72b2eb684d2f120bab"
dependencies = [
"convert_case 0.5.0",
"dmmf",
@ -7495,7 +7510,7 @@ dependencies = [
[[package]]
name = "prisma-models"
version = "0.0.0"
source = "git+https://github.com/Brendonovich/prisma-engines?branch=new-4.14.0-pcr#45b026c8b64ed0b60cb03deed5f478c457de645b"
source = "git+https://github.com/Brendonovich/prisma-engines?branch=5.1.0-patched#75852858f43e426c423b263f7e1473f49044f788"
dependencies = [
"bigdecimal 0.3.1",
"chrono",
@ -7511,7 +7526,7 @@ dependencies = [
[[package]]
name = "prisma-value"
version = "0.1.0"
source = "git+https://github.com/Brendonovich/prisma-engines?branch=new-4.14.0-pcr#45b026c8b64ed0b60cb03deed5f478c457de645b"
source = "git+https://github.com/Brendonovich/prisma-engines?branch=5.1.0-patched#75852858f43e426c423b263f7e1473f49044f788"
dependencies = [
"base64 0.13.1",
"bigdecimal 0.3.1",
@ -7627,7 +7642,7 @@ dependencies = [
[[package]]
name = "psl"
version = "0.1.0"
source = "git+https://github.com/Brendonovich/prisma-engines?branch=new-4.14.0-pcr#45b026c8b64ed0b60cb03deed5f478c457de645b"
source = "git+https://github.com/Brendonovich/prisma-engines?branch=5.1.0-patched#75852858f43e426c423b263f7e1473f49044f788"
dependencies = [
"builtin-psl-connectors",
"psl-core",
@ -7636,7 +7651,7 @@ dependencies = [
[[package]]
name = "psl-core"
version = "0.1.0"
source = "git+https://github.com/Brendonovich/prisma-engines?branch=new-4.14.0-pcr#45b026c8b64ed0b60cb03deed5f478c457de645b"
source = "git+https://github.com/Brendonovich/prisma-engines?branch=5.1.0-patched#75852858f43e426c423b263f7e1473f49044f788"
dependencies = [
"bigdecimal 0.3.1",
"chrono",
@ -7678,7 +7693,7 @@ dependencies = [
[[package]]
name = "quaint"
version = "0.2.0-alpha.13"
source = "git+https://github.com/Brendonovich/prisma-engines?branch=new-4.14.0-pcr#45b026c8b64ed0b60cb03deed5f478c457de645b"
source = "git+https://github.com/Brendonovich/prisma-engines?branch=5.1.0-patched#75852858f43e426c423b263f7e1473f49044f788"
dependencies = [
"async-trait",
"base64 0.12.3",
@ -7687,7 +7702,6 @@ dependencies = [
"connection-string",
"futures",
"hex",
"libsqlite3-sys",
"metrics 0.18.1",
"mobc",
"num_cpus",
@ -7722,7 +7736,7 @@ dependencies = [
[[package]]
name = "query-connector"
version = "0.1.0"
source = "git+https://github.com/Brendonovich/prisma-engines?branch=new-4.14.0-pcr#45b026c8b64ed0b60cb03deed5f478c457de645b"
source = "git+https://github.com/Brendonovich/prisma-engines?branch=5.1.0-patched#75852858f43e426c423b263f7e1473f49044f788"
dependencies = [
"anyhow",
"async-trait",
@ -7742,7 +7756,7 @@ dependencies = [
[[package]]
name = "query-core"
version = "0.1.0"
source = "git+https://github.com/Brendonovich/prisma-engines?branch=new-4.14.0-pcr#45b026c8b64ed0b60cb03deed5f478c457de645b"
source = "git+https://github.com/Brendonovich/prisma-engines?branch=5.1.0-patched#75852858f43e426c423b263f7e1473f49044f788"
dependencies = [
"async-trait",
"bigdecimal 0.3.1",
@ -7778,7 +7792,7 @@ dependencies = [
[[package]]
name = "query-engine-metrics"
version = "0.1.0"
source = "git+https://github.com/Brendonovich/prisma-engines?branch=new-4.14.0-pcr#45b026c8b64ed0b60cb03deed5f478c457de645b"
source = "git+https://github.com/Brendonovich/prisma-engines?branch=5.1.0-patched#75852858f43e426c423b263f7e1473f49044f788"
dependencies = [
"metrics 0.18.1",
"metrics-exporter-prometheus",
@ -8257,19 +8271,10 @@ version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f"
[[package]]
name = "remove_dir_all"
version = "0.5.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7"
dependencies = [
"winapi",
]
[[package]]
name = "request-handlers"
version = "0.1.0"
source = "git+https://github.com/Brendonovich/prisma-engines?branch=new-4.14.0-pcr#45b026c8b64ed0b60cb03deed5f478c457de645b"
source = "git+https://github.com/Brendonovich/prisma-engines?branch=5.1.0-patched#75852858f43e426c423b263f7e1473f49044f788"
dependencies = [
"bigdecimal 0.3.1",
"connection-string",
@ -8278,6 +8283,7 @@ dependencies = [
"graphql-parser",
"indexmap 1.9.3",
"itertools 0.10.5",
"once_cell",
"prisma-models",
"psl",
"query-core",
@ -8559,17 +8565,16 @@ dependencies = [
[[package]]
name = "rusqlite"
version = "0.25.4"
version = "0.29.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5c4b1eaf239b47034fb450ee9cdedd7d0226571689d8823030c4b6c2cb407152"
checksum = "549b9d036d571d42e6e85d1c1425e2ac83491075078ca9a15be021c56b1641f2"
dependencies = [
"bitflags 1.3.2",
"bitflags 2.4.1",
"chrono",
"fallible-iterator",
"fallible-streaming-iterator",
"hashlink",
"libsqlite3-sys",
"memchr",
"smallvec 1.13.1",
]
@ -8779,7 +8784,7 @@ dependencies = [
[[package]]
name = "schema"
version = "0.1.0"
source = "git+https://github.com/Brendonovich/prisma-engines?branch=new-4.14.0-pcr#45b026c8b64ed0b60cb03deed5f478c457de645b"
source = "git+https://github.com/Brendonovich/prisma-engines?branch=5.1.0-patched#75852858f43e426c423b263f7e1473f49044f788"
dependencies = [
"once_cell",
"prisma-models",
@ -8790,7 +8795,7 @@ dependencies = [
[[package]]
name = "schema-ast"
version = "0.1.0"
source = "git+https://github.com/Brendonovich/prisma-engines?branch=new-4.14.0-pcr#45b026c8b64ed0b60cb03deed5f478c457de645b"
source = "git+https://github.com/Brendonovich/prisma-engines?branch=5.1.0-patched#75852858f43e426c423b263f7e1473f49044f788"
dependencies = [
"diagnostics",
"pest",
@ -8800,7 +8805,7 @@ dependencies = [
[[package]]
name = "schema-connector"
version = "0.1.0"
source = "git+https://github.com/Brendonovich/prisma-engines?branch=new-4.14.0-pcr#45b026c8b64ed0b60cb03deed5f478c457de645b"
source = "git+https://github.com/Brendonovich/prisma-engines?branch=5.1.0-patched#75852858f43e426c423b263f7e1473f49044f788"
dependencies = [
"chrono",
"enumflags2",
@ -8817,7 +8822,7 @@ dependencies = [
[[package]]
name = "schema-core"
version = "0.1.0"
source = "git+https://github.com/Brendonovich/prisma-engines?branch=new-4.14.0-pcr#45b026c8b64ed0b60cb03deed5f478c457de645b"
source = "git+https://github.com/Brendonovich/prisma-engines?branch=5.1.0-patched#75852858f43e426c423b263f7e1473f49044f788"
dependencies = [
"async-trait",
"chrono",
@ -10185,12 +10190,12 @@ dependencies = [
[[package]]
name = "sql-ddl"
version = "0.1.0"
source = "git+https://github.com/Brendonovich/prisma-engines?branch=new-4.14.0-pcr#45b026c8b64ed0b60cb03deed5f478c457de645b"
source = "git+https://github.com/Brendonovich/prisma-engines?branch=5.1.0-patched#75852858f43e426c423b263f7e1473f49044f788"
[[package]]
name = "sql-query-connector"
version = "0.1.0"
source = "git+https://github.com/Brendonovich/prisma-engines?branch=new-4.14.0-pcr#45b026c8b64ed0b60cb03deed5f478c457de645b"
source = "git+https://github.com/Brendonovich/prisma-engines?branch=5.1.0-patched#75852858f43e426c423b263f7e1473f49044f788"
dependencies = [
"anyhow",
"async-trait",
@ -10221,7 +10226,7 @@ dependencies = [
[[package]]
name = "sql-schema-connector"
version = "0.1.0"
source = "git+https://github.com/Brendonovich/prisma-engines?branch=new-4.14.0-pcr#45b026c8b64ed0b60cb03deed5f478c457de645b"
source = "git+https://github.com/Brendonovich/prisma-engines?branch=5.1.0-patched#75852858f43e426c423b263f7e1473f49044f788"
dependencies = [
"chrono",
"connection-string",
@ -10252,7 +10257,7 @@ dependencies = [
[[package]]
name = "sql-schema-describer"
version = "0.1.0"
source = "git+https://github.com/Brendonovich/prisma-engines?branch=new-4.14.0-pcr#45b026c8b64ed0b60cb03deed5f478c457de645b"
source = "git+https://github.com/Brendonovich/prisma-engines?branch=5.1.0-patched#75852858f43e426c423b263f7e1473f49044f788"
dependencies = [
"async-trait",
"bigdecimal 0.3.1",
@ -10948,16 +10953,6 @@ dependencies = [
"toml 0.7.8",
]
[[package]]
name = "tempdir"
version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "15f2b5fb00ccdf689e0149d1b1b3c03fead81c2b37735d812fa8bddbbf41b6d8"
dependencies = [
"rand 0.4.6",
"remove_dir_all",
]
[[package]]
name = "tempfile"
version = "3.10.1"
@ -11801,7 +11796,7 @@ dependencies = [
[[package]]
name = "user-facing-error-macros"
version = "0.1.0"
source = "git+https://github.com/Brendonovich/prisma-engines?branch=new-4.14.0-pcr#45b026c8b64ed0b60cb03deed5f478c457de645b"
source = "git+https://github.com/Brendonovich/prisma-engines?branch=5.1.0-patched#75852858f43e426c423b263f7e1473f49044f788"
dependencies = [
"proc-macro2",
"quote",
@ -11811,7 +11806,7 @@ dependencies = [
[[package]]
name = "user-facing-errors"
version = "0.1.0"
source = "git+https://github.com/Brendonovich/prisma-engines?branch=new-4.14.0-pcr#45b026c8b64ed0b60cb03deed5f478c457de645b"
source = "git+https://github.com/Brendonovich/prisma-engines?branch=5.1.0-patched#75852858f43e426c423b263f7e1473f49044f788"
dependencies = [
"backtrace",
"indoc",

View file

@ -1,17 +1,17 @@
[workspace]
resolver = "2"
members = [
"core",
"core/crates/*",
"crates/*",
"apps/cli",
"apps/p2p-relay",
"apps/desktop/src-tauri",
"apps/desktop/crates/*",
"apps/mobile/modules/sd-core/core",
"apps/mobile/modules/sd-core/android/crate",
"apps/mobile/modules/sd-core/ios/crate",
"apps/server",
"core",
"core/crates/*",
"crates/*",
"apps/cli",
"apps/p2p-relay",
"apps/desktop/src-tauri",
"apps/desktop/crates/*",
"apps/mobile/modules/sd-core/core",
"apps/mobile/modules/sd-core/android/crate",
"apps/mobile/modules/sd-core/ios/crate",
"apps/server",
]
[workspace.package]
@ -20,22 +20,22 @@ edition = "2021"
repository = "https://github.com/spacedriveapp/spacedrive"
[workspace.dependencies]
# First party dependencies
prisma-client-rust = { git = "https://github.com/spacedriveapp/prisma-client-rust", rev = "528ab1cd02c25a1b183c0a8bc44e28954fdd0bfd", features = [
"migrations",
"specta",
"sqlite",
"sqlite-create-many",
prisma-client-rust = { git = "https://github.com/brendonovich/prisma-client-rust", rev = "4f9ef9d38ca732162accff72b2eb684d2f120bab", features = [
"migrations",
"specta",
"sqlite",
"sqlite-create-many",
], default-features = false }
prisma-client-rust-cli = { git = "https://github.com/spacedriveapp/prisma-client-rust", rev = "528ab1cd02c25a1b183c0a8bc44e28954fdd0bfd", features = [
"migrations",
"specta",
"sqlite",
"sqlite-create-many",
prisma-client-rust-cli = { git = "https://github.com/brendonovich/prisma-client-rust", rev = "4f9ef9d38ca732162accff72b2eb684d2f120bab", features = [
"migrations",
"specta",
"sqlite",
"sqlite-create-many",
], default-features = false }
prisma-client-rust-sdk = { git = "https://github.com/spacedriveapp/prisma-client-rust", rev = "528ab1cd02c25a1b183c0a8bc44e28954fdd0bfd", features = [
"sqlite",
prisma-client-rust-sdk = { git = "https://github.com/brendonovich/prisma-client-rust", rev = "4f9ef9d38ca732162accff72b2eb684d2f120bab", features = [
"sqlite",
], default-features = false }
rspc = { version = "0.1.4" }
specta = { version = "=2.0.0-rc.11" }
tauri-specta = { version = "=2.0.0-rc.8" }

View file

@ -602,7 +602,7 @@ async fn get_files_for_labeling(
""
}
),
PrismaValue::Int(parent_iso_file_path.location_id() as i64),
PrismaValue::Int(parent_iso_file_path.location_id()),
PrismaValue::String(format!(
"{}%",
parent_iso_file_path
@ -640,7 +640,7 @@ async fn get_all_children_files_by_extensions(
.collect::<Vec<_>>()
.join(",")
),
PrismaValue::Int(parent_iso_file_path.location_id() as i64),
PrismaValue::Int(parent_iso_file_path.location_id()),
PrismaValue::String(format!(
"{}%",
parent_iso_file_path

View file

@ -262,7 +262,7 @@ async fn get_files_for_labeling(
""
}
),
PrismaValue::Int(parent_iso_file_path.location_id() as i64),
PrismaValue::Int(parent_iso_file_path.location_id()),
PrismaValue::String(
parent_iso_file_path
.materialized_path_for_children()
@ -354,7 +354,7 @@ async fn get_files_by_extensions(
.collect::<Vec<_>>()
.join(",")
),
PrismaValue::Int(parent_iso_file_path.location_id() as i64),
PrismaValue::Int(parent_iso_file_path.location_id()),
PrismaValue::String(
parent_iso_file_path
.materialized_path_for_children()

View file

@ -174,6 +174,7 @@ pub fn module((model, sync_type): ModelWithSyncType) -> Module {
model.name(),
quote! {
use super::prisma::*;
use prisma_client_rust::scalar_types::*;
#sync_id

View file

@ -16,7 +16,9 @@ pub enum MigrationError {
/// load_and_migrate will load the database from the given path and migrate it to the latest version of the schema.
pub async fn load_and_migrate(db_url: &str) -> Result<PrismaClient, MigrationError> {
let client = prisma::new_client_with_url(db_url)
let client = prisma::PrismaClient::_builder()
.with_url(db_url.to_string())
.build()
.await
.map_err(Box::new)?;

View file

@ -53,7 +53,7 @@ export type Procedures = {
{ key: "sync.messages", input: LibraryArgs<null>, result: CRDTOperation[] } |
{ key: "tags.get", input: LibraryArgs<number>, result: Tag | null } |
{ key: "tags.getForObject", input: LibraryArgs<number>, result: Tag[] } |
{ key: "tags.getWithObjects", input: LibraryArgs<number[]>, result: { [key in number]: ({ date_created: string | null; object: { id: number } })[] } } |
{ key: "tags.getWithObjects", input: LibraryArgs<number[]>, result: { [key in number]: ({ object: { id: number }; date_created: string | null })[] } } |
{ key: "tags.list", input: LibraryArgs<null>, result: Tag[] } |
{ key: "volumes.list", input: never, result: Volume[] },
mutations:
@ -297,7 +297,7 @@ export type FilePathOrder = { field: "name"; value: SortOrder } | { field: "size
export type FilePathSearchArgs = { take?: number | null; orderAndPagination?: OrderAndPagination<number, FilePathOrder, FilePathCursor> | null; filters?: SearchFilterArgs[]; groupDirectories?: boolean }
export type FilePathWithObject = { id: number; pub_id: number[]; is_dir: boolean | null; cas_id: string | null; integrity_checksum: string | null; location_id: number | null; materialized_path: string | null; name: string | null; extension: string | null; hidden: boolean | null; size_in_bytes: string | null; size_in_bytes_bytes: number[] | null; inode: number[] | null; object_id: number | null; key_id: number | null; date_created: string | null; date_modified: string | null; date_indexed: string | null; object: { id: number; pub_id: number[]; kind: number | null; key_id: number | null; hidden: boolean | null; favorite: boolean | null; important: boolean | null; note: string | null; date_created: string | null; date_accessed: string | null; exif_data: { resolution: number[] | null; media_date: number[] | null; media_location: number[] | null; camera_data: number[] | null; artist: string | null; description: string | null; copyright: string | null; exif_version: string | null } | null } | null }
export type FilePathWithObject = { id: number; pub_id: number[]; is_dir: boolean | null; cas_id: string | null; integrity_checksum: string | null; location_id: number | null; materialized_path: string | null; name: string | null; extension: string | null; hidden: boolean | null; size_in_bytes: string | null; size_in_bytes_bytes: number[] | null; inode: number[] | null; object_id: number | null; object: { id: number; pub_id: number[]; kind: number | null; key_id: number | null; hidden: boolean | null; favorite: boolean | null; important: boolean | null; note: string | null; date_created: string | null; date_accessed: string | null; exif_data: { resolution: number[] | null; media_date: number[] | null; media_location: number[] | null; camera_data: number[] | null; artist: string | null; description: string | null; copyright: string | null; exif_version: string | null } | null } | null; key_id: number | null; date_created: string | null; date_modified: string | null; date_indexed: string | null }
export type Flash = {
/**
@ -517,9 +517,9 @@ export type ObjectSearchArgs = { take: number; orderAndPagination?: OrderAndPagi
export type ObjectValidatorArgs = { id: number; path: string }
export type ObjectWithFilePaths = { id: number; pub_id: number[]; kind: number | null; key_id: number | null; hidden: boolean | null; favorite: boolean | null; important: boolean | null; note: string | null; date_created: string | null; date_accessed: string | null; file_paths: ({ id: number; pub_id: number[]; is_dir: boolean | null; cas_id: string | null; integrity_checksum: string | null; location_id: number | null; materialized_path: string | null; name: string | null; extension: string | null; hidden: boolean | null; size_in_bytes: string | null; size_in_bytes_bytes: number[] | null; inode: number[] | null; object_id: number | null; key_id: number | null; date_created: string | null; date_modified: string | null; date_indexed: string | null; object: { id: number; pub_id: number[]; kind: number | null; key_id: number | null; hidden: boolean | null; favorite: boolean | null; important: boolean | null; note: string | null; date_created: string | null; date_accessed: string | null; exif_data: { resolution: number[] | null; media_date: number[] | null; media_location: number[] | null; camera_data: number[] | null; artist: string | null; description: string | null; copyright: string | null; exif_version: string | null } | null; ffmpeg_data: { id: number; formats: string; bit_rate: number[]; duration: number[] | null; start_time: number[] | null; title: string | null; creation_time: string | null; date: string | null; album_artist: string | null; disc: string | null; track: string | null; album: string | null; artist: string | null; metadata: number[] | null; object_id: number; chapters: FfmpegMediaChapter[]; programs: ({ program_id: number; name: string | null; metadata: number[] | null; ffmpeg_data_id: number; streams: ({ stream_id: number; name: string | null; aspect_ratio_num: number; aspect_ratio_den: number; frames_per_second_num: number; frames_per_second_den: number; time_base_real_den: number; time_base_real_num: number; dispositions: string | null; title: string | null; encoder: string | null; language: string | null; duration: number[] | null; metadata: number[] | null; program_id: number; ffmpeg_data_id: number; codec: { id: number; kind: string | null; sub_kind: string | null; tag: string | null; name: string | null; profile: string | null; bit_rate: number; stream_id: number; program_id: number; ffmpeg_data_id: number; audio_props: FfmpegMediaAudioProps | null; video_props: FfmpegMediaVideoProps | null } | null })[] })[] } | null } | null })[] }
export type ObjectWithFilePaths = { id: number; pub_id: number[]; kind: number | null; key_id: number | null; hidden: boolean | null; favorite: boolean | null; important: boolean | null; note: string | null; date_created: string | null; date_accessed: string | null; file_paths: ({ id: number; pub_id: number[]; is_dir: boolean | null; cas_id: string | null; integrity_checksum: string | null; location_id: number | null; materialized_path: string | null; name: string | null; extension: string | null; hidden: boolean | null; size_in_bytes: string | null; size_in_bytes_bytes: number[] | null; inode: number[] | null; object_id: number | null; object: { id: number; pub_id: number[]; kind: number | null; key_id: number | null; hidden: boolean | null; favorite: boolean | null; important: boolean | null; note: string | null; date_created: string | null; date_accessed: string | null; exif_data: { resolution: number[] | null; media_date: number[] | null; media_location: number[] | null; camera_data: number[] | null; artist: string | null; description: string | null; copyright: string | null; exif_version: string | null } | null; ffmpeg_data: { id: number; formats: string; bit_rate: number[]; duration: number[] | null; start_time: number[] | null; chapters: FfmpegMediaChapter[]; programs: ({ program_id: number; streams: ({ stream_id: number; name: string | null; codec: { id: number; kind: string | null; sub_kind: string | null; tag: string | null; name: string | null; profile: string | null; bit_rate: number; video_props: FfmpegMediaVideoProps | null; audio_props: FfmpegMediaAudioProps | null; stream_id: number; program_id: number; ffmpeg_data_id: number } | null; aspect_ratio_num: number; aspect_ratio_den: number; frames_per_second_num: number; frames_per_second_den: number; time_base_real_den: number; time_base_real_num: number; dispositions: string | null; title: string | null; encoder: string | null; language: string | null; duration: number[] | null; metadata: number[] | null; program_id: number; ffmpeg_data_id: number })[]; name: string | null; metadata: number[] | null; ffmpeg_data_id: number })[]; title: string | null; creation_time: string | null; date: string | null; album_artist: string | null; disc: string | null; track: string | null; album: string | null; artist: string | null; metadata: number[] | null; object_id: number } | null } | null; key_id: number | null; date_created: string | null; date_modified: string | null; date_indexed: string | null })[] }
export type ObjectWithFilePaths2 = { id: number; pub_id: number[]; kind: number | null; key_id: number | null; hidden: boolean | null; favorite: boolean | null; important: boolean | null; note: string | null; date_created: string | null; date_accessed: string | null; file_paths: ({ id: number; pub_id: number[]; is_dir: boolean | null; cas_id: string | null; integrity_checksum: string | null; location_id: number | null; materialized_path: string | null; name: string | null; extension: string | null; hidden: boolean | null; size_in_bytes: string | null; size_in_bytes_bytes: number[] | null; inode: number[] | null; object_id: number | null; key_id: number | null; date_created: string | null; date_modified: string | null; date_indexed: string | null; object: { id: number; pub_id: number[]; kind: number | null; key_id: number | null; hidden: boolean | null; favorite: boolean | null; important: boolean | null; note: string | null; date_created: string | null; date_accessed: string | null; exif_data: { resolution: number[] | null; media_date: number[] | null; media_location: number[] | null; camera_data: number[] | null; artist: string | null; description: string | null; copyright: string | null; exif_version: string | null } | null; ffmpeg_data: { id: number; formats: string; bit_rate: number[]; duration: number[] | null; start_time: number[] | null; title: string | null; creation_time: string | null; date: string | null; album_artist: string | null; disc: string | null; track: string | null; album: string | null; artist: string | null; metadata: number[] | null; object_id: number; chapters: FfmpegMediaChapter[]; programs: ({ program_id: number; name: string | null; metadata: number[] | null; ffmpeg_data_id: number; streams: ({ stream_id: number; name: string | null; aspect_ratio_num: number; aspect_ratio_den: number; frames_per_second_num: number; frames_per_second_den: number; time_base_real_den: number; time_base_real_num: number; dispositions: string | null; title: string | null; encoder: string | null; language: string | null; duration: number[] | null; metadata: number[] | null; program_id: number; ffmpeg_data_id: number; codec: { id: number; kind: string | null; sub_kind: string | null; tag: string | null; name: string | null; profile: string | null; bit_rate: number; stream_id: number; program_id: number; ffmpeg_data_id: number; audio_props: FfmpegMediaAudioProps | null; video_props: FfmpegMediaVideoProps | null } | null })[] })[] } | null } | null })[] }
export type ObjectWithFilePaths2 = { id: number; pub_id: number[]; kind: number | null; key_id: number | null; hidden: boolean | null; favorite: boolean | null; important: boolean | null; note: string | null; date_created: string | null; date_accessed: string | null; file_paths: ({ id: number; pub_id: number[]; is_dir: boolean | null; cas_id: string | null; integrity_checksum: string | null; location_id: number | null; materialized_path: string | null; name: string | null; extension: string | null; hidden: boolean | null; size_in_bytes: string | null; size_in_bytes_bytes: number[] | null; inode: number[] | null; object_id: number | null; object: { id: number; pub_id: number[]; kind: number | null; key_id: number | null; hidden: boolean | null; favorite: boolean | null; important: boolean | null; note: string | null; date_created: string | null; date_accessed: string | null; exif_data: { resolution: number[] | null; media_date: number[] | null; media_location: number[] | null; camera_data: number[] | null; artist: string | null; description: string | null; copyright: string | null; exif_version: string | null } | null; ffmpeg_data: { id: number; formats: string; bit_rate: number[]; duration: number[] | null; start_time: number[] | null; chapters: FfmpegMediaChapter[]; programs: ({ program_id: number; streams: ({ stream_id: number; name: string | null; codec: { id: number; kind: string | null; sub_kind: string | null; tag: string | null; name: string | null; profile: string | null; bit_rate: number; video_props: FfmpegMediaVideoProps | null; audio_props: FfmpegMediaAudioProps | null; stream_id: number; program_id: number; ffmpeg_data_id: number } | null; aspect_ratio_num: number; aspect_ratio_den: number; frames_per_second_num: number; frames_per_second_den: number; time_base_real_den: number; time_base_real_num: number; dispositions: string | null; title: string | null; encoder: string | null; language: string | null; duration: number[] | null; metadata: number[] | null; program_id: number; ffmpeg_data_id: number })[]; name: string | null; metadata: number[] | null; ffmpeg_data_id: number })[]; title: string | null; creation_time: string | null; date: string | null; album_artist: string | null; disc: string | null; track: string | null; album: string | null; artist: string | null; metadata: number[] | null; object_id: number } | null } | null; key_id: number | null; date_created: string | null; date_modified: string | null; date_indexed: string | null })[] }
export type OldFileCopierJobInit = { source_location_id: number; target_location_id: number; sources_file_path_ids: number[]; target_location_relative_directory_path: string }