diff --git a/README.md b/README.md index 324ac0d54..373095ce1 100644 --- a/README.md +++ b/README.md @@ -112,4 +112,4 @@ Install instructions: - `$ git clone https://github.com/jamiepine/spacedrive` - `$ cd spacedrive` - `$ yarn` -- `$ yarn desktop dev` +- `$ yarn dev` diff --git a/apps/desktop/src-tauri/Cargo.lock b/apps/desktop/src-tauri/Cargo.lock index aedf9a738..2f66ed476 100644 --- a/apps/desktop/src-tauri/Cargo.lock +++ b/apps/desktop/src-tauri/Cargo.lock @@ -1514,7 +1514,7 @@ checksum = "3ee2393c4a91429dffb4bedf19f4d6abf27d8a732c8ce4980305d782e5426d57" [[package]] name = "datamodel" version = "0.1.0" -source = "git+https://github.com/prisma/prisma-engines?tag=3.10.0#73e60b76d394f8d37d8ebd1f8918c79029f0db86" +source = "git+https://github.com/prisma/prisma-engines?tag=3.11.0#b371888aaf8f51357c7457d836b86d12da91658b" dependencies = [ "bigdecimal 0.2.2", "chrono", @@ -1537,7 +1537,7 @@ dependencies = [ [[package]] name = "datamodel-connector" version = "0.1.0" -source = "git+https://github.com/prisma/prisma-engines?tag=3.10.0#73e60b76d394f8d37d8ebd1f8918c79029f0db86" +source = "git+https://github.com/prisma/prisma-engines?tag=3.11.0#b371888aaf8f51357c7457d836b86d12da91658b" dependencies = [ "diagnostics", "enumflags2 0.7.3", @@ -1602,7 +1602,7 @@ dependencies = [ [[package]] name = "diagnostics" version = "0.1.0" -source = "git+https://github.com/prisma/prisma-engines?tag=3.10.0#73e60b76d394f8d37d8ebd1f8918c79029f0db86" +source = "git+https://github.com/prisma/prisma-engines?tag=3.11.0#b371888aaf8f51357c7457d836b86d12da91658b" dependencies = [ "colored", "pest", @@ -1688,7 +1688,7 @@ dependencies = [ [[package]] name = "dml" version = "0.1.0" -source = "git+https://github.com/prisma/prisma-engines?tag=3.10.0#73e60b76d394f8d37d8ebd1f8918c79029f0db86" +source = "git+https://github.com/prisma/prisma-engines?tag=3.11.0#b371888aaf8f51357c7457d836b86d12da91658b" dependencies = [ "chrono", "cuid", @@ -1704,7 +1704,7 @@ dependencies = [ [[package]] name = "dmmf" version = "0.1.0" -source = "git+https://github.com/prisma/prisma-engines?tag=3.10.0#73e60b76d394f8d37d8ebd1f8918c79029f0db86" +source = "git+https://github.com/prisma/prisma-engines?tag=3.11.0#b371888aaf8f51357c7457d836b86d12da91658b" dependencies = [ "bigdecimal 0.2.2", "datamodel", @@ -4337,7 +4337,7 @@ dependencies = [ [[package]] name = "mongodb-client" version = "0.1.0" -source = "git+https://github.com/prisma/prisma-engines?tag=3.10.0#73e60b76d394f8d37d8ebd1f8918c79029f0db86" +source = "git+https://github.com/prisma/prisma-engines?tag=3.11.0#b371888aaf8f51357c7457d836b86d12da91658b" dependencies = [ "mongodb", "once_cell", @@ -4348,7 +4348,7 @@ dependencies = [ [[package]] name = "mongodb-datamodel-connector" version = "0.1.0" -source = "git+https://github.com/prisma/prisma-engines?tag=3.10.0#73e60b76d394f8d37d8ebd1f8918c79029f0db86" +source = "git+https://github.com/prisma/prisma-engines?tag=3.11.0#b371888aaf8f51357c7457d836b86d12da91658b" dependencies = [ "datamodel-connector", "enumflags2 0.7.3", @@ -4360,7 +4360,7 @@ dependencies = [ [[package]] name = "mongodb-query-connector" version = "0.1.0" -source = "git+https://github.com/prisma/prisma-engines?tag=3.10.0#73e60b76d394f8d37d8ebd1f8918c79029f0db86" +source = "git+https://github.com/prisma/prisma-engines?tag=3.11.0#b371888aaf8f51357c7457d836b86d12da91658b" dependencies = [ "anyhow", "async-trait", @@ -4553,7 +4553,7 @@ dependencies = [ [[package]] name = "native-types" version = "0.1.0" -source = "git+https://github.com/prisma/prisma-engines?tag=3.10.0#73e60b76d394f8d37d8ebd1f8918c79029f0db86" +source = "git+https://github.com/prisma/prisma-engines?tag=3.11.0#b371888aaf8f51357c7457d836b86d12da91658b" dependencies = [ "serde", "serde_json", @@ -5180,7 +5180,7 @@ dependencies = [ [[package]] name = "parser-database" version = "0.1.0" -source = "git+https://github.com/prisma/prisma-engines?tag=3.10.0#73e60b76d394f8d37d8ebd1f8918c79029f0db86" +source = "git+https://github.com/prisma/prisma-engines?tag=3.11.0#b371888aaf8f51357c7457d836b86d12da91658b" dependencies = [ "diagnostics", "enumflags2 0.7.3", @@ -5628,7 +5628,7 @@ checksum = "be91bcc43e73799dc46a6c194a55e7aae1d86cc867c860fd4a436019af21bd8c" [[package]] name = "prisma-client-rust" version = "0.3.0" -source = "git+https://github.com/Brendonovich/prisma-client-rust.git?branch=master#55ae4638502bf36aaf1ec2512f6d7520ba9ed096" +source = "git+https://github.com/Brendonovich/prisma-client-rust.git?rev=022b799929c0e5b1a7dc1565ec8228ba52a32991#022b799929c0e5b1a7dc1565ec8228ba52a32991" dependencies = [ "chrono", "datamodel", @@ -5638,12 +5638,13 @@ dependencies = [ "request-handlers", "serde", "serde_json", + "thiserror", ] [[package]] name = "prisma-inflector" version = "0.1.0" -source = "git+https://github.com/prisma/prisma-engines?tag=3.10.0#73e60b76d394f8d37d8ebd1f8918c79029f0db86" +source = "git+https://github.com/prisma/prisma-engines?tag=3.11.0#b371888aaf8f51357c7457d836b86d12da91658b" dependencies = [ "once_cell", "regex", @@ -5653,7 +5654,7 @@ dependencies = [ [[package]] name = "prisma-models" version = "0.0.0" -source = "git+https://github.com/prisma/prisma-engines?tag=3.10.0#73e60b76d394f8d37d8ebd1f8918c79029f0db86" +source = "git+https://github.com/prisma/prisma-engines?tag=3.11.0#b371888aaf8f51357c7457d836b86d12da91658b" dependencies = [ "bigdecimal 0.2.2", "chrono", @@ -5674,7 +5675,7 @@ dependencies = [ [[package]] name = "prisma-value" version = "0.1.0" -source = "git+https://github.com/prisma/prisma-engines?tag=3.10.0#73e60b76d394f8d37d8ebd1f8918c79029f0db86" +source = "git+https://github.com/prisma/prisma-engines?tag=3.11.0#b371888aaf8f51357c7457d836b86d12da91658b" dependencies = [ "base64 0.12.3", "bigdecimal 0.2.2", @@ -5873,7 +5874,7 @@ dependencies = [ [[package]] name = "query-connector" version = "0.1.0" -source = "git+https://github.com/prisma/prisma-engines?tag=3.10.0#73e60b76d394f8d37d8ebd1f8918c79029f0db86" +source = "git+https://github.com/prisma/prisma-engines?tag=3.11.0#b371888aaf8f51357c7457d836b86d12da91658b" dependencies = [ "anyhow", "async-trait", @@ -5893,7 +5894,7 @@ dependencies = [ [[package]] name = "query-core" version = "0.1.0" -source = "git+https://github.com/prisma/prisma-engines?tag=3.10.0#73e60b76d394f8d37d8ebd1f8918c79029f0db86" +source = "git+https://github.com/prisma/prisma-engines?tag=3.11.0#b371888aaf8f51357c7457d836b86d12da91658b" dependencies = [ "async-trait", "base64 0.12.3", @@ -5908,6 +5909,7 @@ dependencies = [ "im", "indexmap", "itertools 0.10.3", + "lazy_static", "mongodb-client", "mongodb-query-connector", "once_cell", @@ -6183,7 +6185,7 @@ dependencies = [ [[package]] name = "request-handlers" version = "0.1.0" -source = "git+https://github.com/prisma/prisma-engines?tag=3.10.0#73e60b76d394f8d37d8ebd1f8918c79029f0db86" +source = "git+https://github.com/prisma/prisma-engines?tag=3.11.0#b371888aaf8f51357c7457d836b86d12da91658b" dependencies = [ "bigdecimal 0.2.2", "connection-string", @@ -6479,7 +6481,7 @@ dependencies = [ [[package]] name = "schema-ast" version = "0.1.0" -source = "git+https://github.com/prisma/prisma-engines?tag=3.10.0#73e60b76d394f8d37d8ebd1f8918c79029f0db86" +source = "git+https://github.com/prisma/prisma-engines?tag=3.11.0#b371888aaf8f51357c7457d836b86d12da91658b" dependencies = [ "diagnostics", "pest", @@ -7029,7 +7031,7 @@ dependencies = [ [[package]] name = "sql-datamodel-connector" version = "0.1.0" -source = "git+https://github.com/prisma/prisma-engines?tag=3.10.0#73e60b76d394f8d37d8ebd1f8918c79029f0db86" +source = "git+https://github.com/prisma/prisma-engines?tag=3.11.0#b371888aaf8f51357c7457d836b86d12da91658b" dependencies = [ "datamodel-connector", "enumflags2 0.7.3", @@ -7042,7 +7044,7 @@ dependencies = [ [[package]] name = "sql-query-connector" version = "0.1.0" -source = "git+https://github.com/prisma/prisma-engines?tag=3.10.0#73e60b76d394f8d37d8ebd1f8918c79029f0db86" +source = "git+https://github.com/prisma/prisma-engines?tag=3.11.0#b371888aaf8f51357c7457d836b86d12da91658b" dependencies = [ "anyhow", "async-trait", @@ -8160,7 +8162,7 @@ dependencies = [ [[package]] name = "user-facing-error-macros" version = "0.1.0" -source = "git+https://github.com/prisma/prisma-engines?tag=3.10.0#73e60b76d394f8d37d8ebd1f8918c79029f0db86" +source = "git+https://github.com/prisma/prisma-engines?tag=3.11.0#b371888aaf8f51357c7457d836b86d12da91658b" dependencies = [ "proc-macro2", "quote", @@ -8170,7 +8172,7 @@ dependencies = [ [[package]] name = "user-facing-errors" version = "0.1.0" -source = "git+https://github.com/prisma/prisma-engines?tag=3.10.0#73e60b76d394f8d37d8ebd1f8918c79029f0db86" +source = "git+https://github.com/prisma/prisma-engines?tag=3.11.0#b371888aaf8f51357c7457d836b86d12da91658b" dependencies = [ "backtrace", "indoc", diff --git a/apps/desktop/src-tauri/icons/icon.png b/apps/desktop/src-tauri/icons/icon.png new file mode 100644 index 000000000..cff51fb22 Binary files /dev/null and b/apps/desktop/src-tauri/icons/icon.png differ diff --git a/packages/core/Cargo.lock b/packages/core/Cargo.lock index 359b66413..94d034d72 100644 --- a/packages/core/Cargo.lock +++ b/packages/core/Cargo.lock @@ -76,7 +76,7 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" dependencies = [ - "getrandom 0.2.5", + "getrandom 0.2.6", "once_cell", "version_check", ] @@ -101,9 +101,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.55" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "159bb86af3a200e19a068f4224eae4c8bb2d0fa054c7e5d1cacd5cef95e684cd" +checksum = "4361135be9122e0870de935d7c439aef945b9f9ddd4199a553b5270b49c82a27" [[package]] name = "arrayref" @@ -227,15 +227,15 @@ dependencies = [ [[package]] name = "async-std" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8056f1455169ab86dd47b47391e4ab0cbd25410a70e9fe675544f49bafaf952" +checksum = "52580991739c5cdb36cde8b2a516371c0a3b70dda36d916cc08b82372916808c" dependencies = [ "async-channel", "async-global-executor", "async-io", "async-lock", - "crossbeam-utils 0.8.7", + "crossbeam-utils 0.8.8", "futures-channel", "futures-core", "futures-io", @@ -274,9 +274,9 @@ checksum = "30696a84d817107fc028e049980e09d5e140e8da8f1caeb17e8e950658a3cea9" [[package]] name = "async-trait" -version = "0.1.52" +version = "0.1.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "061a7acccaa286c011ddc30970520b98fa40e00c9d644633fb26b5fc63a265e3" +checksum = "ed6aa3524a2dfcf9fe180c51eae2b58738348d819517ceadf95789c51fff7600" dependencies = [ "proc-macro2", "quote", @@ -508,9 +508,9 @@ checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" [[package]] name = "blocking" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "046e47d4b2d391b1f6f8b407b1deb8dee56c1852ccd868becf2710f601b5f427" +checksum = "c6ccb65d468978a086b69884437ded69a90faab3bbe6e67f242173ea728acccc" dependencies = [ "async-channel", "async-task", @@ -613,7 +613,7 @@ dependencies = [ "hex", "pathdiff", "regex", - "semver 1.0.6", + "semver 1.0.7", "serde", "serde_derive", "serde_json", @@ -642,7 +642,7 @@ checksum = "4acbb09d9ee8e23699b9634375c72795d095bf268439da88562cf9b501f181fa" dependencies = [ "camino", "cargo-platform", - "semver 1.0.6", + "semver 1.0.7", "serde", "serde_json", ] @@ -881,9 +881,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95059428f66df56b63431fdb4e1947ed2190586af5c5a8a8b71122bdf5a7f469" +checksum = "59a6001667ab124aebae2a495118e11d30984c3a653e99d86d58971708cf5e4b" dependencies = [ "libc", ] @@ -899,7 +899,7 @@ dependencies = [ "hex", "home", "memchr", - "semver 1.0.6", + "semver 1.0.7", "serde", "serde_derive", "serde_json", @@ -925,18 +925,18 @@ dependencies = [ "crossbeam-channel", "crossbeam-deque", "crossbeam-epoch", - "crossbeam-queue 0.3.4", - "crossbeam-utils 0.8.7", + "crossbeam-queue 0.3.5", + "crossbeam-utils 0.8.8", ] [[package]] name = "crossbeam-channel" -version = "0.5.2" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e54ea8bc3fb1ee042f5aace6e3c6e025d3874866da222930f70ce62aceba0bfa" +checksum = "5aaa7bd5fb665c6864b5f963dd9097905c54125909c7aa94c9e18507cdbe6c53" dependencies = [ "cfg-if 1.0.0", - "crossbeam-utils 0.8.7", + "crossbeam-utils 0.8.8", ] [[package]] @@ -947,17 +947,18 @@ checksum = "6455c0ca19f0d2fbf751b908d5c55c1f5cbc65e03c4225427254b46890bdde1e" dependencies = [ "cfg-if 1.0.0", "crossbeam-epoch", - "crossbeam-utils 0.8.7", + "crossbeam-utils 0.8.8", ] [[package]] name = "crossbeam-epoch" -version = "0.9.7" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c00d6d2ea26e8b151d99093005cb442fb9a37aeaca582a03ec70946f49ab5ed9" +checksum = "1145cf131a2c6ba0615079ab6a638f7e1973ac9c2634fcbeaaad6114246efe8c" dependencies = [ + "autocfg", "cfg-if 1.0.0", - "crossbeam-utils 0.8.7", + "crossbeam-utils 0.8.8", "lazy_static", "memoffset", "scopeguard", @@ -976,12 +977,12 @@ dependencies = [ [[package]] name = "crossbeam-queue" -version = "0.3.4" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dd435b205a4842da59efd07628f921c096bc1cc0a156835b4fa0bcb9a19bcce" +checksum = "1f25d8400f4a7a5778f0e4e52384a48cbd9b5c495d110786187fc750075277a2" dependencies = [ "cfg-if 1.0.0", - "crossbeam-utils 0.8.7", + "crossbeam-utils 0.8.8", ] [[package]] @@ -997,9 +998,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.7" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e5bed1f1c269533fa816a0a5492b3545209a205ca1a54842be180eb63a16a6" +checksum = "0bf124c720b7686e3c2663cf54062ab0f68a88af2fb6a030e87e30bf721fcb38" dependencies = [ "cfg-if 1.0.0", "lazy_static", @@ -1031,16 +1032,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "crypto-mac" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bff07008ec701e8028e2ceb8f83f0e4274ee62bd2dbdc4fefff2e9a91824081a" -dependencies = [ - "generic-array 0.14.5", - "subtle", -] - [[package]] name = "crypto-mac" version = "0.11.1" @@ -1053,9 +1044,9 @@ dependencies = [ [[package]] name = "ctor" -version = "0.1.21" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccc0a48a9b826acdf4028595adc9db92caea352f7af011a3034acd172a52a0aa" +checksum = "f877be4f7c9f246b183111634f75baa039715e3f46ce860677d3b19a69fb229c" dependencies = [ "quote", "syn", @@ -1162,7 +1153,7 @@ checksum = "3ee2393c4a91429dffb4bedf19f4d6abf27d8a732c8ce4980305d782e5426d57" [[package]] name = "datamodel" version = "0.1.0" -source = "git+https://github.com/prisma/prisma-engines?tag=3.10.0#73e60b76d394f8d37d8ebd1f8918c79029f0db86" +source = "git+https://github.com/prisma/prisma-engines?tag=3.11.0#b371888aaf8f51357c7457d836b86d12da91658b" dependencies = [ "bigdecimal 0.2.2", "chrono", @@ -1185,7 +1176,7 @@ dependencies = [ [[package]] name = "datamodel-connector" version = "0.1.0" -source = "git+https://github.com/prisma/prisma-engines?tag=3.10.0#73e60b76d394f8d37d8ebd1f8918c79029f0db86" +source = "git+https://github.com/prisma/prisma-engines?tag=3.11.0#b371888aaf8f51357c7457d836b86d12da91658b" dependencies = [ "diagnostics", "enumflags2", @@ -1217,7 +1208,7 @@ dependencies = [ [[package]] name = "diagnostics" version = "0.1.0" -source = "git+https://github.com/prisma/prisma-engines?tag=3.10.0#73e60b76d394f8d37d8ebd1f8918c79029f0db86" +source = "git+https://github.com/prisma/prisma-engines?tag=3.11.0#b371888aaf8f51357c7457d836b86d12da91658b" dependencies = [ "colored", "pest", @@ -1286,7 +1277,7 @@ dependencies = [ [[package]] name = "dml" version = "0.1.0" -source = "git+https://github.com/prisma/prisma-engines?tag=3.10.0#73e60b76d394f8d37d8ebd1f8918c79029f0db86" +source = "git+https://github.com/prisma/prisma-engines?tag=3.11.0#b371888aaf8f51357c7457d836b86d12da91658b" dependencies = [ "chrono", "cuid", @@ -1302,7 +1293,7 @@ dependencies = [ [[package]] name = "dmmf" version = "0.1.0" -source = "git+https://github.com/prisma/prisma-engines?tag=3.10.0#73e60b76d394f8d37d8ebd1f8918c79029f0db86" +source = "git+https://github.com/prisma/prisma-engines?tag=3.11.0#b371888aaf8f51357c7457d836b86d12da91658b" dependencies = [ "bigdecimal 0.2.2", "datamodel", @@ -1340,9 +1331,9 @@ checksum = "21e50f3adc76d6a43f5ed73b698a87d0760ca74617f60f7c3b879003536fdd28" [[package]] name = "ed25519" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eed12bbf7b5312f8da1c2722bc06d8c6b12c2d86a7fb35a194c7f3e6fc2bbe39" +checksum = "3d5c4b5e5959dc2c2b89918d8e2cc40fcdd623cef026ed09d2f0ee05199dc8e4" dependencies = [ "signature", ] @@ -1445,18 +1436,18 @@ dependencies = [ [[package]] name = "enumflags2" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a25c90b056b3f84111cf183cbeddef0d3a0bbe9a674f057e1a1533c315f24def" +checksum = "1b3ab37dc79652c9d85f1f7b6070d77d321d2467f5fe7b00d6b7a86c57b092ae" dependencies = [ "enumflags2_derive", ] [[package]] name = "enumflags2_derive" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "144ec79496cbab6f84fa125dc67be9264aef22eb8a28da8454d9c33f15108da4" +checksum = "f58dc3c5e468259f19f2d46304a6b28f1c3d034442e14b322d2b850e36f6d5ae" dependencies = [ "proc-macro2", "quote", @@ -1553,7 +1544,7 @@ checksum = "975ccf83d8d9d0d84682850a38c8169027be83368805971cc4f238c2b245bc98" dependencies = [ "cfg-if 1.0.0", "libc", - "redox_syscall 0.2.11", + "redox_syscall 0.2.12", "winapi 0.3.9", ] @@ -1584,9 +1575,9 @@ dependencies = [ [[package]] name = "flume" -version = "0.10.11" +version = "0.10.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b279436a715a9de95dcd26b151db590a71961cc06e54918b24fe0dd5b7d3fc4" +checksum = "843c03199d0c0ca54bc1ea90ac0d507274c28abcc4f691ae8b4eaa375087c76a" dependencies = [ "futures-core", "futures-sink", @@ -1808,9 +1799,9 @@ dependencies = [ [[package]] name = "futures-rustls" -version = "0.22.0" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d383f0425d991a05e564c2f3ec150bd6dde863179c131dd60d8aa73a05434461" +checksum = "e01fe9932a224b72b45336d96040aa86386d674a31d0af27d800ea7bc8ca97fe" dependencies = [ "futures-io", "rustls 0.20.4", @@ -1885,9 +1876,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d39cd93900197114fa1fcb7ae84ca742095eed9442088988ae74fa744e930e77" +checksum = "9be70c98951c83b8d2f8f60d7065fa6d5146873094452a1008da8c2f1e4205ad" dependencies = [ "cfg-if 1.0.0", "js-sys", @@ -2047,16 +2038,6 @@ dependencies = [ "digest 0.9.0", ] -[[package]] -name = "hmac" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1441c6b1e930e2817404b5046f1f989899143a12bf92de603b69f4e0aee1e15" -dependencies = [ - "crypto-mac 0.10.1", - "digest 0.9.0", -] - [[package]] name = "hmac" version = "0.11.0" @@ -2067,6 +2048,15 @@ dependencies = [ "digest 0.9.0", ] +[[package]] +name = "hmac" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest 0.10.3", +] + [[package]] name = "hmac-drbg" version = "0.3.0" @@ -2197,7 +2187,7 @@ dependencies = [ "color_quant", "exr", "gif", - "jpeg-decoder 0.2.2", + "jpeg-decoder 0.2.3", "num-iter", "num-rational", "num-traits", @@ -2330,9 +2320,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.3.1" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f2d64f2edebec4ce84ad108148e67e1064789bee435edc5b60ad398714a3a9" +checksum = "35e70ee094dc02fd9c13fdad4940090f22dbd6ac7c9e7094a46cf0232a50bc7c" [[package]] name = "itertools" @@ -2372,9 +2362,9 @@ checksum = "229d53d58899083193af11e15917b5640cd40b29ff475a1fe4ef725deb02d0f2" [[package]] name = "jpeg-decoder" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "105fb082d64e2100074587f59a74231f771750c664af903f1f9f76c9dedfc6f1" +checksum = "a55ad40a2d27923f63b6fbde5934926176c69ac5e23da6ac05ebfaca984e163f" dependencies = [ "rayon", ] @@ -2444,18 +2434,18 @@ checksum = "7efd1d698db0759e6ef11a7cd44407407399a910c774dd804c64c032da7826ff" [[package]] name = "lexical" -version = "6.0.1" +version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c34e981f88d060a67815388470172638f1af16b3a12e581cb75142f190161bf9" +checksum = "ccd3e434c16f0164124ade12dcdee324fcc3dafb1cad0c7f1d8c2451a1aa6886" dependencies = [ "lexical-core", ] [[package]] name = "lexical-core" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a3926d8f156019890be4abe5fd3785e0cff1001e06f59c597641fd513a5a284" +checksum = "92912c4af2e7d9075be3e5e3122c4d7263855fa6cce34fbece4dd08e5884624d" dependencies = [ "lexical-parse-float", "lexical-parse-integer", @@ -2466,9 +2456,9 @@ dependencies = [ [[package]] name = "lexical-parse-float" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4d066d004fa762d9da995ed21aa8845bb9f6e4265f540d716fb4b315197bf0e" +checksum = "f518eed87c3be6debe6d26b855c97358d8a11bf05acec137e5f53080f5ad2dd8" dependencies = [ "lexical-parse-integer", "lexical-util", @@ -2477,9 +2467,9 @@ dependencies = [ [[package]] name = "lexical-parse-integer" -version = "0.8.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2c92badda8cc0fc4f3d3cc1c30aaefafb830510c8781ce4e8669881f3ed53ac" +checksum = "afc852ec67c6538bbb2b9911116a385b24510e879a69ab516e6a151b15a79168" dependencies = [ "lexical-util", "static_assertions", @@ -2487,18 +2477,18 @@ dependencies = [ [[package]] name = "lexical-util" -version = "0.8.1" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ff669ccaae16ee33af90dc51125755efed17f1309626ba5c12052512b11e291" +checksum = "c72a9d52c5c4e62fa2cdc2cb6c694a39ae1382d9c2a17a466f18e272a0930eb1" dependencies = [ "static_assertions", ] [[package]] name = "lexical-write-float" -version = "0.8.2" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b5186948c7b297abaaa51560f2581dae625e5ce7dfc2d8fdc56345adb6dc576" +checksum = "8a89ec1d062e481210c309b672f73a0567b7855f21e7d2fae636df44d12e97f9" dependencies = [ "lexical-util", "lexical-write-integer", @@ -2507,9 +2497,9 @@ dependencies = [ [[package]] name = "lexical-write-integer" -version = "0.8.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ece956492e0e40fd95ef8658a34d53a3b8c2015762fdcaaff2167b28de1f56ef" +checksum = "094060bd2a7c2ff3a16d5304a6ae82727cb3cc9d1c70f813cc73f744c319337e" dependencies = [ "lexical-util", "static_assertions", @@ -2517,9 +2507,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.119" +version = "0.2.121" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bf2e165bb3457c8e098ea76f3e3bc9db55f87aa90d52d0e6be741470916aaa4" +checksum = "efaa7b300f3b5fe8eb6bf21ce3895e1751d9665086af2d64b42f19701015ff4f" [[package]] name = "libgit2-sys" @@ -2555,7 +2545,7 @@ dependencies = [ "bytes", "futures", "futures-timer", - "getrandom 0.2.5", + "getrandom 0.2.6", "instant", "lazy_static", "libp2p-autonat", @@ -2973,9 +2963,9 @@ dependencies = [ [[package]] name = "libp2p-swarm-derive" -version = "0.27.0" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b8153a6472e84ec888ef2bf21deafe8d4214e811f0f162abbf07156c27f8fa8" +checksum = "daf2fe8c80b43561355f4d51875273b5b6dfbac37952e8f64b1270769305c9d7" dependencies = [ "quote", "syn", @@ -3139,9 +3129,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.3" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de5435b8549c16d423ed0c03dbaafe57cf6c3344744f1242520d59c9d8ecec66" +checksum = "6f35facd4a5673cb5a48822be2be1d4236c1c99cb4113cab7061ac720d5bf859" dependencies = [ "cc", "libc", @@ -3175,9 +3165,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.14" +version = "0.4.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" +checksum = "6389c490849ff5bc16be905ae24bc913a9c8892e19b2341dbc175e14c341c2b8" dependencies = [ "cfg-if 1.0.0", "value-bag", @@ -3236,6 +3226,15 @@ dependencies = [ "opaque-debug 0.3.0", ] +[[package]] +name = "md-5" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "658646b21e0b72f7866c7038ab086d3d5e1cd6271f060fd37defb241949d0582" +dependencies = [ + "digest 0.10.3", +] + [[package]] name = "md5" version = "0.6.1" @@ -3324,14 +3323,15 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.0" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba272f85fa0b41fc91872be579b3bbe0f56b792aa361a380eb669469f68dafb2" +checksum = "52da4364ffb0e4fe33a9841a98a3f3014fb964045ce4f7a45a398243c8d6b0c9" dependencies = [ "libc", "log", "miow 0.3.7", "ntapi", + "wasi 0.11.0+wasi-snapshot-preview1", "winapi 0.3.9", ] @@ -3371,8 +3371,7 @@ dependencies = [ [[package]] name = "mobc" version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f76d2f2e2dcbb00a8d3b2b09f026a74a82693ea52cd071647aa6cfa7f1ff37e" +source = "git+https://github.com/prisma/mobc?tag=1.0.0#75c68f1054b30e4aa22180c95eca1ccad96868cc" dependencies = [ "async-trait", "futures-channel", @@ -3380,6 +3379,7 @@ dependencies = [ "futures-timer", "futures-util", "log", + "thiserror", "tokio", ] @@ -3402,7 +3402,7 @@ dependencies = [ "hex", "hmac 0.11.0", "lazy_static", - "md-5", + "md-5 0.9.1", "os_info", "pbkdf2", "percent-encoding", @@ -3421,7 +3421,7 @@ dependencies = [ "thiserror", "tokio", "tokio-rustls", - "tokio-util", + "tokio-util 0.6.9", "trust-dns-proto", "trust-dns-resolver", "typed-builder", @@ -3434,7 +3434,7 @@ dependencies = [ [[package]] name = "mongodb-client" version = "0.1.0" -source = "git+https://github.com/prisma/prisma-engines?tag=3.10.0#73e60b76d394f8d37d8ebd1f8918c79029f0db86" +source = "git+https://github.com/prisma/prisma-engines?tag=3.11.0#b371888aaf8f51357c7457d836b86d12da91658b" dependencies = [ "mongodb", "once_cell", @@ -3445,7 +3445,7 @@ dependencies = [ [[package]] name = "mongodb-datamodel-connector" version = "0.1.0" -source = "git+https://github.com/prisma/prisma-engines?tag=3.10.0#73e60b76d394f8d37d8ebd1f8918c79029f0db86" +source = "git+https://github.com/prisma/prisma-engines?tag=3.11.0#b371888aaf8f51357c7457d836b86d12da91658b" dependencies = [ "datamodel-connector", "enumflags2", @@ -3457,7 +3457,7 @@ dependencies = [ [[package]] name = "mongodb-query-connector" version = "0.1.0" -source = "git+https://github.com/prisma/prisma-engines?tag=3.10.0#73e60b76d394f8d37d8ebd1f8918c79029f0db86" +source = "git+https://github.com/prisma/prisma-engines?tag=3.11.0#b371888aaf8f51357c7457d836b86d12da91658b" dependencies = [ "anyhow", "async-trait", @@ -3564,7 +3564,7 @@ dependencies = [ "futures-util", "lazy_static", "lru", - "mio 0.8.0", + "mio 0.8.2", "mysql_common", "native-tls", "once_cell", @@ -3577,7 +3577,7 @@ dependencies = [ "thiserror", "tokio", "tokio-native-tls", - "tokio-util", + "tokio-util 0.6.9", "twox-hash", "url", "uuid", @@ -3616,24 +3616,24 @@ dependencies = [ "smallvec", "subprocess", "thiserror", - "time 0.3.7", + "time 0.3.9", "uuid", ] [[package]] name = "nanorand" -version = "0.6.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "729eb334247daa1803e0a094d0a5c55711b85571179f5ec6e53eccfdf7008958" +checksum = "6a51313c5820b0b02bd422f4b44776fbf47961755c74ce64afc73bfad10226c3" dependencies = [ - "getrandom 0.2.5", + "getrandom 0.2.6", ] [[package]] name = "native-tls" -version = "0.2.8" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48ba9f7719b5a0f42f338907614285fb5fd70e53858141f69898a1fb7203b24d" +checksum = "fd7e2f3618557f980e0b17e8856252eee3c97fa12c54dff0ca290fb6266ca4a9" dependencies = [ "lazy_static", "libc", @@ -3650,7 +3650,7 @@ dependencies = [ [[package]] name = "native-types" version = "0.1.0" -source = "git+https://github.com/prisma/prisma-engines?tag=3.10.0#73e60b76d394f8d37d8ebd1f8918c79029f0db86" +source = "git+https://github.com/prisma/prisma-engines?tag=3.11.0#b371888aaf8f51357c7457d836b86d12da91658b" dependencies = [ "serde", "serde_json", @@ -3753,13 +3753,12 @@ checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451" [[package]] name = "nom" -version = "7.1.0" +version = "7.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1d11e1ef389c76fe5b81bcaf2ea32cf88b62bc494e19f493d0b30e7a930109" +checksum = "a8903e5a29a317527874d0402f867152a3d21c908bb0b933e416c65e301d4c36" dependencies = [ "memchr", "minimal-lexical", - "version_check", ] [[package]] @@ -3864,9 +3863,9 @@ dependencies = [ [[package]] name = "num_threads" -version = "0.1.3" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97ba99ba6393e2c3734791401b66902d981cb03bf190af674ca69949b6d5fb15" +checksum = "aba1801fb138d8e85e11d0fc70baf4fe1cdfffda7c6cd34a854905df588e5ed0" dependencies = [ "libc", ] @@ -4064,7 +4063,7 @@ dependencies = [ "cfg-if 1.0.0", "instant", "libc", - "redox_syscall 0.2.11", + "redox_syscall 0.2.12", "smallvec", "winapi 0.3.9", ] @@ -4077,7 +4076,7 @@ checksum = "28141e0cc4143da2443301914478dc976a61ffdb3f043058310c70df2fed8954" dependencies = [ "cfg-if 1.0.0", "libc", - "redox_syscall 0.2.11", + "redox_syscall 0.2.12", "smallvec", "windows-sys", ] @@ -4085,7 +4084,7 @@ dependencies = [ [[package]] name = "parser-database" version = "0.1.0" -source = "git+https://github.com/prisma/prisma-engines?tag=3.10.0#73e60b76d394f8d37d8ebd1f8918c79029f0db86" +source = "git+https://github.com/prisma/prisma-engines?tag=3.11.0#b371888aaf8f51357c7457d836b86d12da91658b" dependencies = [ "diagnostics", "enumflags2", @@ -4095,9 +4094,9 @@ dependencies = [ [[package]] name = "paste" -version = "1.0.6" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0744126afe1a6dd7f394cb50a716dbe086cb06e255e53d8d0185d82828358fb5" +checksum = "0c520e05135d6e763148b6426a837e239041653ba7becd2e538c076c738025fc" [[package]] name = "pathdiff" @@ -4200,18 +4199,18 @@ dependencies = [ [[package]] name = "phf" -version = "0.8.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dfb61232e34fcb633f43d12c58f83c1df82962dcdfa565a4e866ffc17dafe12" +checksum = "fabbf1ead8a5bcbc20f5f8b939ee3f5b0f6f281b6ad3468b84656b658b455259" dependencies = [ "phf_shared", ] [[package]] name = "phf_shared" -version = "0.8.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c00cf8b9eafe68dde5e9eaa2cef8ee84a9336a47d566ec55ca16589633b65af7" +checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" dependencies = [ "siphasher", ] @@ -4367,7 +4366,7 @@ dependencies = [ [[package]] name = "postgres-native-tls" version = "0.5.0" -source = "git+https://github.com/pimeys/rust-postgres?branch=pgbouncer-mode#8a61d46905571ff2b530b204dfa7c56ccbace7f4" +source = "git+https://github.com/pimeys/rust-postgres?branch=pgbouncer-mode#5ec2a4fa4635c721faf01dc560e48646479ec1b6" dependencies = [ "futures", "native-tls", @@ -4378,25 +4377,25 @@ dependencies = [ [[package]] name = "postgres-protocol" -version = "0.6.1" -source = "git+https://github.com/pimeys/rust-postgres?branch=pgbouncer-mode#8a61d46905571ff2b530b204dfa7c56ccbace7f4" +version = "0.6.4" +source = "git+https://github.com/pimeys/rust-postgres?branch=pgbouncer-mode#5ec2a4fa4635c721faf01dc560e48646479ec1b6" dependencies = [ "base64 0.13.0", "byteorder", "bytes", "fallible-iterator", - "hmac 0.10.1", - "md-5", + "hmac 0.12.1", + "md-5 0.10.1", "memchr", "rand 0.8.5", - "sha2 0.9.9", + "sha2 0.10.2", "stringprep", ] [[package]] name = "postgres-types" -version = "0.2.1" -source = "git+https://github.com/pimeys/rust-postgres?branch=pgbouncer-mode#8a61d46905571ff2b530b204dfa7c56ccbace7f4" +version = "0.2.3" +source = "git+https://github.com/pimeys/rust-postgres?branch=pgbouncer-mode#5ec2a4fa4635c721faf01dc560e48646479ec1b6" dependencies = [ "bit-vec", "bytes", @@ -4423,7 +4422,7 @@ checksum = "be91bcc43e73799dc46a6c194a55e7aae1d86cc867c860fd4a436019af21bd8c" [[package]] name = "prisma-client-rust" version = "0.3.0" -source = "git+https://github.com/Brendonovich/prisma-client-rust.git?branch=master#55ae4638502bf36aaf1ec2512f6d7520ba9ed096" +source = "git+https://github.com/Brendonovich/prisma-client-rust.git?rev=022b799929c0e5b1a7dc1565ec8228ba52a32991#022b799929c0e5b1a7dc1565ec8228ba52a32991" dependencies = [ "chrono", "datamodel", @@ -4433,12 +4432,13 @@ dependencies = [ "request-handlers", "serde", "serde_json", + "thiserror", ] [[package]] name = "prisma-inflector" version = "0.1.0" -source = "git+https://github.com/prisma/prisma-engines?tag=3.10.0#73e60b76d394f8d37d8ebd1f8918c79029f0db86" +source = "git+https://github.com/prisma/prisma-engines?tag=3.11.0#b371888aaf8f51357c7457d836b86d12da91658b" dependencies = [ "once_cell", "regex", @@ -4448,7 +4448,7 @@ dependencies = [ [[package]] name = "prisma-models" version = "0.0.0" -source = "git+https://github.com/prisma/prisma-engines?tag=3.10.0#73e60b76d394f8d37d8ebd1f8918c79029f0db86" +source = "git+https://github.com/prisma/prisma-engines?tag=3.11.0#b371888aaf8f51357c7457d836b86d12da91658b" dependencies = [ "bigdecimal 0.2.2", "chrono", @@ -4469,7 +4469,7 @@ dependencies = [ [[package]] name = "prisma-value" version = "0.1.0" -source = "git+https://github.com/prisma/prisma-engines?tag=3.10.0#73e60b76d394f8d37d8ebd1f8918c79029f0db86" +source = "git+https://github.com/prisma/prisma-engines?tag=3.11.0#b371888aaf8f51357c7457d836b86d12da91658b" dependencies = [ "base64 0.12.3", "bigdecimal 0.2.2", @@ -4629,7 +4629,7 @@ dependencies = [ [[package]] name = "quaint" version = "0.2.0-alpha.13" -source = "git+https://github.com/prisma/quaint#0b9aa168f5d25b1f752db075ee500e336c31301a" +source = "git+https://github.com/prisma/quaint#479e08a41b13902028906bc05f778688c06a3f18" dependencies = [ "async-trait", "base64 0.12.3", @@ -4658,7 +4658,7 @@ dependencies = [ "tiberius", "tokio", "tokio-postgres", - "tokio-util", + "tokio-util 0.6.9", "tracing", "tracing-core", "url", @@ -4668,7 +4668,7 @@ dependencies = [ [[package]] name = "query-connector" version = "0.1.0" -source = "git+https://github.com/prisma/prisma-engines?tag=3.10.0#73e60b76d394f8d37d8ebd1f8918c79029f0db86" +source = "git+https://github.com/prisma/prisma-engines?tag=3.11.0#b371888aaf8f51357c7457d836b86d12da91658b" dependencies = [ "anyhow", "async-trait", @@ -4688,7 +4688,7 @@ dependencies = [ [[package]] name = "query-core" version = "0.1.0" -source = "git+https://github.com/prisma/prisma-engines?tag=3.10.0#73e60b76d394f8d37d8ebd1f8918c79029f0db86" +source = "git+https://github.com/prisma/prisma-engines?tag=3.11.0#b371888aaf8f51357c7457d836b86d12da91658b" dependencies = [ "async-trait", "base64 0.12.3", @@ -4703,6 +4703,7 @@ dependencies = [ "im", "indexmap", "itertools 0.10.3", + "lazy_static", "mongodb-client", "mongodb-query-connector", "once_cell", @@ -4743,9 +4744,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.15" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "864d3e96a899863136fc6e99f3d7cae289dafe43bf2c5ac19b70df7210c0a145" +checksum = "632d02bff7f874a36f33ea8bb416cd484b90cc66c1194b1a1110d067a7013f58" dependencies = [ "proc-macro2", ] @@ -4815,7 +4816,7 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" dependencies = [ - "getrandom 0.2.5", + "getrandom 0.2.6", ] [[package]] @@ -4847,7 +4848,7 @@ checksum = "d78120e2c850279833f1dd3582f730c4ab53ed95aeaaaa862a2a5c71b1656d8e" dependencies = [ "crossbeam-channel", "crossbeam-deque", - "crossbeam-utils 0.8.7", + "crossbeam-utils 0.8.8", "lazy_static", "num_cpus", ] @@ -4873,28 +4874,29 @@ checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" [[package]] name = "redox_syscall" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8380fe0152551244f0747b1bf41737e0f8a74f97a14ccefd1148187271634f3c" +checksum = "8ae183fc1b06c149f0c1793e1eb447c8b04bfe46d48e9e48bfb8d2d7ed64ecf0" dependencies = [ "bitflags 1.3.2", ] [[package]] name = "redox_users" -version = "0.4.0" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64" +checksum = "7776223e2696f1aa4c6b0170e83212f47296a00424305117d013dfe86fb0fe55" dependencies = [ - "getrandom 0.2.5", - "redox_syscall 0.2.11", + "getrandom 0.2.6", + "redox_syscall 0.2.12", + "thiserror", ] [[package]] name = "regex" -version = "1.5.4" +version = "1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461" +checksum = "1a11647b6b25ff05a515cb92c365cec08801e83423a235b51e231e1808747286" dependencies = [ "aho-corasick", "memchr", @@ -4919,7 +4921,7 @@ dependencies = [ [[package]] name = "request-handlers" version = "0.1.0" -source = "git+https://github.com/prisma/prisma-engines?tag=3.10.0#73e60b76d394f8d37d8ebd1f8918c79029f0db86" +source = "git+https://github.com/prisma/prisma-engines?tag=3.11.0#b371888aaf8f51357c7457d836b86d12da91658b" dependencies = [ "bigdecimal 0.2.2", "connection-string", @@ -5032,9 +5034,9 @@ dependencies = [ [[package]] name = "rust_decimal" -version = "1.22.0" +version = "1.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d37baa70cf8662d2ba1c1868c5983dda16ef32b105cce41fb5c47e72936a90b3" +checksum = "22dc69eadbf0ee2110b8d20418c0c6edbaefec2811c4963dc17b6344e11fe0f8" dependencies = [ "arrayvec 0.7.2", "num-traits", @@ -5074,7 +5076,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver 1.0.6", + "semver 1.0.7", ] [[package]] @@ -5171,7 +5173,7 @@ dependencies = [ [[package]] name = "schema-ast" version = "0.1.0" -source = "git+https://github.com/prisma/prisma-engines?tag=3.10.0#73e60b76d394f8d37d8ebd1f8918c79029f0db86" +source = "git+https://github.com/prisma/prisma-engines?tag=3.11.0#b371888aaf8f51357c7457d836b86d12da91658b" dependencies = [ "diagnostics", "pest", @@ -5285,9 +5287,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.6" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a3381e03edd24287172047536f20cabde766e2cd3e65e6b00fb3af51c4f38d" +checksum = "d65bd28f48be7196d222d95b9243287f48d27aca604e08497513019ff0502cc4" dependencies = [ "serde", ] @@ -5473,9 +5475,9 @@ checksum = "f054c6c1a6e95179d6f23ed974060dcefb2d9388bb7256900badad682c499de4" [[package]] name = "siphasher" -version = "0.3.9" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a86232ab60fa71287d7f2ddae4a7073f6b7aac33631c3015abb556f08c6d0a3e" +checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" [[package]] name = "sized-chunks" @@ -5591,7 +5593,7 @@ dependencies = [ [[package]] name = "sql-datamodel-connector" version = "0.1.0" -source = "git+https://github.com/prisma/prisma-engines?tag=3.10.0#73e60b76d394f8d37d8ebd1f8918c79029f0db86" +source = "git+https://github.com/prisma/prisma-engines?tag=3.11.0#b371888aaf8f51357c7457d836b86d12da91658b" dependencies = [ "datamodel-connector", "enumflags2", @@ -5604,7 +5606,7 @@ dependencies = [ [[package]] name = "sql-query-connector" version = "0.1.0" -source = "git+https://github.com/prisma/prisma-engines?tag=3.10.0#73e60b76d394f8d37d8ebd1f8918c79029f0db86" +source = "git+https://github.com/prisma/prisma-engines?tag=3.11.0#b371888aaf8f51357c7457d836b86d12da91658b" dependencies = [ "anyhow", "async-trait", @@ -5740,9 +5742,9 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.86" +version = "1.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a65b3f4ffa0092e9887669db0eae07941f023991ab58ea44da8fe8e2d511c6b" +checksum = "704df27628939572cd88d33f171cd6f896f4eaca85252c6e0a72d8d8287ee86f" dependencies = [ "proc-macro2", "quote", @@ -5818,7 +5820,7 @@ dependencies = [ "cfg-if 1.0.0", "fastrand", "libc", - "redox_syscall 0.2.11", + "redox_syscall 0.2.12", "remove_dir_all", "winapi 0.3.9", ] @@ -5930,7 +5932,7 @@ dependencies = [ "pretty-hex", "thiserror", "tokio", - "tokio-util", + "tokio-util 0.6.9", "tracing", "uuid", "winauth", @@ -5960,9 +5962,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.7" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "004cbc98f30fa233c61a38bc77e96a9106e65c88f2d3bef182ae952027e5753d" +checksum = "c2702e08a7a860f005826c6815dcac101b19b5eb330c27fe4a5928fec1d20ddd" dependencies = [ "libc", "num_threads", @@ -5992,7 +5994,7 @@ dependencies = [ "bytes", "libc", "memchr", - "mio 0.8.0", + "mio 0.8.2", "num_cpus", "pin-project-lite 0.2.8", "socket2 0.4.4", @@ -6022,8 +6024,8 @@ dependencies = [ [[package]] name = "tokio-postgres" -version = "0.7.1" -source = "git+https://github.com/pimeys/rust-postgres?branch=pgbouncer-mode#8a61d46905571ff2b530b204dfa7c56ccbace7f4" +version = "0.7.6" +source = "git+https://github.com/pimeys/rust-postgres?branch=pgbouncer-mode#5ec2a4fa4635c721faf01dc560e48646479ec1b6" dependencies = [ "async-trait", "byteorder", @@ -6031,7 +6033,7 @@ dependencies = [ "fallible-iterator", "futures", "log", - "parking_lot 0.11.2", + "parking_lot 0.12.0", "percent-encoding", "phf", "pin-project-lite 0.2.8", @@ -6039,7 +6041,7 @@ dependencies = [ "postgres-types", "socket2 0.4.4", "tokio", - "tokio-util", + "tokio-util 0.7.1", ] [[package]] @@ -6068,6 +6070,20 @@ dependencies = [ "tokio", ] +[[package]] +name = "tokio-util" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0edfdeb067411dba2044da6d1cb2df793dd35add7888d73c16e3381ded401764" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite 0.2.8", + "tokio", + "tracing", +] + [[package]] name = "toml" version = "0.5.8" @@ -6092,9 +6108,9 @@ dependencies = [ [[package]] name = "tracing" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6c650a8ef0cd2dd93736f033d21cbd1224c5a967aa0c258d00fcf7dafef9b9f" +checksum = "4a1bdf54a7c28a2bbf701e1d2233f6c77f473486b94bee4f9678da5a148dca7f" dependencies = [ "cfg-if 1.0.0", "log", @@ -6105,9 +6121,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.19" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8276d9a4a3a558d7b7ad5303ad50b53d58264641b82914b7ada36bd762e7a716" +checksum = "2e65ce065b4b5c53e73bb28912318cb8c9e9ad3921f1d669eb0e68b4c8143a2b" dependencies = [ "proc-macro2", "quote", @@ -6116,9 +6132,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03cfcb51380632a72d3111cb8d3447a8d908e577d31beeac006f836383d29a23" +checksum = "aa31669fa42c09c34d94d8165dd2012e8ff3c66aca50f3bb226b68f216f2706c" dependencies = [ "lazy_static", "valuable", @@ -6394,7 +6410,7 @@ dependencies = [ [[package]] name = "user-facing-error-macros" version = "0.1.0" -source = "git+https://github.com/prisma/prisma-engines?tag=3.10.0#73e60b76d394f8d37d8ebd1f8918c79029f0db86" +source = "git+https://github.com/prisma/prisma-engines?tag=3.11.0#b371888aaf8f51357c7457d836b86d12da91658b" dependencies = [ "proc-macro2", "quote", @@ -6404,7 +6420,7 @@ dependencies = [ [[package]] name = "user-facing-errors" version = "0.1.0" -source = "git+https://github.com/prisma/prisma-engines?tag=3.10.0#73e60b76d394f8d37d8ebd1f8918c79029f0db86" +source = "git+https://github.com/prisma/prisma-engines?tag=3.11.0#b371888aaf8f51357c7457d836b86d12da91658b" dependencies = [ "backtrace", "indoc", @@ -6421,7 +6437,7 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" dependencies = [ - "getrandom 0.2.5", + "getrandom 0.2.6", "serde", ] @@ -6500,6 +6516,12 @@ version = "0.10.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + [[package]] name = "wasm-bindgen" version = "0.2.79" @@ -6593,9 +6615,9 @@ dependencies = [ [[package]] name = "webp" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f80f6a431ea17cbe9d6958628e553c17d22df62b301b39940a9dfd60f3dd7c6" +checksum = "cf022f821f166079a407d000ab57e84de020e66ffbbf4edde999bc7d6e371cae" dependencies = [ "image", "libwebp-sys", @@ -6656,9 +6678,9 @@ dependencies = [ [[package]] name = "which" -version = "4.2.4" +version = "4.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a5a7e487e921cf220206864a94a89b6c6905bfc19f1057fa26a4cb360e5c1d2" +checksum = "5c4fb54e6113b6a8772ee41c3404fb0301ac79604489467e0a9ce1f3e97c24ae" dependencies = [ "either", "lazy_static", @@ -6872,14 +6894,14 @@ dependencies = [ [[package]] name = "yamux" -version = "0.10.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29d4c1dd079043fe673e79fe3c3a260ae2d2fb413f1062cae9e062748df0df03" +checksum = "0c0608f53c1dc0bad505d03a34bbd49fbf2ad7b51eb036123e896365532745a1" dependencies = [ "futures", "log", "nohash-hasher", - "parking_lot 0.11.2", + "parking_lot 0.12.0", "rand 0.8.5", "static_assertions", ] diff --git a/packages/core/Cargo.toml b/packages/core/Cargo.toml index f4bd61e90..395e9d4c7 100644 --- a/packages/core/Cargo.toml +++ b/packages/core/Cargo.toml @@ -29,7 +29,7 @@ once_cell = "1.8.0" int-enum = "0.4.0" # Project dependencies ts-rs = "6.1" -prisma-client-rust = { git = "https://github.com/Brendonovich/prisma-client-rust.git", branch = "master" } +prisma-client-rust = { git = "https://github.com/Brendonovich/prisma-client-rust.git", rev = "022b799929c0e5b1a7dc1565ec8228ba52a32991" } walkdir = "^2.3.2" bytesize = "1.1.0" env_logger = "0.9.0" diff --git a/packages/core/src/client/mod.rs b/packages/core/src/client/mod.rs index 0e2fb14a1..9437fd7cb 100644 --- a/packages/core/src/client/mod.rs +++ b/packages/core/src/client/mod.rs @@ -1,6 +1,15 @@ -use crate::{db, prisma::Client, state, Core}; -use anyhow::Result; +use crate::{ + prisma::{self, Client}, + state, Core, +}; use std::env; +use thiserror::Error; + +#[derive(Error, Debug)] +pub enum ClientError { + #[error("Database error")] + DatabaseError(#[from] prisma::QueryError), +} pub enum Platform { Unknown = 0, @@ -11,7 +20,7 @@ pub enum Platform { Android, } -pub async fn create(core: &Core) -> Result<()> { +pub async fn create(core: &Core) -> Result<(), ClientError> { println!("Creating client..."); let mut config = state::client::get(); @@ -33,7 +42,7 @@ pub async fn create(core: &Core) -> Result<()> { .client() .find_unique(Client::uuid().equals(config.client_uuid.clone())) .exec() - .await + .await? { Some(client) => client, None => { @@ -41,10 +50,13 @@ pub async fn create(core: &Core) -> Result<()> { .create_one( Client::uuid().set(config.client_uuid.clone()), Client::name().set(hostname.clone()), - vec![Client::platform().set(platform as i64), Client::online().set(true)], + vec![ + Client::platform().set(platform as i32), + Client::online().set(true), + ], ) .exec() - .await + .await? }, }; diff --git a/packages/core/src/crypto/encryption.rs b/packages/core/src/crypto/encryption.rs index a62484b3c..78b744561 100644 --- a/packages/core/src/crypto/encryption.rs +++ b/packages/core/src/crypto/encryption.rs @@ -2,7 +2,7 @@ use int_enum::IntEnum; use serde::{Deserialize, Serialize}; use ts_rs::TS; -#[repr(i64)] +#[repr(i32)] #[derive(Debug, Clone, Copy, Serialize, Deserialize, TS, Eq, PartialEq, IntEnum)] #[ts(export)] pub enum EncryptionAlgorithm { diff --git a/packages/core/src/db/migrate.rs b/packages/core/src/db/migrate.rs index e155d0e04..f92202b99 100644 --- a/packages/core/src/db/migrate.rs +++ b/packages/core/src/db/migrate.rs @@ -6,14 +6,17 @@ use include_dir::{include_dir, Dir}; use std::ffi::OsStr; use std::io::BufReader; -const INIT_MIGRATION: &str = include_str!("../../prisma/migrations/migration_table/migration.sql"); +const INIT_MIGRATION: &str = + include_str!("../../prisma/migrations/migration_table/migration.sql"); static MIGRATIONS_DIR: Dir = include_dir!("$CARGO_MANIFEST_DIR/prisma/migrations"); pub async fn run_migrations(db_url: &str) -> Result<()> { let client = prisma::new_client_with_url(&format!("file:{}", &db_url)).await; match client - ._query_raw::("SELECT name FROM sqlite_master WHERE type='table' AND name='_migrations'") + ._query_raw::( + "SELECT name FROM sqlite_master WHERE type='table' AND name='_migrations'", + ) .await { Ok(data) => { @@ -60,7 +63,9 @@ pub async fn run_migrations(db_url: &str) -> Result<()> { for subdir in migration_subdirs { println!("{:?}", subdir.path()); - let migration_file = subdir.get_file(subdir.path().join("./migration.sql")).unwrap(); + let migration_file = subdir + .get_file(subdir.path().join("./migration.sql")) + .unwrap(); let migration_sql = migration_file.contents_utf8().unwrap(); let digest = sha256_digest(BufReader::new(migration_file.contents()))?; @@ -73,7 +78,7 @@ pub async fn run_migrations(db_url: &str) -> Result<()> { .migration() .find_unique(Migration::checksum().equals(checksum.clone())) .exec() - .await; + .await?; if existing_migration.is_none() { println!("Running migration: {}", name); @@ -89,7 +94,7 @@ pub async fn run_migrations(db_url: &str) -> Result<()> { vec![], ) .exec() - .await; + .await?; for (i, step) in steps.iter().enumerate() { match client._execute_raw(&format!("{};", step)).await { @@ -97,10 +102,14 @@ pub async fn run_migrations(db_url: &str) -> Result<()> { println!("Step {} ran successfully", i); client .migration() - .find_unique(Migration::checksum().equals(checksum.clone())) - .update(vec![Migration::steps_applied().set(i as i64 + 1)]) + .find_unique( + Migration::checksum().equals(checksum.clone()), + ) + .update(vec![ + Migration::steps_applied().set(i as i32 + 1) + ]) .exec() - .await; + .await?; }, Err(e) => { println!("Error running migration: {}", name); diff --git a/packages/core/src/db/mod.rs b/packages/core/src/db/mod.rs index 4702075e9..c1a88a3ae 100644 --- a/packages/core/src/db/mod.rs +++ b/packages/core/src/db/mod.rs @@ -1,6 +1,5 @@ use crate::state; use crate::{prisma, prisma::PrismaClient}; -use anyhow::Result; use thiserror::Error; pub mod migrate; diff --git a/packages/core/src/file/checksum.rs b/packages/core/src/file/checksum.rs index 1d48bb029..9c87d80d8 100644 --- a/packages/core/src/file/checksum.rs +++ b/packages/core/src/file/checksum.rs @@ -2,7 +2,7 @@ use anyhow::Result; use data_encoding::HEXLOWER; use ring::digest::{Context, Digest, SHA256}; use std::convert::TryInto; -use std::fs::{self, File}; +use std::fs::File; use std::io::{self, BufReader, Read}; use std::os::unix::prelude::FileExt; diff --git a/packages/core/src/file/explorer/mod.rs b/packages/core/src/file/explorer/mod.rs index 7a9313c13..e596d5a29 100644 --- a/packages/core/src/file/explorer/mod.rs +++ b/packages/core/src/file/explorer/mod.rs @@ -1,9 +1,11 @@ -use crate::{db, file::DirectoryWithContents, prisma::FilePath, Core, CoreContext}; -use anyhow::Result; +use crate::{file::DirectoryWithContents, prisma::FilePath, CoreContext}; -use super::{File, FileError}; +use super::FileError; -pub async fn open_dir(ctx: &CoreContext, path: &str) -> Result { +pub async fn open_dir( + ctx: &CoreContext, + path: &str, +) -> Result { let db = &ctx.database; println!("getting files... {:?}", &path); @@ -15,14 +17,14 @@ pub async fn open_dir(ctx: &CoreContext, path: &str) -> Result, + id: Option, } // grab the next id so we can increment in memory for batch inserting let first_file_id = match db @@ -79,9 +79,9 @@ pub async fn scan_path( // spawn a dedicated thread to scan the directory for performance let (paths, scan_start, on_progress) = tokio::task::spawn_blocking(move || { // store every valid path discovered - let mut paths: Vec<(PathBuf, i64, Option)> = Vec::new(); + let mut paths: Vec<(PathBuf, i32, Option)> = Vec::new(); // store a hashmap of directories to their file ids for fast lookup - let mut dirs: HashMap = HashMap::new(); + let mut dirs: HashMap = HashMap::new(); // begin timer for logging purposes let scan_start = Instant::now(); @@ -188,9 +188,9 @@ pub async fn scan_path( // reads a file at a path and creates an ActiveModel with metadata fn prepare_values( file_path: &PathBuf, - id: i64, + id: i32, location: &LocationResource, - parent_id: &Option, + parent_id: &Option, ) -> Result { let metadata = fs::metadata(&file_path)?; let location_path = location.path.as_ref().unwrap().as_str(); diff --git a/packages/core/src/file/mod.rs b/packages/core/src/file/mod.rs index 6b42f155f..57324f85e 100644 --- a/packages/core/src/file/mod.rs +++ b/packages/core/src/file/mod.rs @@ -5,8 +5,7 @@ use ts_rs::TS; use crate::{ crypto::encryption::EncryptionAlgorithm, - db, - prisma::{FileData, FilePathData}, + prisma::{self, FileData, FilePathData}, }; pub mod checksum; pub mod explorer; @@ -18,7 +17,7 @@ pub mod watcher; #[derive(Debug, Clone, Serialize, Deserialize, TS)] #[ts(export)] pub struct File { - pub id: i64, + pub id: i32, pub partial_checksum: String, pub checksum: Option, pub size_in_bytes: String, @@ -38,18 +37,18 @@ pub struct File { #[derive(Debug, Clone, Serialize, Deserialize, TS)] #[ts(export)] pub struct FilePath { - pub id: i64, + pub id: i32, pub is_dir: bool, - pub location_id: i64, + pub location_id: i32, pub materialized_path: String, - pub file_id: Option, - pub parent_id: Option, + pub file_id: Option, + pub parent_id: Option, #[ts(type = "string")] pub date_indexed: chrono::DateTime, pub permissions: Option, } -#[repr(i64)] +#[repr(i32)] #[derive(Debug, Clone, Copy, Serialize, Deserialize, TS, Eq, PartialEq, IntEnum)] #[ts(export)] pub enum FileType { @@ -111,5 +110,5 @@ pub enum FileError { #[error("File not found (path: {0:?})")] FileNotFound(String), #[error("Database error")] - DatabaseError(#[from] db::DatabaseError), + DatabaseError(#[from] prisma::QueryError), } diff --git a/packages/core/src/file/thumb.rs b/packages/core/src/file/thumb.rs index 23db6732f..45720bddb 100644 --- a/packages/core/src/file/thumb.rs +++ b/packages/core/src/file/thumb.rs @@ -9,7 +9,8 @@ pub async fn create_thumb(path: &str) -> Result<()> { let file = File::open(path).unwrap(); let reader = BufReader::new(file); - let mut thumbnails = create_thumbnails(reader, mime::IMAGE_PNG, [ThumbnailSize::Small]).unwrap(); + let mut thumbnails = + create_thumbnails(reader, mime::IMAGE_PNG, [ThumbnailSize::Small]).unwrap(); let thumbnail = thumbnails.pop().unwrap(); diff --git a/packages/core/src/job/jobs.rs b/packages/core/src/job/jobs.rs index 4b5eedc14..91d94eeff 100644 --- a/packages/core/src/job/jobs.rs +++ b/packages/core/src/job/jobs.rs @@ -71,7 +71,7 @@ impl Jobs { prisma::Job::status().equals(JobStatus::Queued.int_value()), ])]) .exec() - .await; + .await?; Ok(jobs.into_iter().map(|j| j.into()).collect()) } @@ -88,20 +88,20 @@ pub enum JobReportUpdate { #[ts(export)] pub struct JobReport { pub id: String, - // client_id: i64, + // client_id: i32, #[ts(type = "string")] pub date_created: chrono::DateTime, #[ts(type = "string")] pub date_modified: chrono::DateTime, pub status: JobStatus, - pub task_count: i64, - pub completed_task_count: i64, + pub task_count: i32, + pub completed_task_count: i32, pub message: String, - pub percentage_complete: f64, + // pub percentage_complete: f64, #[ts(type = "string")] - pub seconds_elapsed: i64, + pub seconds_elapsed: i32, } // convert database struct into a resource struct @@ -116,7 +116,6 @@ impl Into for JobData { date_created: self.date_created, date_modified: self.date_modified, message: String::new(), - percentage_complete: 0.0, seconds_elapsed: self.seconds_elapsed, } } @@ -132,12 +131,11 @@ impl JobReport { status: JobStatus::Queued, task_count: 0, completed_task_count: 0, - percentage_complete: 0.0, message: String::new(), seconds_elapsed: 0, } } - pub async fn create(&self, ctx: &CoreContext) -> Result<()> { + pub async fn create(&self, ctx: &CoreContext) -> Result<(), JobError> { // let config = client::get(); ctx.database .job() @@ -148,10 +146,10 @@ impl JobReport { vec![], ) .exec() - .await; + .await?; Ok(()) } - pub async fn update(&self, ctx: &CoreContext) -> Result<()> { + pub async fn update(&self, ctx: &CoreContext) -> Result<(), JobError> { // let config = client::get(); ctx.database .job() @@ -164,12 +162,12 @@ impl JobReport { prisma::Job::seconds_elapsed().set(self.seconds_elapsed), ]) .exec() - .await; + .await?; Ok(()) } } -#[repr(i64)] +#[repr(i32)] #[derive(Debug, Clone, Copy, Serialize, Deserialize, TS, Eq, PartialEq, IntEnum)] #[ts(export)] pub enum JobStatus { diff --git a/packages/core/src/job/mod.rs b/packages/core/src/job/mod.rs index ee0938755..5dc2773c5 100644 --- a/packages/core/src/job/mod.rs +++ b/packages/core/src/job/mod.rs @@ -1,7 +1,7 @@ use std::fmt::Debug; use thiserror::Error; -use crate::db; +use crate::prisma; pub mod jobs; pub mod worker; @@ -11,5 +11,212 @@ pub enum JobError { #[error("Failed to create job (job_id {job_id:?})")] CreateFailure { job_id: String }, #[error("Database error")] - DatabaseError(#[from] db::DatabaseError), + DatabaseError(#[from] prisma::QueryError), } + +// pub struct JobContext { +// pub core_ctx: CoreContext, +// pub job_data: JobReport, +// } + +// #[derive(Debug)] +// pub enum JobCommand { +// Create(Box), +// Update { id: i32, data: JobUpdateEvent }, +// Completed { id: i32 }, +// } + +// #[derive(Debug)] +// pub struct JobUpdateEvent { +// pub task_count: Option, +// pub completed_task_count: Option, +// pub message: Option, +// } + +// // a struct to handle the runtime and execution of jobs +// pub struct Jobs { +// pub job_sender_channel: Sender, +// pub running_job: Mutex>, +// } + +// impl Jobs { +// pub fn new() -> (Self, mpsc::Receiver) { +// let (job_sender, job_receiver) = mpsc::channel(100); +// ( +// Self { +// job_sender_channel: job_sender, +// running_job: Mutex::new(None), +// }, +// job_receiver, +// ) +// } + +// pub fn start(&self, ctx: CoreContext, mut job_receiver: mpsc::Receiver) { +// // open a thread to handle job execution +// tokio::spawn(async move { +// // local memory for job queue +// let mut queued_jobs: Vec<(Box, JobReport)> = vec![]; + +// loop { +// tokio::select! { +// // when job is received via message channel +// Some(request) = job_receiver.recv() => { +// match request { +// // create a new job +// JobCommand::Create(job) => { +// // create job report and save to database +// let mut report = JobReport::new(); +// println!("Creating job: {:?} Metadata: {:?}", &job, &report); +// report.create(&ctx).await; +// // queue the job +// queued_jobs.push((job, report)); + +// let current_running_job = self.running_job.lock().await; + +// if current_running_job.is_none() { +// // replace the running job mutex with this job +// let (current_job, current_report) = queued_jobs.pop().unwrap(); +// current_running_job.replace(current_report); +// // push job id into running jobs vector +// let id = report.id; +// let ctx = ctx.clone(); + +// // open a dedicated blocking thread to run job +// tokio::task::spawn_blocking(move || { +// // asynchronously call run method +// let handle = tokio::runtime::Handle::current(); +// let job_sender = ctx.job_sender.clone(); + +// handle.block_on(current_report.update(&ctx, None, Some(JobStatus::Running))).unwrap(); +// handle.block_on(job.run(JobContext { core_ctx: ctx.clone(), job_data: current_report.clone() })).unwrap(); + +// job_sender.send(JobCommand::Completed { id }).unwrap(); + +// }); +// } +// } +// // update a running job +// JobCommand::Update { id, data } => { +// let ctx = ctx.clone(); +// // find running job in memory by id +// let running_job = get_job(&id).unwrap_or_else(|| panic!("Job not found")); +// // update job data +// running_job.update(&ctx, Some(data), None).await.unwrap(); +// // emit event to invalidate client cache +// ctx.emit(CoreEvent::InvalidateQuery(ClientQuery::JobGetRunning)).await; +// }, +// JobCommand::Completed { id } => { +// let ctx = ctx.clone(); +// let running_job = get_job(&id).unwrap_or_else(|| panic!("Job not found")); +// running_job.update(&ctx, None, Some(JobStatus::Completed)).await.unwrap(); +// ctx.emit(CoreEvent::InvalidateQuery(ClientQuery::JobGetRunning)).await; +// ctx.emit(CoreEvent::InvalidateQuery(ClientQuery::JobGetHistory)).await; + +// } +// } +// } +// } +// } +// }); +// } + +// pub async fn handle_job_command(&mut self, job: JobCommand) { +// self.job_sender_channel.send(job).await.unwrap_or(()); +// } +// } + +// impl JobReport { +// pub fn new() -> Self { +// Self { +// id: 0, +// // client_id: 0, +// date_created: chrono::Utc::now(), +// date_modified: chrono::Utc::now(), +// status: JobStatus::Queued, +// task_count: 0, +// completed_task_count: 0, +// message: String::new(), +// } +// } +// pub async fn create(&mut self, ctx: &CoreContext) { +// // let config = client::get(); +// let job = ctx +// .database +// .job() +// .create_one( +// prisma::Job::action().set(1), +// // prisma::Job::clients().link(prisma::Client::id().equals(config.client_uuid)), +// vec![], +// ) +// .exec() +// .await; +// self.id = job.id; +// } +// pub async fn update( +// &mut self, +// ctx: &CoreContext, +// changes: Option, +// status: Option, +// ) -> Result<()> { +// match changes { +// Some(changes) => { +// if changes.task_count.is_some() { +// self.task_count = changes.task_count.unwrap(); +// } +// if changes.completed_task_count.is_some() { +// self.completed_task_count = changes.completed_task_count.unwrap(); +// } +// if changes.message.is_some() { +// self.message = changes.message.unwrap(); +// } +// }, +// None => {}, +// } +// if status.is_some() { +// self.status = status.unwrap(); + +// if self.status == JobStatus::Completed { +// ctx.database +// .job() +// .find_unique(prisma::Job::id().equals(self.id)) +// .update(vec![ +// prisma::Job::status().set(self.status.int_value()), +// prisma::Job::task_count().set(self.task_count), +// prisma::Job::completed_task_count().set(self.completed_task_count), +// prisma::Job::date_modified().set(chrono::Utc::now()), +// ]) +// .exec() +// .await; +// } +// } +// println!("JOB REPORT: {:?}", self); + +// Ok(()) +// } + +// pub async fn get_running(ctx: &CoreContext) -> Result, JobError> { +// let db = &ctx.database; +// let jobs = db +// .job() +// .find_many(vec![prisma::Job::status().equals(JobStatus::Running.int_value())]) +// .exec() +// .await; + +// Ok(jobs.into_iter().map(|j| j.into()).collect()) +// } + +// pub async fn get_history(ctx: &CoreContext) -> Result, JobError> { +// let db = &ctx.database; +// let jobs = db +// .job() +// .find_many(vec![or(vec![ +// prisma::Job::status().equals(JobStatus::Completed.int_value()), +// prisma::Job::status().equals(JobStatus::Canceled.int_value()), +// prisma::Job::status().equals(JobStatus::Queued.int_value()), +// ])]) +// .exec() +// .await; + +// Ok(jobs.into_iter().map(|j| j.into()).collect()) +// } +// } diff --git a/packages/core/src/job/worker.rs b/packages/core/src/job/worker.rs index 668c69e5a..17dc50218 100644 --- a/packages/core/src/job/worker.rs +++ b/packages/core/src/job/worker.rs @@ -142,23 +142,19 @@ impl Worker { for change in changes { match change { JobReportUpdate::TaskCount(task_count) => { - worker.job_report.task_count = task_count as i64; + worker.job_report.task_count = task_count as i32; }, JobReportUpdate::CompletedTaskCount(completed_task_count) => { worker.job_report.completed_task_count = - completed_task_count as i64; - worker.job_report.percentage_complete = - (worker.job_report.completed_task_count as f64 - / worker.job_report.task_count as f64) * 100.0; + completed_task_count as i32; }, JobReportUpdate::Message(message) => { worker.job_report.message = message; }, JobReportUpdate::SecondsElapsed(seconds) => { - worker.job_report.seconds_elapsed = seconds as i64; + worker.job_report.seconds_elapsed = seconds as i32; }, } - worker.job_report.date_modified = chrono::Utc::now(); } ctx.emit(CoreEvent::InvalidateQueryDebounced( ClientQuery::JobGetRunning, diff --git a/packages/core/src/lib.rs b/packages/core/src/lib.rs index e900e0ad6..9a6cf270d 100644 --- a/packages/core/src/lib.rs +++ b/packages/core/src/lib.rs @@ -1,4 +1,3 @@ -use anyhow::Result; use job::jobs::{Job, JobReport, Jobs}; use log::{error, info}; use prisma::PrismaClient; @@ -308,22 +307,22 @@ impl Core { #[ts(export)] pub enum ClientCommand { // Files - FileRead { id: i64 }, - // FileEncrypt { id: i64, algorithm: EncryptionAlgorithm }, - FileDelete { id: i64 }, + FileRead { id: i32 }, + // FileEncrypt { id: i32, algorithm: EncryptionAlgorithm }, + FileDelete { id: i32 }, // Library - LibDelete { id: i64 }, + LibDelete { id: i32 }, // Tags TagCreate { name: String, color: String }, TagUpdate { name: String, color: String }, - TagAssign { file_id: i64, tag_id: i64 }, - TagDelete { id: i64 }, + TagAssign { file_id: i32, tag_id: i32 }, + TagDelete { id: i32 }, // Locations LocCreate { path: String }, - LocUpdate { id: i64, name: Option }, - LocDelete { id: i64 }, + LocUpdate { id: i32, name: Option }, + LocDelete { id: i32 }, // System - SysVolumeUnmount { id: i64 }, + SysVolumeUnmount { id: i32 }, } // represents an event this library can emit @@ -336,8 +335,8 @@ pub enum ClientQuery { LibGetTags, JobGetRunning, JobGetHistory, - SysGetLocation { id: i64 }, - LibGetExplorerDir { path: String, limit: i64 }, + SysGetLocation { id: i32 }, + LibGetExplorerDir { path: String, limit: i32 }, } // represents an event this library can emit @@ -378,7 +377,7 @@ pub enum CoreError { #[error("Job error")] JobError(#[from] job::JobError), #[error("Database error")] - DatabaseError(#[from] db::DatabaseError), + DatabaseError(#[from] prisma::QueryError), } #[derive(Serialize, Deserialize, Debug, TS)] diff --git a/packages/core/src/library/loader.rs b/packages/core/src/library/loader.rs index d1b8ffc1a..6a551f87b 100644 --- a/packages/core/src/library/loader.rs +++ b/packages/core/src/library/loader.rs @@ -1,18 +1,25 @@ use anyhow::Result; +use thiserror::Error; use uuid::Uuid; use crate::state::client::LibraryState; -use crate::Core; use crate::{ - db::{self, migrate}, + db::migrate, prisma::{Library, LibraryData}, state, }; +use crate::{prisma, Core}; pub static LIBRARY_DB_NAME: &str = "library.db"; pub static DEFAULT_NAME: &str = "My Library"; -pub async fn get(core: &Core) -> Result { +#[derive(Error, Debug)] +pub enum LibraryError { + #[error("Database error")] + DatabaseError(#[from] prisma::QueryError), +} + +pub async fn get(core: &Core) -> Result { let config = state::client::get(); let db = &core.database; @@ -25,7 +32,7 @@ pub async fn get(core: &Core) -> Result { .library() .find_unique(Library::uuid().equals(library_state.library_uuid.clone())) .exec() - .await + .await? { Some(library) => Ok(library), None => { diff --git a/packages/core/src/p2p/listener.rs b/packages/core/src/p2p/listener.rs index e16e76c8b..3ed8132b4 100644 --- a/packages/core/src/p2p/listener.rs +++ b/packages/core/src/p2p/listener.rs @@ -38,7 +38,9 @@ pub async fn listen(port: Option) -> Result<(), Box> { loop { match swarm.select_next_some().await { - SwarmEvent::NewListenAddr { address, .. } => println!("Listening on {:?}", address), + SwarmEvent::NewListenAddr { address, .. } => { + println!("Listening on {:?}", address) + }, SwarmEvent::Behaviour(event) => println!("{:?}", event), _ => {}, } diff --git a/packages/core/src/prisma.rs b/packages/core/src/prisma.rs index d1d50cf30..3899ffa89 100644 --- a/packages/core/src/prisma.rs +++ b/packages/core/src/prisma.rs @@ -2,6 +2,7 @@ use prisma_client_rust::datamodel::parse_configuration; use prisma_client_rust::prisma_models::InternalDataModelBuilder; +pub use prisma_client_rust::query::Error as QueryError; use prisma_client_rust::query::{ transform_equals, Field, Input, Output, Query, QueryContext, Result as QueryResult, }; @@ -219,16 +220,16 @@ impl MigrationIdField { MigrationCursor::Id(cursor) } pub fn increment(&self, value: i32) -> MigrationSetParam { - MigrationSetParam::Id(value) + MigrationSetParam::SetId(value) } pub fn decrement(&self, value: i32) -> MigrationSetParam { - MigrationSetParam::Id(value) + MigrationSetParam::SetId(value) } pub fn multiply(&self, value: i32) -> MigrationSetParam { - MigrationSetParam::Id(value) + MigrationSetParam::SetId(value) } pub fn divide(&self, value: i32) -> MigrationSetParam { - MigrationSetParam::Id(value) + MigrationSetParam::SetId(value) } pub fn in_vec(&self, value: Vec) -> MigrationWhereParam { MigrationWhereParam::IdInVec(value) @@ -251,18 +252,6 @@ impl MigrationIdField { pub fn not(&self, value: i32) -> MigrationWhereParam { MigrationWhereParam::IdNot(value) } - pub fn lt(&self, value: i32) -> MigrationWhereParam { - MigrationWhereParam::IdLt(value) - } - pub fn lte(&self, value: i32) -> MigrationWhereParam { - MigrationWhereParam::IdLte(value) - } - pub fn gt(&self, value: i32) -> MigrationWhereParam { - MigrationWhereParam::IdGt(value) - } - pub fn gte(&self, value: i32) -> MigrationWhereParam { - MigrationWhereParam::IdGte(value) - } } pub struct MigrationSetId(i32); impl From for MigrationSetParam { @@ -314,12 +303,6 @@ impl MigrationNameField { pub fn not(&self, value: String) -> MigrationWhereParam { MigrationWhereParam::NameNot(value) } - pub fn has_prefix(&self, value: String) -> MigrationWhereParam { - MigrationWhereParam::NameHasPrefix(value) - } - pub fn has_suffix(&self, value: String) -> MigrationWhereParam { - MigrationWhereParam::NameHasSuffix(value) - } } pub struct MigrationSetName(String); impl From for MigrationSetParam { @@ -371,12 +354,6 @@ impl MigrationChecksumField { pub fn not(&self, value: String) -> MigrationWhereParam { MigrationWhereParam::ChecksumNot(value) } - pub fn has_prefix(&self, value: String) -> MigrationWhereParam { - MigrationWhereParam::ChecksumHasPrefix(value) - } - pub fn has_suffix(&self, value: String) -> MigrationWhereParam { - MigrationWhereParam::ChecksumHasSuffix(value) - } } pub struct MigrationSetChecksum(String); impl From for MigrationSetParam { @@ -399,16 +376,16 @@ impl MigrationStepsAppliedField { MigrationCursor::StepsApplied(cursor) } pub fn increment(&self, value: i32) -> MigrationSetParam { - MigrationSetParam::StepsApplied(value) + MigrationSetParam::SetStepsApplied(value) } pub fn decrement(&self, value: i32) -> MigrationSetParam { - MigrationSetParam::StepsApplied(value) + MigrationSetParam::SetStepsApplied(value) } pub fn multiply(&self, value: i32) -> MigrationSetParam { - MigrationSetParam::StepsApplied(value) + MigrationSetParam::SetStepsApplied(value) } pub fn divide(&self, value: i32) -> MigrationSetParam { - MigrationSetParam::StepsApplied(value) + MigrationSetParam::SetStepsApplied(value) } pub fn in_vec(&self, value: Vec) -> MigrationWhereParam { MigrationWhereParam::StepsAppliedInVec(value) @@ -431,18 +408,6 @@ impl MigrationStepsAppliedField { pub fn not(&self, value: i32) -> MigrationWhereParam { MigrationWhereParam::StepsAppliedNot(value) } - pub fn lt(&self, value: i32) -> MigrationWhereParam { - MigrationWhereParam::StepsAppliedLt(value) - } - pub fn lte(&self, value: i32) -> MigrationWhereParam { - MigrationWhereParam::StepsAppliedLte(value) - } - pub fn gt(&self, value: i32) -> MigrationWhereParam { - MigrationWhereParam::StepsAppliedGt(value) - } - pub fn gte(&self, value: i32) -> MigrationWhereParam { - MigrationWhereParam::StepsAppliedGte(value) - } } pub struct MigrationSetStepsApplied(i32); impl From for MigrationSetParam { @@ -494,24 +459,6 @@ impl MigrationAppliedAtField { pub fn not(&self, value: chrono::DateTime) -> MigrationWhereParam { MigrationWhereParam::AppliedAtNot(value) } - pub fn before(&self, value: chrono::DateTime) -> MigrationWhereParam { - MigrationWhereParam::AppliedAtBefore(value) - } - pub fn after(&self, value: chrono::DateTime) -> MigrationWhereParam { - MigrationWhereParam::AppliedAtAfter(value) - } - pub fn before_equals( - &self, - value: chrono::DateTime, - ) -> MigrationWhereParam { - MigrationWhereParam::AppliedAtBeforeEquals(value) - } - pub fn after_equals( - &self, - value: chrono::DateTime, - ) -> MigrationWhereParam { - MigrationWhereParam::AppliedAtAfterEquals(value) - } } pub struct MigrationSetAppliedAt(chrono::DateTime); impl From for MigrationSetParam { @@ -651,10 +598,6 @@ pub enum MigrationWhereParam { IdGt(i32), IdGte(i32), IdNot(i32), - IdLt(i32), - IdLte(i32), - IdGt(i32), - IdGte(i32), NameEquals(String), NameInVec(Vec), NameNotInVec(Vec), @@ -666,8 +609,6 @@ pub enum MigrationWhereParam { NameStartsWith(String), NameEndsWith(String), NameNot(String), - NameHasPrefix(String), - NameHasSuffix(String), ChecksumEquals(String), ChecksumInVec(Vec), ChecksumNotInVec(Vec), @@ -679,8 +620,6 @@ pub enum MigrationWhereParam { ChecksumStartsWith(String), ChecksumEndsWith(String), ChecksumNot(String), - ChecksumHasPrefix(String), - ChecksumHasSuffix(String), StepsAppliedEquals(i32), StepsAppliedInVec(Vec), StepsAppliedNotInVec(Vec), @@ -689,10 +628,6 @@ pub enum MigrationWhereParam { StepsAppliedGt(i32), StepsAppliedGte(i32), StepsAppliedNot(i32), - StepsAppliedLt(i32), - StepsAppliedLte(i32), - StepsAppliedGt(i32), - StepsAppliedGte(i32), AppliedAtEquals(chrono::DateTime), AppliedAtInVec(Vec>), AppliedAtNotInVec(Vec>), @@ -701,10 +636,6 @@ pub enum MigrationWhereParam { AppliedAtGt(chrono::DateTime), AppliedAtGte(chrono::DateTime), AppliedAtNot(chrono::DateTime), - AppliedAtBefore(chrono::DateTime), - AppliedAtAfter(chrono::DateTime), - AppliedAtBeforeEquals(chrono::DateTime), - AppliedAtAfterEquals(chrono::DateTime), } impl MigrationWhereParam { pub fn to_field(&self) -> Field { @@ -820,42 +751,6 @@ impl MigrationWhereParam { }]), ..Default::default() }, - Self::IdLt(value) => Field { - name: "id".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::IdLte(value) => Field { - name: "id".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::IdGt(value) => Field { - name: "id".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::IdGte(value) => Field { - name: "id".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::NameEquals(value) => Field { name: "name".into(), fields: Some(vec![Field { @@ -973,24 +868,6 @@ impl MigrationWhereParam { }]), ..Default::default() }, - Self::NameHasPrefix(value) => Field { - name: "name".into(), - fields: Some(vec![Field { - name: "starts_with".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::NameHasSuffix(value) => Field { - name: "name".into(), - fields: Some(vec![Field { - name: "ends_with".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::ChecksumEquals(value) => Field { name: "checksum".into(), fields: Some(vec![Field { @@ -1108,24 +985,6 @@ impl MigrationWhereParam { }]), ..Default::default() }, - Self::ChecksumHasPrefix(value) => Field { - name: "checksum".into(), - fields: Some(vec![Field { - name: "starts_with".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::ChecksumHasSuffix(value) => Field { - name: "checksum".into(), - fields: Some(vec![Field { - name: "ends_with".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::StepsAppliedEquals(value) => Field { name: "steps_applied".into(), fields: Some(vec![Field { @@ -1216,42 +1075,6 @@ impl MigrationWhereParam { }]), ..Default::default() }, - Self::StepsAppliedLt(value) => Field { - name: "steps_applied".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::StepsAppliedLte(value) => Field { - name: "steps_applied".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::StepsAppliedGt(value) => Field { - name: "steps_applied".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::StepsAppliedGte(value) => Field { - name: "steps_applied".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::AppliedAtEquals(value) => Field { name: "applied_at".into(), fields: Some(vec![Field { @@ -1342,42 +1165,6 @@ impl MigrationWhereParam { }]), ..Default::default() }, - Self::AppliedAtBefore(value) => Field { - name: "applied_at".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::AppliedAtAfter(value) => Field { - name: "applied_at".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::AppliedAtBeforeEquals(value) => Field { - name: "applied_at".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::AppliedAtAfterEquals(value) => Field { - name: "applied_at".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, } } } @@ -1510,7 +1297,7 @@ pub struct MigrationFindFirst<'a> { with_params: Vec, } impl<'a> MigrationFindFirst<'a> { - pub async fn exec(self) -> QueryResult { + pub async fn exec(self) -> QueryResult> { let Self { mut query, order_by_params, @@ -1569,7 +1356,7 @@ pub struct MigrationFindUnique<'a> { with_params: Vec, } impl<'a> MigrationFindUnique<'a> { - pub async fn exec(self) -> QueryResult { + pub async fn exec(self) -> QueryResult> { let Self { mut query, with_params, @@ -1699,7 +1486,7 @@ impl<'a> MigrationUpsertOne<'a> { }); self } - pub fn update(mut self, params: Vec) -> Self { + pub fn update(mut self, params: Vec) -> Self { self.query.inputs.push(Input { name: "update".into(), fields: params @@ -1960,16 +1747,16 @@ impl LibraryIdField { LibraryCursor::Id(cursor) } pub fn increment(&self, value: i32) -> LibrarySetParam { - LibrarySetParam::Id(value) + LibrarySetParam::SetId(value) } pub fn decrement(&self, value: i32) -> LibrarySetParam { - LibrarySetParam::Id(value) + LibrarySetParam::SetId(value) } pub fn multiply(&self, value: i32) -> LibrarySetParam { - LibrarySetParam::Id(value) + LibrarySetParam::SetId(value) } pub fn divide(&self, value: i32) -> LibrarySetParam { - LibrarySetParam::Id(value) + LibrarySetParam::SetId(value) } pub fn in_vec(&self, value: Vec) -> LibraryWhereParam { LibraryWhereParam::IdInVec(value) @@ -1992,18 +1779,6 @@ impl LibraryIdField { pub fn not(&self, value: i32) -> LibraryWhereParam { LibraryWhereParam::IdNot(value) } - pub fn lt(&self, value: i32) -> LibraryWhereParam { - LibraryWhereParam::IdLt(value) - } - pub fn lte(&self, value: i32) -> LibraryWhereParam { - LibraryWhereParam::IdLte(value) - } - pub fn gt(&self, value: i32) -> LibraryWhereParam { - LibraryWhereParam::IdGt(value) - } - pub fn gte(&self, value: i32) -> LibraryWhereParam { - LibraryWhereParam::IdGte(value) - } } pub struct LibrarySetId(i32); impl From for LibrarySetParam { @@ -2055,12 +1830,6 @@ impl LibraryUuidField { pub fn not(&self, value: String) -> LibraryWhereParam { LibraryWhereParam::UuidNot(value) } - pub fn has_prefix(&self, value: String) -> LibraryWhereParam { - LibraryWhereParam::UuidHasPrefix(value) - } - pub fn has_suffix(&self, value: String) -> LibraryWhereParam { - LibraryWhereParam::UuidHasSuffix(value) - } } pub struct LibrarySetUuid(String); impl From for LibrarySetParam { @@ -2112,12 +1881,6 @@ impl LibraryNameField { pub fn not(&self, value: String) -> LibraryWhereParam { LibraryWhereParam::NameNot(value) } - pub fn has_prefix(&self, value: String) -> LibraryWhereParam { - LibraryWhereParam::NameHasPrefix(value) - } - pub fn has_suffix(&self, value: String) -> LibraryWhereParam { - LibraryWhereParam::NameHasSuffix(value) - } } pub struct LibrarySetName(String); impl From for LibrarySetParam { @@ -2169,12 +1932,6 @@ impl LibraryRemoteIdField { pub fn not(&self, value: String) -> LibraryWhereParam { LibraryWhereParam::RemoteIdNot(value) } - pub fn has_prefix(&self, value: String) -> LibraryWhereParam { - LibraryWhereParam::RemoteIdHasPrefix(value) - } - pub fn has_suffix(&self, value: String) -> LibraryWhereParam { - LibraryWhereParam::RemoteIdHasSuffix(value) - } } pub struct LibrarySetRemoteId(String); impl From for LibrarySetParam { @@ -2218,16 +1975,16 @@ impl LibraryEncryptionField { LibraryCursor::Encryption(cursor) } pub fn increment(&self, value: i32) -> LibrarySetParam { - LibrarySetParam::Encryption(value) + LibrarySetParam::SetEncryption(value) } pub fn decrement(&self, value: i32) -> LibrarySetParam { - LibrarySetParam::Encryption(value) + LibrarySetParam::SetEncryption(value) } pub fn multiply(&self, value: i32) -> LibrarySetParam { - LibrarySetParam::Encryption(value) + LibrarySetParam::SetEncryption(value) } pub fn divide(&self, value: i32) -> LibrarySetParam { - LibrarySetParam::Encryption(value) + LibrarySetParam::SetEncryption(value) } pub fn in_vec(&self, value: Vec) -> LibraryWhereParam { LibraryWhereParam::EncryptionInVec(value) @@ -2250,18 +2007,6 @@ impl LibraryEncryptionField { pub fn not(&self, value: i32) -> LibraryWhereParam { LibraryWhereParam::EncryptionNot(value) } - pub fn lt(&self, value: i32) -> LibraryWhereParam { - LibraryWhereParam::EncryptionLt(value) - } - pub fn lte(&self, value: i32) -> LibraryWhereParam { - LibraryWhereParam::EncryptionLte(value) - } - pub fn gt(&self, value: i32) -> LibraryWhereParam { - LibraryWhereParam::EncryptionGt(value) - } - pub fn gte(&self, value: i32) -> LibraryWhereParam { - LibraryWhereParam::EncryptionGte(value) - } } pub struct LibrarySetEncryption(i32); impl From for LibrarySetParam { @@ -2310,24 +2055,6 @@ impl LibraryDateCreatedField { pub fn not(&self, value: chrono::DateTime) -> LibraryWhereParam { LibraryWhereParam::DateCreatedNot(value) } - pub fn before(&self, value: chrono::DateTime) -> LibraryWhereParam { - LibraryWhereParam::DateCreatedBefore(value) - } - pub fn after(&self, value: chrono::DateTime) -> LibraryWhereParam { - LibraryWhereParam::DateCreatedAfter(value) - } - pub fn before_equals( - &self, - value: chrono::DateTime, - ) -> LibraryWhereParam { - LibraryWhereParam::DateCreatedBeforeEquals(value) - } - pub fn after_equals( - &self, - value: chrono::DateTime, - ) -> LibraryWhereParam { - LibraryWhereParam::DateCreatedAfterEquals(value) - } } pub struct LibrarySetDateCreated(chrono::DateTime); impl From for LibrarySetParam { @@ -2379,12 +2106,6 @@ impl LibraryTimezoneField { pub fn not(&self, value: String) -> LibraryWhereParam { LibraryWhereParam::TimezoneNot(value) } - pub fn has_prefix(&self, value: String) -> LibraryWhereParam { - LibraryWhereParam::TimezoneHasPrefix(value) - } - pub fn has_suffix(&self, value: String) -> LibraryWhereParam { - LibraryWhereParam::TimezoneHasSuffix(value) - } } pub struct LibrarySetTimezone(String); impl From for LibrarySetParam { @@ -2659,10 +2380,6 @@ pub enum LibraryWhereParam { IdGt(i32), IdGte(i32), IdNot(i32), - IdLt(i32), - IdLte(i32), - IdGt(i32), - IdGte(i32), UuidEquals(String), UuidInVec(Vec), UuidNotInVec(Vec), @@ -2674,8 +2391,6 @@ pub enum LibraryWhereParam { UuidStartsWith(String), UuidEndsWith(String), UuidNot(String), - UuidHasPrefix(String), - UuidHasSuffix(String), NameEquals(String), NameInVec(Vec), NameNotInVec(Vec), @@ -2687,8 +2402,6 @@ pub enum LibraryWhereParam { NameStartsWith(String), NameEndsWith(String), NameNot(String), - NameHasPrefix(String), - NameHasSuffix(String), RemoteIdEquals(String), RemoteIdInVec(Vec), RemoteIdNotInVec(Vec), @@ -2700,8 +2413,6 @@ pub enum LibraryWhereParam { RemoteIdStartsWith(String), RemoteIdEndsWith(String), RemoteIdNot(String), - RemoteIdHasPrefix(String), - RemoteIdHasSuffix(String), IsPrimaryEquals(bool), EncryptionEquals(i32), EncryptionInVec(Vec), @@ -2711,10 +2422,6 @@ pub enum LibraryWhereParam { EncryptionGt(i32), EncryptionGte(i32), EncryptionNot(i32), - EncryptionLt(i32), - EncryptionLte(i32), - EncryptionGt(i32), - EncryptionGte(i32), DateCreatedEquals(chrono::DateTime), DateCreatedInVec(Vec>), DateCreatedNotInVec(Vec>), @@ -2723,10 +2430,6 @@ pub enum LibraryWhereParam { DateCreatedGt(chrono::DateTime), DateCreatedGte(chrono::DateTime), DateCreatedNot(chrono::DateTime), - DateCreatedBefore(chrono::DateTime), - DateCreatedAfter(chrono::DateTime), - DateCreatedBeforeEquals(chrono::DateTime), - DateCreatedAfterEquals(chrono::DateTime), TimezoneEquals(String), TimezoneInVec(Vec), TimezoneNotInVec(Vec), @@ -2738,8 +2441,6 @@ pub enum LibraryWhereParam { TimezoneStartsWith(String), TimezoneEndsWith(String), TimezoneNot(String), - TimezoneHasPrefix(String), - TimezoneHasSuffix(String), SpacesSome(Vec), SpacesEvery(Vec), } @@ -2857,42 +2558,6 @@ impl LibraryWhereParam { }]), ..Default::default() }, - Self::IdLt(value) => Field { - name: "id".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::IdLte(value) => Field { - name: "id".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::IdGt(value) => Field { - name: "id".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::IdGte(value) => Field { - name: "id".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::UuidEquals(value) => Field { name: "uuid".into(), fields: Some(vec![Field { @@ -3010,24 +2675,6 @@ impl LibraryWhereParam { }]), ..Default::default() }, - Self::UuidHasPrefix(value) => Field { - name: "uuid".into(), - fields: Some(vec![Field { - name: "starts_with".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::UuidHasSuffix(value) => Field { - name: "uuid".into(), - fields: Some(vec![Field { - name: "ends_with".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::NameEquals(value) => Field { name: "name".into(), fields: Some(vec![Field { @@ -3145,24 +2792,6 @@ impl LibraryWhereParam { }]), ..Default::default() }, - Self::NameHasPrefix(value) => Field { - name: "name".into(), - fields: Some(vec![Field { - name: "starts_with".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::NameHasSuffix(value) => Field { - name: "name".into(), - fields: Some(vec![Field { - name: "ends_with".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::RemoteIdEquals(value) => Field { name: "remote_id".into(), fields: Some(vec![Field { @@ -3280,24 +2909,6 @@ impl LibraryWhereParam { }]), ..Default::default() }, - Self::RemoteIdHasPrefix(value) => Field { - name: "remote_id".into(), - fields: Some(vec![Field { - name: "starts_with".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::RemoteIdHasSuffix(value) => Field { - name: "remote_id".into(), - fields: Some(vec![Field { - name: "ends_with".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::IsPrimaryEquals(value) => Field { name: "is_primary".into(), fields: Some(vec![Field { @@ -3397,42 +3008,6 @@ impl LibraryWhereParam { }]), ..Default::default() }, - Self::EncryptionLt(value) => Field { - name: "encryption".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::EncryptionLte(value) => Field { - name: "encryption".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::EncryptionGt(value) => Field { - name: "encryption".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::EncryptionGte(value) => Field { - name: "encryption".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::DateCreatedEquals(value) => Field { name: "date_created".into(), fields: Some(vec![Field { @@ -3523,42 +3098,6 @@ impl LibraryWhereParam { }]), ..Default::default() }, - Self::DateCreatedBefore(value) => Field { - name: "date_created".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateCreatedAfter(value) => Field { - name: "date_created".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateCreatedBeforeEquals(value) => Field { - name: "date_created".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateCreatedAfterEquals(value) => Field { - name: "date_created".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::TimezoneEquals(value) => Field { name: "timezone".into(), fields: Some(vec![Field { @@ -3676,24 +3215,6 @@ impl LibraryWhereParam { }]), ..Default::default() }, - Self::TimezoneHasPrefix(value) => Field { - name: "timezone".into(), - fields: Some(vec![Field { - name: "starts_with".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::TimezoneHasSuffix(value) => Field { - name: "timezone".into(), - fields: Some(vec![Field { - name: "ends_with".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::SpacesSome(value) => Field { name: "spaces".into(), fields: Some(vec![Field { @@ -3842,7 +3363,7 @@ pub struct LibraryFindFirst<'a> { with_params: Vec, } impl<'a> LibraryFindFirst<'a> { - pub async fn exec(self) -> QueryResult { + pub async fn exec(self) -> QueryResult> { let Self { mut query, order_by_params, @@ -3901,7 +3422,7 @@ pub struct LibraryFindUnique<'a> { with_params: Vec, } impl<'a> LibraryFindUnique<'a> { - pub async fn exec(self) -> QueryResult { + pub async fn exec(self) -> QueryResult> { let Self { mut query, with_params, @@ -4031,7 +3552,7 @@ impl<'a> LibraryUpsertOne<'a> { }); self } - pub fn update(mut self, params: Vec) -> Self { + pub fn update(mut self, params: Vec) -> Self { self.query.inputs.push(Input { name: "update".into(), fields: params @@ -4277,16 +3798,16 @@ impl LibraryStatisticsIdField { LibraryStatisticsCursor::Id(cursor) } pub fn increment(&self, value: i32) -> LibraryStatisticsSetParam { - LibraryStatisticsSetParam::Id(value) + LibraryStatisticsSetParam::SetId(value) } pub fn decrement(&self, value: i32) -> LibraryStatisticsSetParam { - LibraryStatisticsSetParam::Id(value) + LibraryStatisticsSetParam::SetId(value) } pub fn multiply(&self, value: i32) -> LibraryStatisticsSetParam { - LibraryStatisticsSetParam::Id(value) + LibraryStatisticsSetParam::SetId(value) } pub fn divide(&self, value: i32) -> LibraryStatisticsSetParam { - LibraryStatisticsSetParam::Id(value) + LibraryStatisticsSetParam::SetId(value) } pub fn in_vec(&self, value: Vec) -> LibraryStatisticsWhereParam { LibraryStatisticsWhereParam::IdInVec(value) @@ -4309,18 +3830,6 @@ impl LibraryStatisticsIdField { pub fn not(&self, value: i32) -> LibraryStatisticsWhereParam { LibraryStatisticsWhereParam::IdNot(value) } - pub fn lt(&self, value: i32) -> LibraryStatisticsWhereParam { - LibraryStatisticsWhereParam::IdLt(value) - } - pub fn lte(&self, value: i32) -> LibraryStatisticsWhereParam { - LibraryStatisticsWhereParam::IdLte(value) - } - pub fn gt(&self, value: i32) -> LibraryStatisticsWhereParam { - LibraryStatisticsWhereParam::IdGt(value) - } - pub fn gte(&self, value: i32) -> LibraryStatisticsWhereParam { - LibraryStatisticsWhereParam::IdGte(value) - } } pub struct LibraryStatisticsSetId(i32); impl From for LibraryStatisticsSetParam { @@ -4393,30 +3902,6 @@ impl LibraryStatisticsDateCapturedField { ) -> LibraryStatisticsWhereParam { LibraryStatisticsWhereParam::DateCapturedNot(value) } - pub fn before( - &self, - value: chrono::DateTime, - ) -> LibraryStatisticsWhereParam { - LibraryStatisticsWhereParam::DateCapturedBefore(value) - } - pub fn after( - &self, - value: chrono::DateTime, - ) -> LibraryStatisticsWhereParam { - LibraryStatisticsWhereParam::DateCapturedAfter(value) - } - pub fn before_equals( - &self, - value: chrono::DateTime, - ) -> LibraryStatisticsWhereParam { - LibraryStatisticsWhereParam::DateCapturedBeforeEquals(value) - } - pub fn after_equals( - &self, - value: chrono::DateTime, - ) -> LibraryStatisticsWhereParam { - LibraryStatisticsWhereParam::DateCapturedAfterEquals(value) - } } pub struct LibraryStatisticsSetDateCaptured(chrono::DateTime); impl From for LibraryStatisticsSetParam { @@ -4439,16 +3924,16 @@ impl LibraryStatisticsLibraryIdField { LibraryStatisticsCursor::LibraryId(cursor) } pub fn increment(&self, value: i32) -> LibraryStatisticsSetParam { - LibraryStatisticsSetParam::LibraryId(value) + LibraryStatisticsSetParam::SetLibraryId(value) } pub fn decrement(&self, value: i32) -> LibraryStatisticsSetParam { - LibraryStatisticsSetParam::LibraryId(value) + LibraryStatisticsSetParam::SetLibraryId(value) } pub fn multiply(&self, value: i32) -> LibraryStatisticsSetParam { - LibraryStatisticsSetParam::LibraryId(value) + LibraryStatisticsSetParam::SetLibraryId(value) } pub fn divide(&self, value: i32) -> LibraryStatisticsSetParam { - LibraryStatisticsSetParam::LibraryId(value) + LibraryStatisticsSetParam::SetLibraryId(value) } pub fn in_vec(&self, value: Vec) -> LibraryStatisticsWhereParam { LibraryStatisticsWhereParam::LibraryIdInVec(value) @@ -4471,18 +3956,6 @@ impl LibraryStatisticsLibraryIdField { pub fn not(&self, value: i32) -> LibraryStatisticsWhereParam { LibraryStatisticsWhereParam::LibraryIdNot(value) } - pub fn lt(&self, value: i32) -> LibraryStatisticsWhereParam { - LibraryStatisticsWhereParam::LibraryIdLt(value) - } - pub fn lte(&self, value: i32) -> LibraryStatisticsWhereParam { - LibraryStatisticsWhereParam::LibraryIdLte(value) - } - pub fn gt(&self, value: i32) -> LibraryStatisticsWhereParam { - LibraryStatisticsWhereParam::LibraryIdGt(value) - } - pub fn gte(&self, value: i32) -> LibraryStatisticsWhereParam { - LibraryStatisticsWhereParam::LibraryIdGte(value) - } } pub struct LibraryStatisticsSetLibraryId(i32); impl From for LibraryStatisticsSetParam { @@ -4505,16 +3978,16 @@ impl LibraryStatisticsTotalFileCountField { LibraryStatisticsCursor::TotalFileCount(cursor) } pub fn increment(&self, value: i32) -> LibraryStatisticsSetParam { - LibraryStatisticsSetParam::TotalFileCount(value) + LibraryStatisticsSetParam::SetTotalFileCount(value) } pub fn decrement(&self, value: i32) -> LibraryStatisticsSetParam { - LibraryStatisticsSetParam::TotalFileCount(value) + LibraryStatisticsSetParam::SetTotalFileCount(value) } pub fn multiply(&self, value: i32) -> LibraryStatisticsSetParam { - LibraryStatisticsSetParam::TotalFileCount(value) + LibraryStatisticsSetParam::SetTotalFileCount(value) } pub fn divide(&self, value: i32) -> LibraryStatisticsSetParam { - LibraryStatisticsSetParam::TotalFileCount(value) + LibraryStatisticsSetParam::SetTotalFileCount(value) } pub fn in_vec(&self, value: Vec) -> LibraryStatisticsWhereParam { LibraryStatisticsWhereParam::TotalFileCountInVec(value) @@ -4537,18 +4010,6 @@ impl LibraryStatisticsTotalFileCountField { pub fn not(&self, value: i32) -> LibraryStatisticsWhereParam { LibraryStatisticsWhereParam::TotalFileCountNot(value) } - pub fn lt(&self, value: i32) -> LibraryStatisticsWhereParam { - LibraryStatisticsWhereParam::TotalFileCountLt(value) - } - pub fn lte(&self, value: i32) -> LibraryStatisticsWhereParam { - LibraryStatisticsWhereParam::TotalFileCountLte(value) - } - pub fn gt(&self, value: i32) -> LibraryStatisticsWhereParam { - LibraryStatisticsWhereParam::TotalFileCountGt(value) - } - pub fn gte(&self, value: i32) -> LibraryStatisticsWhereParam { - LibraryStatisticsWhereParam::TotalFileCountGte(value) - } } pub struct LibraryStatisticsSetTotalFileCount(i32); impl From for LibraryStatisticsSetParam { @@ -4600,12 +4061,6 @@ impl LibraryStatisticsTotalBytesUsedField { pub fn not(&self, value: String) -> LibraryStatisticsWhereParam { LibraryStatisticsWhereParam::TotalBytesUsedNot(value) } - pub fn has_prefix(&self, value: String) -> LibraryStatisticsWhereParam { - LibraryStatisticsWhereParam::TotalBytesUsedHasPrefix(value) - } - pub fn has_suffix(&self, value: String) -> LibraryStatisticsWhereParam { - LibraryStatisticsWhereParam::TotalBytesUsedHasSuffix(value) - } } pub struct LibraryStatisticsSetTotalBytesUsed(String); impl From for LibraryStatisticsSetParam { @@ -4660,12 +4115,6 @@ impl LibraryStatisticsTotalByteCapacityField { pub fn not(&self, value: String) -> LibraryStatisticsWhereParam { LibraryStatisticsWhereParam::TotalByteCapacityNot(value) } - pub fn has_prefix(&self, value: String) -> LibraryStatisticsWhereParam { - LibraryStatisticsWhereParam::TotalByteCapacityHasPrefix(value) - } - pub fn has_suffix(&self, value: String) -> LibraryStatisticsWhereParam { - LibraryStatisticsWhereParam::TotalByteCapacityHasSuffix(value) - } } pub struct LibraryStatisticsSetTotalByteCapacity(String); impl From for LibraryStatisticsSetParam { @@ -4717,12 +4166,6 @@ impl LibraryStatisticsTotalUniqueBytesField { pub fn not(&self, value: String) -> LibraryStatisticsWhereParam { LibraryStatisticsWhereParam::TotalUniqueBytesNot(value) } - pub fn has_prefix(&self, value: String) -> LibraryStatisticsWhereParam { - LibraryStatisticsWhereParam::TotalUniqueBytesHasPrefix(value) - } - pub fn has_suffix(&self, value: String) -> LibraryStatisticsWhereParam { - LibraryStatisticsWhereParam::TotalUniqueBytesHasSuffix(value) - } } pub struct LibraryStatisticsSetTotalUniqueBytes(String); impl From for LibraryStatisticsSetParam { @@ -4898,10 +4341,6 @@ pub enum LibraryStatisticsWhereParam { IdGt(i32), IdGte(i32), IdNot(i32), - IdLt(i32), - IdLte(i32), - IdGt(i32), - IdGte(i32), DateCapturedEquals(chrono::DateTime), DateCapturedInVec(Vec>), DateCapturedNotInVec(Vec>), @@ -4910,10 +4349,6 @@ pub enum LibraryStatisticsWhereParam { DateCapturedGt(chrono::DateTime), DateCapturedGte(chrono::DateTime), DateCapturedNot(chrono::DateTime), - DateCapturedBefore(chrono::DateTime), - DateCapturedAfter(chrono::DateTime), - DateCapturedBeforeEquals(chrono::DateTime), - DateCapturedAfterEquals(chrono::DateTime), LibraryIdEquals(i32), LibraryIdInVec(Vec), LibraryIdNotInVec(Vec), @@ -4922,10 +4357,6 @@ pub enum LibraryStatisticsWhereParam { LibraryIdGt(i32), LibraryIdGte(i32), LibraryIdNot(i32), - LibraryIdLt(i32), - LibraryIdLte(i32), - LibraryIdGt(i32), - LibraryIdGte(i32), TotalFileCountEquals(i32), TotalFileCountInVec(Vec), TotalFileCountNotInVec(Vec), @@ -4934,10 +4365,6 @@ pub enum LibraryStatisticsWhereParam { TotalFileCountGt(i32), TotalFileCountGte(i32), TotalFileCountNot(i32), - TotalFileCountLt(i32), - TotalFileCountLte(i32), - TotalFileCountGt(i32), - TotalFileCountGte(i32), TotalBytesUsedEquals(String), TotalBytesUsedInVec(Vec), TotalBytesUsedNotInVec(Vec), @@ -4949,8 +4376,6 @@ pub enum LibraryStatisticsWhereParam { TotalBytesUsedStartsWith(String), TotalBytesUsedEndsWith(String), TotalBytesUsedNot(String), - TotalBytesUsedHasPrefix(String), - TotalBytesUsedHasSuffix(String), TotalByteCapacityEquals(String), TotalByteCapacityInVec(Vec), TotalByteCapacityNotInVec(Vec), @@ -4962,8 +4387,6 @@ pub enum LibraryStatisticsWhereParam { TotalByteCapacityStartsWith(String), TotalByteCapacityEndsWith(String), TotalByteCapacityNot(String), - TotalByteCapacityHasPrefix(String), - TotalByteCapacityHasSuffix(String), TotalUniqueBytesEquals(String), TotalUniqueBytesInVec(Vec), TotalUniqueBytesNotInVec(Vec), @@ -4975,8 +4398,6 @@ pub enum LibraryStatisticsWhereParam { TotalUniqueBytesStartsWith(String), TotalUniqueBytesEndsWith(String), TotalUniqueBytesNot(String), - TotalUniqueBytesHasPrefix(String), - TotalUniqueBytesHasSuffix(String), } impl LibraryStatisticsWhereParam { pub fn to_field(&self) -> Field { @@ -5092,42 +4513,6 @@ impl LibraryStatisticsWhereParam { }]), ..Default::default() }, - Self::IdLt(value) => Field { - name: "id".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::IdLte(value) => Field { - name: "id".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::IdGt(value) => Field { - name: "id".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::IdGte(value) => Field { - name: "id".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::DateCapturedEquals(value) => Field { name: "date_captured".into(), fields: Some(vec![Field { @@ -5218,42 +4603,6 @@ impl LibraryStatisticsWhereParam { }]), ..Default::default() }, - Self::DateCapturedBefore(value) => Field { - name: "date_captured".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateCapturedAfter(value) => Field { - name: "date_captured".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateCapturedBeforeEquals(value) => Field { - name: "date_captured".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateCapturedAfterEquals(value) => Field { - name: "date_captured".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::LibraryIdEquals(value) => Field { name: "library_id".into(), fields: Some(vec![Field { @@ -5344,42 +4693,6 @@ impl LibraryStatisticsWhereParam { }]), ..Default::default() }, - Self::LibraryIdLt(value) => Field { - name: "library_id".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::LibraryIdLte(value) => Field { - name: "library_id".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::LibraryIdGt(value) => Field { - name: "library_id".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::LibraryIdGte(value) => Field { - name: "library_id".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::TotalFileCountEquals(value) => Field { name: "total_file_count".into(), fields: Some(vec![Field { @@ -5470,42 +4783,6 @@ impl LibraryStatisticsWhereParam { }]), ..Default::default() }, - Self::TotalFileCountLt(value) => Field { - name: "total_file_count".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::TotalFileCountLte(value) => Field { - name: "total_file_count".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::TotalFileCountGt(value) => Field { - name: "total_file_count".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::TotalFileCountGte(value) => Field { - name: "total_file_count".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::TotalBytesUsedEquals(value) => Field { name: "total_bytes_used".into(), fields: Some(vec![Field { @@ -5623,24 +4900,6 @@ impl LibraryStatisticsWhereParam { }]), ..Default::default() }, - Self::TotalBytesUsedHasPrefix(value) => Field { - name: "total_bytes_used".into(), - fields: Some(vec![Field { - name: "starts_with".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::TotalBytesUsedHasSuffix(value) => Field { - name: "total_bytes_used".into(), - fields: Some(vec![Field { - name: "ends_with".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::TotalByteCapacityEquals(value) => Field { name: "total_byte_capacity".into(), fields: Some(vec![Field { @@ -5758,24 +5017,6 @@ impl LibraryStatisticsWhereParam { }]), ..Default::default() }, - Self::TotalByteCapacityHasPrefix(value) => Field { - name: "total_byte_capacity".into(), - fields: Some(vec![Field { - name: "starts_with".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::TotalByteCapacityHasSuffix(value) => Field { - name: "total_byte_capacity".into(), - fields: Some(vec![Field { - name: "ends_with".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::TotalUniqueBytesEquals(value) => Field { name: "total_unique_bytes".into(), fields: Some(vec![Field { @@ -5893,24 +5134,6 @@ impl LibraryStatisticsWhereParam { }]), ..Default::default() }, - Self::TotalUniqueBytesHasPrefix(value) => Field { - name: "total_unique_bytes".into(), - fields: Some(vec![Field { - name: "starts_with".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::TotalUniqueBytesHasSuffix(value) => Field { - name: "total_unique_bytes".into(), - fields: Some(vec![Field { - name: "ends_with".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, } } } @@ -6046,7 +5269,7 @@ pub struct LibraryStatisticsFindFirst<'a> { with_params: Vec, } impl<'a> LibraryStatisticsFindFirst<'a> { - pub async fn exec(self) -> QueryResult { + pub async fn exec(self) -> QueryResult> { let Self { mut query, order_by_params, @@ -6105,7 +5328,7 @@ pub struct LibraryStatisticsFindUnique<'a> { with_params: Vec, } impl<'a> LibraryStatisticsFindUnique<'a> { - pub async fn exec(self) -> QueryResult { + pub async fn exec(self) -> QueryResult> { let Self { mut query, with_params, @@ -6236,7 +5459,7 @@ impl<'a> LibraryStatisticsUpsertOne<'a> { }); self } - pub fn update(mut self, params: Vec) -> Self { + pub fn update(mut self, params: Vec) -> Self { self.query.inputs.push(Input { name: "update".into(), fields: params @@ -6504,16 +5727,16 @@ impl ClientIdField { ClientCursor::Id(cursor) } pub fn increment(&self, value: i32) -> ClientSetParam { - ClientSetParam::Id(value) + ClientSetParam::SetId(value) } pub fn decrement(&self, value: i32) -> ClientSetParam { - ClientSetParam::Id(value) + ClientSetParam::SetId(value) } pub fn multiply(&self, value: i32) -> ClientSetParam { - ClientSetParam::Id(value) + ClientSetParam::SetId(value) } pub fn divide(&self, value: i32) -> ClientSetParam { - ClientSetParam::Id(value) + ClientSetParam::SetId(value) } pub fn in_vec(&self, value: Vec) -> ClientWhereParam { ClientWhereParam::IdInVec(value) @@ -6536,18 +5759,6 @@ impl ClientIdField { pub fn not(&self, value: i32) -> ClientWhereParam { ClientWhereParam::IdNot(value) } - pub fn lt(&self, value: i32) -> ClientWhereParam { - ClientWhereParam::IdLt(value) - } - pub fn lte(&self, value: i32) -> ClientWhereParam { - ClientWhereParam::IdLte(value) - } - pub fn gt(&self, value: i32) -> ClientWhereParam { - ClientWhereParam::IdGt(value) - } - pub fn gte(&self, value: i32) -> ClientWhereParam { - ClientWhereParam::IdGte(value) - } } pub struct ClientSetId(i32); impl From for ClientSetParam { @@ -6599,12 +5810,6 @@ impl ClientUuidField { pub fn not(&self, value: String) -> ClientWhereParam { ClientWhereParam::UuidNot(value) } - pub fn has_prefix(&self, value: String) -> ClientWhereParam { - ClientWhereParam::UuidHasPrefix(value) - } - pub fn has_suffix(&self, value: String) -> ClientWhereParam { - ClientWhereParam::UuidHasSuffix(value) - } } pub struct ClientSetUuid(String); impl From for ClientSetParam { @@ -6656,12 +5861,6 @@ impl ClientNameField { pub fn not(&self, value: String) -> ClientWhereParam { ClientWhereParam::NameNot(value) } - pub fn has_prefix(&self, value: String) -> ClientWhereParam { - ClientWhereParam::NameHasPrefix(value) - } - pub fn has_suffix(&self, value: String) -> ClientWhereParam { - ClientWhereParam::NameHasSuffix(value) - } } pub struct ClientSetName(String); impl From for ClientSetParam { @@ -6684,16 +5883,16 @@ impl ClientPlatformField { ClientCursor::Platform(cursor) } pub fn increment(&self, value: i32) -> ClientSetParam { - ClientSetParam::Platform(value) + ClientSetParam::SetPlatform(value) } pub fn decrement(&self, value: i32) -> ClientSetParam { - ClientSetParam::Platform(value) + ClientSetParam::SetPlatform(value) } pub fn multiply(&self, value: i32) -> ClientSetParam { - ClientSetParam::Platform(value) + ClientSetParam::SetPlatform(value) } pub fn divide(&self, value: i32) -> ClientSetParam { - ClientSetParam::Platform(value) + ClientSetParam::SetPlatform(value) } pub fn in_vec(&self, value: Vec) -> ClientWhereParam { ClientWhereParam::PlatformInVec(value) @@ -6716,18 +5915,6 @@ impl ClientPlatformField { pub fn not(&self, value: i32) -> ClientWhereParam { ClientWhereParam::PlatformNot(value) } - pub fn lt(&self, value: i32) -> ClientWhereParam { - ClientWhereParam::PlatformLt(value) - } - pub fn lte(&self, value: i32) -> ClientWhereParam { - ClientWhereParam::PlatformLte(value) - } - pub fn gt(&self, value: i32) -> ClientWhereParam { - ClientWhereParam::PlatformGt(value) - } - pub fn gte(&self, value: i32) -> ClientWhereParam { - ClientWhereParam::PlatformGte(value) - } } pub struct ClientSetPlatform(i32); impl From for ClientSetParam { @@ -6779,12 +5966,6 @@ impl ClientVersionField { pub fn not(&self, value: String) -> ClientWhereParam { ClientWhereParam::VersionNot(value) } - pub fn has_prefix(&self, value: String) -> ClientWhereParam { - ClientWhereParam::VersionHasPrefix(value) - } - pub fn has_suffix(&self, value: String) -> ClientWhereParam { - ClientWhereParam::VersionHasSuffix(value) - } } pub struct ClientSetVersion(String); impl From for ClientSetParam { @@ -6854,21 +6035,6 @@ impl ClientLastSeenField { pub fn not(&self, value: chrono::DateTime) -> ClientWhereParam { ClientWhereParam::LastSeenNot(value) } - pub fn before(&self, value: chrono::DateTime) -> ClientWhereParam { - ClientWhereParam::LastSeenBefore(value) - } - pub fn after(&self, value: chrono::DateTime) -> ClientWhereParam { - ClientWhereParam::LastSeenAfter(value) - } - pub fn before_equals( - &self, - value: chrono::DateTime, - ) -> ClientWhereParam { - ClientWhereParam::LastSeenBeforeEquals(value) - } - pub fn after_equals(&self, value: chrono::DateTime) -> ClientWhereParam { - ClientWhereParam::LastSeenAfterEquals(value) - } } pub struct ClientSetLastSeen(chrono::DateTime); impl From for ClientSetParam { @@ -6920,12 +6086,6 @@ impl ClientTimezoneField { pub fn not(&self, value: String) -> ClientWhereParam { ClientWhereParam::TimezoneNot(value) } - pub fn has_prefix(&self, value: String) -> ClientWhereParam { - ClientWhereParam::TimezoneHasPrefix(value) - } - pub fn has_suffix(&self, value: String) -> ClientWhereParam { - ClientWhereParam::TimezoneHasSuffix(value) - } } pub struct ClientSetTimezone(String); impl From for ClientSetParam { @@ -6974,21 +6134,6 @@ impl ClientDateCreatedField { pub fn not(&self, value: chrono::DateTime) -> ClientWhereParam { ClientWhereParam::DateCreatedNot(value) } - pub fn before(&self, value: chrono::DateTime) -> ClientWhereParam { - ClientWhereParam::DateCreatedBefore(value) - } - pub fn after(&self, value: chrono::DateTime) -> ClientWhereParam { - ClientWhereParam::DateCreatedAfter(value) - } - pub fn before_equals( - &self, - value: chrono::DateTime, - ) -> ClientWhereParam { - ClientWhereParam::DateCreatedBeforeEquals(value) - } - pub fn after_equals(&self, value: chrono::DateTime) -> ClientWhereParam { - ClientWhereParam::DateCreatedAfterEquals(value) - } } pub struct ClientSetDateCreated(chrono::DateTime); impl From for ClientSetParam { @@ -7200,10 +6345,6 @@ pub enum ClientWhereParam { IdGt(i32), IdGte(i32), IdNot(i32), - IdLt(i32), - IdLte(i32), - IdGt(i32), - IdGte(i32), UuidEquals(String), UuidInVec(Vec), UuidNotInVec(Vec), @@ -7215,8 +6356,6 @@ pub enum ClientWhereParam { UuidStartsWith(String), UuidEndsWith(String), UuidNot(String), - UuidHasPrefix(String), - UuidHasSuffix(String), NameEquals(String), NameInVec(Vec), NameNotInVec(Vec), @@ -7228,8 +6367,6 @@ pub enum ClientWhereParam { NameStartsWith(String), NameEndsWith(String), NameNot(String), - NameHasPrefix(String), - NameHasSuffix(String), PlatformEquals(i32), PlatformInVec(Vec), PlatformNotInVec(Vec), @@ -7238,10 +6375,6 @@ pub enum ClientWhereParam { PlatformGt(i32), PlatformGte(i32), PlatformNot(i32), - PlatformLt(i32), - PlatformLte(i32), - PlatformGt(i32), - PlatformGte(i32), VersionEquals(String), VersionInVec(Vec), VersionNotInVec(Vec), @@ -7253,8 +6386,6 @@ pub enum ClientWhereParam { VersionStartsWith(String), VersionEndsWith(String), VersionNot(String), - VersionHasPrefix(String), - VersionHasSuffix(String), OnlineEquals(bool), LastSeenEquals(chrono::DateTime), LastSeenInVec(Vec>), @@ -7264,10 +6395,6 @@ pub enum ClientWhereParam { LastSeenGt(chrono::DateTime), LastSeenGte(chrono::DateTime), LastSeenNot(chrono::DateTime), - LastSeenBefore(chrono::DateTime), - LastSeenAfter(chrono::DateTime), - LastSeenBeforeEquals(chrono::DateTime), - LastSeenAfterEquals(chrono::DateTime), TimezoneEquals(String), TimezoneInVec(Vec), TimezoneNotInVec(Vec), @@ -7279,8 +6406,6 @@ pub enum ClientWhereParam { TimezoneStartsWith(String), TimezoneEndsWith(String), TimezoneNot(String), - TimezoneHasPrefix(String), - TimezoneHasSuffix(String), DateCreatedEquals(chrono::DateTime), DateCreatedInVec(Vec>), DateCreatedNotInVec(Vec>), @@ -7289,10 +6414,6 @@ pub enum ClientWhereParam { DateCreatedGt(chrono::DateTime), DateCreatedGte(chrono::DateTime), DateCreatedNot(chrono::DateTime), - DateCreatedBefore(chrono::DateTime), - DateCreatedAfter(chrono::DateTime), - DateCreatedBeforeEquals(chrono::DateTime), - DateCreatedAfterEquals(chrono::DateTime), } impl ClientWhereParam { pub fn to_field(&self) -> Field { @@ -7408,42 +6529,6 @@ impl ClientWhereParam { }]), ..Default::default() }, - Self::IdLt(value) => Field { - name: "id".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::IdLte(value) => Field { - name: "id".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::IdGt(value) => Field { - name: "id".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::IdGte(value) => Field { - name: "id".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::UuidEquals(value) => Field { name: "uuid".into(), fields: Some(vec![Field { @@ -7561,24 +6646,6 @@ impl ClientWhereParam { }]), ..Default::default() }, - Self::UuidHasPrefix(value) => Field { - name: "uuid".into(), - fields: Some(vec![Field { - name: "starts_with".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::UuidHasSuffix(value) => Field { - name: "uuid".into(), - fields: Some(vec![Field { - name: "ends_with".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::NameEquals(value) => Field { name: "name".into(), fields: Some(vec![Field { @@ -7696,24 +6763,6 @@ impl ClientWhereParam { }]), ..Default::default() }, - Self::NameHasPrefix(value) => Field { - name: "name".into(), - fields: Some(vec![Field { - name: "starts_with".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::NameHasSuffix(value) => Field { - name: "name".into(), - fields: Some(vec![Field { - name: "ends_with".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::PlatformEquals(value) => Field { name: "platform".into(), fields: Some(vec![Field { @@ -7804,42 +6853,6 @@ impl ClientWhereParam { }]), ..Default::default() }, - Self::PlatformLt(value) => Field { - name: "platform".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::PlatformLte(value) => Field { - name: "platform".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::PlatformGt(value) => Field { - name: "platform".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::PlatformGte(value) => Field { - name: "platform".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::VersionEquals(value) => Field { name: "version".into(), fields: Some(vec![Field { @@ -7957,24 +6970,6 @@ impl ClientWhereParam { }]), ..Default::default() }, - Self::VersionHasPrefix(value) => Field { - name: "version".into(), - fields: Some(vec![Field { - name: "starts_with".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::VersionHasSuffix(value) => Field { - name: "version".into(), - fields: Some(vec![Field { - name: "ends_with".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::OnlineEquals(value) => Field { name: "online".into(), fields: Some(vec![Field { @@ -8074,42 +7069,6 @@ impl ClientWhereParam { }]), ..Default::default() }, - Self::LastSeenBefore(value) => Field { - name: "last_seen".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::LastSeenAfter(value) => Field { - name: "last_seen".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::LastSeenBeforeEquals(value) => Field { - name: "last_seen".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::LastSeenAfterEquals(value) => Field { - name: "last_seen".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::TimezoneEquals(value) => Field { name: "timezone".into(), fields: Some(vec![Field { @@ -8227,24 +7186,6 @@ impl ClientWhereParam { }]), ..Default::default() }, - Self::TimezoneHasPrefix(value) => Field { - name: "timezone".into(), - fields: Some(vec![Field { - name: "starts_with".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::TimezoneHasSuffix(value) => Field { - name: "timezone".into(), - fields: Some(vec![Field { - name: "ends_with".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::DateCreatedEquals(value) => Field { name: "date_created".into(), fields: Some(vec![Field { @@ -8335,42 +7276,6 @@ impl ClientWhereParam { }]), ..Default::default() }, - Self::DateCreatedBefore(value) => Field { - name: "date_created".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateCreatedAfter(value) => Field { - name: "date_created".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateCreatedBeforeEquals(value) => Field { - name: "date_created".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateCreatedAfterEquals(value) => Field { - name: "date_created".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, } } } @@ -8501,7 +7406,7 @@ pub struct ClientFindFirst<'a> { with_params: Vec, } impl<'a> ClientFindFirst<'a> { - pub async fn exec(self) -> QueryResult { + pub async fn exec(self) -> QueryResult> { let Self { mut query, order_by_params, @@ -8560,7 +7465,7 @@ pub struct ClientFindUnique<'a> { with_params: Vec, } impl<'a> ClientFindUnique<'a> { - pub async fn exec(self) -> QueryResult { + pub async fn exec(self) -> QueryResult> { let Self { mut query, with_params, @@ -8690,7 +7595,7 @@ impl<'a> ClientUpsertOne<'a> { }); self } - pub fn update(mut self, params: Vec) -> Self { + pub fn update(mut self, params: Vec) -> Self { self.query.inputs.push(Input { name: "update".into(), fields: params @@ -8975,16 +7880,16 @@ impl LocationIdField { LocationCursor::Id(cursor) } pub fn increment(&self, value: i32) -> LocationSetParam { - LocationSetParam::Id(value) + LocationSetParam::SetId(value) } pub fn decrement(&self, value: i32) -> LocationSetParam { - LocationSetParam::Id(value) + LocationSetParam::SetId(value) } pub fn multiply(&self, value: i32) -> LocationSetParam { - LocationSetParam::Id(value) + LocationSetParam::SetId(value) } pub fn divide(&self, value: i32) -> LocationSetParam { - LocationSetParam::Id(value) + LocationSetParam::SetId(value) } pub fn in_vec(&self, value: Vec) -> LocationWhereParam { LocationWhereParam::IdInVec(value) @@ -9007,18 +7912,6 @@ impl LocationIdField { pub fn not(&self, value: i32) -> LocationWhereParam { LocationWhereParam::IdNot(value) } - pub fn lt(&self, value: i32) -> LocationWhereParam { - LocationWhereParam::IdLt(value) - } - pub fn lte(&self, value: i32) -> LocationWhereParam { - LocationWhereParam::IdLte(value) - } - pub fn gt(&self, value: i32) -> LocationWhereParam { - LocationWhereParam::IdGt(value) - } - pub fn gte(&self, value: i32) -> LocationWhereParam { - LocationWhereParam::IdGte(value) - } } pub struct LocationSetId(i32); impl From for LocationSetParam { @@ -9070,12 +7963,6 @@ impl LocationNameField { pub fn not(&self, value: String) -> LocationWhereParam { LocationWhereParam::NameNot(value) } - pub fn has_prefix(&self, value: String) -> LocationWhereParam { - LocationWhereParam::NameHasPrefix(value) - } - pub fn has_suffix(&self, value: String) -> LocationWhereParam { - LocationWhereParam::NameHasSuffix(value) - } } pub struct LocationSetName(String); impl From for LocationSetParam { @@ -9127,12 +8014,6 @@ impl LocationLocalPathField { pub fn not(&self, value: String) -> LocationWhereParam { LocationWhereParam::LocalPathNot(value) } - pub fn has_prefix(&self, value: String) -> LocationWhereParam { - LocationWhereParam::LocalPathHasPrefix(value) - } - pub fn has_suffix(&self, value: String) -> LocationWhereParam { - LocationWhereParam::LocalPathHasSuffix(value) - } } pub struct LocationSetLocalPath(String); impl From for LocationSetParam { @@ -9155,16 +8036,16 @@ impl LocationTotalCapacityField { LocationCursor::TotalCapacity(cursor) } pub fn increment(&self, value: i32) -> LocationSetParam { - LocationSetParam::TotalCapacity(value) + LocationSetParam::SetTotalCapacity(value) } pub fn decrement(&self, value: i32) -> LocationSetParam { - LocationSetParam::TotalCapacity(value) + LocationSetParam::SetTotalCapacity(value) } pub fn multiply(&self, value: i32) -> LocationSetParam { - LocationSetParam::TotalCapacity(value) + LocationSetParam::SetTotalCapacity(value) } pub fn divide(&self, value: i32) -> LocationSetParam { - LocationSetParam::TotalCapacity(value) + LocationSetParam::SetTotalCapacity(value) } pub fn in_vec(&self, value: Vec) -> LocationWhereParam { LocationWhereParam::TotalCapacityInVec(value) @@ -9187,18 +8068,6 @@ impl LocationTotalCapacityField { pub fn not(&self, value: i32) -> LocationWhereParam { LocationWhereParam::TotalCapacityNot(value) } - pub fn lt(&self, value: i32) -> LocationWhereParam { - LocationWhereParam::TotalCapacityLt(value) - } - pub fn lte(&self, value: i32) -> LocationWhereParam { - LocationWhereParam::TotalCapacityLte(value) - } - pub fn gt(&self, value: i32) -> LocationWhereParam { - LocationWhereParam::TotalCapacityGt(value) - } - pub fn gte(&self, value: i32) -> LocationWhereParam { - LocationWhereParam::TotalCapacityGte(value) - } } pub struct LocationSetTotalCapacity(i32); impl From for LocationSetParam { @@ -9221,16 +8090,16 @@ impl LocationAvailableCapacityField { LocationCursor::AvailableCapacity(cursor) } pub fn increment(&self, value: i32) -> LocationSetParam { - LocationSetParam::AvailableCapacity(value) + LocationSetParam::SetAvailableCapacity(value) } pub fn decrement(&self, value: i32) -> LocationSetParam { - LocationSetParam::AvailableCapacity(value) + LocationSetParam::SetAvailableCapacity(value) } pub fn multiply(&self, value: i32) -> LocationSetParam { - LocationSetParam::AvailableCapacity(value) + LocationSetParam::SetAvailableCapacity(value) } pub fn divide(&self, value: i32) -> LocationSetParam { - LocationSetParam::AvailableCapacity(value) + LocationSetParam::SetAvailableCapacity(value) } pub fn in_vec(&self, value: Vec) -> LocationWhereParam { LocationWhereParam::AvailableCapacityInVec(value) @@ -9253,18 +8122,6 @@ impl LocationAvailableCapacityField { pub fn not(&self, value: i32) -> LocationWhereParam { LocationWhereParam::AvailableCapacityNot(value) } - pub fn lt(&self, value: i32) -> LocationWhereParam { - LocationWhereParam::AvailableCapacityLt(value) - } - pub fn lte(&self, value: i32) -> LocationWhereParam { - LocationWhereParam::AvailableCapacityLte(value) - } - pub fn gt(&self, value: i32) -> LocationWhereParam { - LocationWhereParam::AvailableCapacityGt(value) - } - pub fn gte(&self, value: i32) -> LocationWhereParam { - LocationWhereParam::AvailableCapacityGte(value) - } } pub struct LocationSetAvailableCapacity(i32); impl From for LocationSetParam { @@ -9316,12 +8173,6 @@ impl LocationFilesystemField { pub fn not(&self, value: String) -> LocationWhereParam { LocationWhereParam::FilesystemNot(value) } - pub fn has_prefix(&self, value: String) -> LocationWhereParam { - LocationWhereParam::FilesystemHasPrefix(value) - } - pub fn has_suffix(&self, value: String) -> LocationWhereParam { - LocationWhereParam::FilesystemHasSuffix(value) - } } pub struct LocationSetFilesystem(String); impl From for LocationSetParam { @@ -9344,16 +8195,16 @@ impl LocationDiskTypeField { LocationCursor::DiskType(cursor) } pub fn increment(&self, value: i32) -> LocationSetParam { - LocationSetParam::DiskType(value) + LocationSetParam::SetDiskType(value) } pub fn decrement(&self, value: i32) -> LocationSetParam { - LocationSetParam::DiskType(value) + LocationSetParam::SetDiskType(value) } pub fn multiply(&self, value: i32) -> LocationSetParam { - LocationSetParam::DiskType(value) + LocationSetParam::SetDiskType(value) } pub fn divide(&self, value: i32) -> LocationSetParam { - LocationSetParam::DiskType(value) + LocationSetParam::SetDiskType(value) } pub fn in_vec(&self, value: Vec) -> LocationWhereParam { LocationWhereParam::DiskTypeInVec(value) @@ -9376,18 +8227,6 @@ impl LocationDiskTypeField { pub fn not(&self, value: i32) -> LocationWhereParam { LocationWhereParam::DiskTypeNot(value) } - pub fn lt(&self, value: i32) -> LocationWhereParam { - LocationWhereParam::DiskTypeLt(value) - } - pub fn lte(&self, value: i32) -> LocationWhereParam { - LocationWhereParam::DiskTypeLte(value) - } - pub fn gt(&self, value: i32) -> LocationWhereParam { - LocationWhereParam::DiskTypeGt(value) - } - pub fn gte(&self, value: i32) -> LocationWhereParam { - LocationWhereParam::DiskTypeGte(value) - } } pub struct LocationSetDiskType(i32); impl From for LocationSetParam { @@ -9523,24 +8362,6 @@ impl LocationDateCreatedField { pub fn not(&self, value: chrono::DateTime) -> LocationWhereParam { LocationWhereParam::DateCreatedNot(value) } - pub fn before(&self, value: chrono::DateTime) -> LocationWhereParam { - LocationWhereParam::DateCreatedBefore(value) - } - pub fn after(&self, value: chrono::DateTime) -> LocationWhereParam { - LocationWhereParam::DateCreatedAfter(value) - } - pub fn before_equals( - &self, - value: chrono::DateTime, - ) -> LocationWhereParam { - LocationWhereParam::DateCreatedBeforeEquals(value) - } - pub fn after_equals( - &self, - value: chrono::DateTime, - ) -> LocationWhereParam { - LocationWhereParam::DateCreatedAfterEquals(value) - } } pub struct LocationSetDateCreated(chrono::DateTime); impl From for LocationSetParam { @@ -9893,10 +8714,6 @@ pub enum LocationWhereParam { IdGt(i32), IdGte(i32), IdNot(i32), - IdLt(i32), - IdLte(i32), - IdGt(i32), - IdGte(i32), NameEquals(String), NameInVec(Vec), NameNotInVec(Vec), @@ -9908,8 +8725,6 @@ pub enum LocationWhereParam { NameStartsWith(String), NameEndsWith(String), NameNot(String), - NameHasPrefix(String), - NameHasSuffix(String), LocalPathEquals(String), LocalPathInVec(Vec), LocalPathNotInVec(Vec), @@ -9921,8 +8736,6 @@ pub enum LocationWhereParam { LocalPathStartsWith(String), LocalPathEndsWith(String), LocalPathNot(String), - LocalPathHasPrefix(String), - LocalPathHasSuffix(String), TotalCapacityEquals(i32), TotalCapacityInVec(Vec), TotalCapacityNotInVec(Vec), @@ -9931,10 +8744,6 @@ pub enum LocationWhereParam { TotalCapacityGt(i32), TotalCapacityGte(i32), TotalCapacityNot(i32), - TotalCapacityLt(i32), - TotalCapacityLte(i32), - TotalCapacityGt(i32), - TotalCapacityGte(i32), AvailableCapacityEquals(i32), AvailableCapacityInVec(Vec), AvailableCapacityNotInVec(Vec), @@ -9943,10 +8752,6 @@ pub enum LocationWhereParam { AvailableCapacityGt(i32), AvailableCapacityGte(i32), AvailableCapacityNot(i32), - AvailableCapacityLt(i32), - AvailableCapacityLte(i32), - AvailableCapacityGt(i32), - AvailableCapacityGte(i32), FilesystemEquals(String), FilesystemInVec(Vec), FilesystemNotInVec(Vec), @@ -9958,8 +8763,6 @@ pub enum LocationWhereParam { FilesystemStartsWith(String), FilesystemEndsWith(String), FilesystemNot(String), - FilesystemHasPrefix(String), - FilesystemHasSuffix(String), DiskTypeEquals(i32), DiskTypeInVec(Vec), DiskTypeNotInVec(Vec), @@ -9968,10 +8771,6 @@ pub enum LocationWhereParam { DiskTypeGt(i32), DiskTypeGte(i32), DiskTypeNot(i32), - DiskTypeLt(i32), - DiskTypeLte(i32), - DiskTypeGt(i32), - DiskTypeGte(i32), IsRemovableEquals(bool), IsEjectableEquals(bool), IsRootFilesystemEquals(bool), @@ -9984,10 +8783,6 @@ pub enum LocationWhereParam { DateCreatedGt(chrono::DateTime), DateCreatedGte(chrono::DateTime), DateCreatedNot(chrono::DateTime), - DateCreatedBefore(chrono::DateTime), - DateCreatedAfter(chrono::DateTime), - DateCreatedBeforeEquals(chrono::DateTime), - DateCreatedAfterEquals(chrono::DateTime), FilePathsSome(Vec), FilePathsEvery(Vec), } @@ -10105,42 +8900,6 @@ impl LocationWhereParam { }]), ..Default::default() }, - Self::IdLt(value) => Field { - name: "id".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::IdLte(value) => Field { - name: "id".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::IdGt(value) => Field { - name: "id".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::IdGte(value) => Field { - name: "id".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::NameEquals(value) => Field { name: "name".into(), fields: Some(vec![Field { @@ -10258,24 +9017,6 @@ impl LocationWhereParam { }]), ..Default::default() }, - Self::NameHasPrefix(value) => Field { - name: "name".into(), - fields: Some(vec![Field { - name: "starts_with".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::NameHasSuffix(value) => Field { - name: "name".into(), - fields: Some(vec![Field { - name: "ends_with".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::LocalPathEquals(value) => Field { name: "local_path".into(), fields: Some(vec![Field { @@ -10393,24 +9134,6 @@ impl LocationWhereParam { }]), ..Default::default() }, - Self::LocalPathHasPrefix(value) => Field { - name: "local_path".into(), - fields: Some(vec![Field { - name: "starts_with".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::LocalPathHasSuffix(value) => Field { - name: "local_path".into(), - fields: Some(vec![Field { - name: "ends_with".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::TotalCapacityEquals(value) => Field { name: "total_capacity".into(), fields: Some(vec![Field { @@ -10501,42 +9224,6 @@ impl LocationWhereParam { }]), ..Default::default() }, - Self::TotalCapacityLt(value) => Field { - name: "total_capacity".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::TotalCapacityLte(value) => Field { - name: "total_capacity".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::TotalCapacityGt(value) => Field { - name: "total_capacity".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::TotalCapacityGte(value) => Field { - name: "total_capacity".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::AvailableCapacityEquals(value) => Field { name: "available_capacity".into(), fields: Some(vec![Field { @@ -10627,42 +9314,6 @@ impl LocationWhereParam { }]), ..Default::default() }, - Self::AvailableCapacityLt(value) => Field { - name: "available_capacity".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::AvailableCapacityLte(value) => Field { - name: "available_capacity".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::AvailableCapacityGt(value) => Field { - name: "available_capacity".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::AvailableCapacityGte(value) => Field { - name: "available_capacity".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::FilesystemEquals(value) => Field { name: "filesystem".into(), fields: Some(vec![Field { @@ -10780,24 +9431,6 @@ impl LocationWhereParam { }]), ..Default::default() }, - Self::FilesystemHasPrefix(value) => Field { - name: "filesystem".into(), - fields: Some(vec![Field { - name: "starts_with".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::FilesystemHasSuffix(value) => Field { - name: "filesystem".into(), - fields: Some(vec![Field { - name: "ends_with".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::DiskTypeEquals(value) => Field { name: "disk_type".into(), fields: Some(vec![Field { @@ -10888,42 +9521,6 @@ impl LocationWhereParam { }]), ..Default::default() }, - Self::DiskTypeLt(value) => Field { - name: "disk_type".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DiskTypeLte(value) => Field { - name: "disk_type".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DiskTypeGt(value) => Field { - name: "disk_type".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DiskTypeGte(value) => Field { - name: "disk_type".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::IsRemovableEquals(value) => Field { name: "is_removable".into(), fields: Some(vec![Field { @@ -11050,42 +9647,6 @@ impl LocationWhereParam { }]), ..Default::default() }, - Self::DateCreatedBefore(value) => Field { - name: "date_created".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateCreatedAfter(value) => Field { - name: "date_created".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateCreatedBeforeEquals(value) => Field { - name: "date_created".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateCreatedAfterEquals(value) => Field { - name: "date_created".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::FilePathsSome(value) => Field { name: "file_paths".into(), fields: Some(vec![Field { @@ -11232,7 +9793,7 @@ pub struct LocationFindFirst<'a> { with_params: Vec, } impl<'a> LocationFindFirst<'a> { - pub async fn exec(self) -> QueryResult { + pub async fn exec(self) -> QueryResult> { let Self { mut query, order_by_params, @@ -11291,7 +9852,7 @@ pub struct LocationFindUnique<'a> { with_params: Vec, } impl<'a> LocationFindUnique<'a> { - pub async fn exec(self) -> QueryResult { + pub async fn exec(self) -> QueryResult> { let Self { mut query, with_params, @@ -11414,7 +9975,7 @@ impl<'a> LocationUpsertOne<'a> { }); self } - pub fn update(mut self, params: Vec) -> Self { + pub fn update(mut self, params: Vec) -> Self { self.query.inputs.push(Input { name: "update".into(), fields: params @@ -11704,16 +10265,16 @@ impl FileIdField { FileCursor::Id(cursor) } pub fn increment(&self, value: i32) -> FileSetParam { - FileSetParam::Id(value) + FileSetParam::SetId(value) } pub fn decrement(&self, value: i32) -> FileSetParam { - FileSetParam::Id(value) + FileSetParam::SetId(value) } pub fn multiply(&self, value: i32) -> FileSetParam { - FileSetParam::Id(value) + FileSetParam::SetId(value) } pub fn divide(&self, value: i32) -> FileSetParam { - FileSetParam::Id(value) + FileSetParam::SetId(value) } pub fn in_vec(&self, value: Vec) -> FileWhereParam { FileWhereParam::IdInVec(value) @@ -11736,18 +10297,6 @@ impl FileIdField { pub fn not(&self, value: i32) -> FileWhereParam { FileWhereParam::IdNot(value) } - pub fn lt(&self, value: i32) -> FileWhereParam { - FileWhereParam::IdLt(value) - } - pub fn lte(&self, value: i32) -> FileWhereParam { - FileWhereParam::IdLte(value) - } - pub fn gt(&self, value: i32) -> FileWhereParam { - FileWhereParam::IdGt(value) - } - pub fn gte(&self, value: i32) -> FileWhereParam { - FileWhereParam::IdGte(value) - } } pub struct FileSetId(i32); impl From for FileSetParam { @@ -11770,16 +10319,16 @@ impl FileKindField { FileCursor::Kind(cursor) } pub fn increment(&self, value: i32) -> FileSetParam { - FileSetParam::Kind(value) + FileSetParam::SetKind(value) } pub fn decrement(&self, value: i32) -> FileSetParam { - FileSetParam::Kind(value) + FileSetParam::SetKind(value) } pub fn multiply(&self, value: i32) -> FileSetParam { - FileSetParam::Kind(value) + FileSetParam::SetKind(value) } pub fn divide(&self, value: i32) -> FileSetParam { - FileSetParam::Kind(value) + FileSetParam::SetKind(value) } pub fn in_vec(&self, value: Vec) -> FileWhereParam { FileWhereParam::KindInVec(value) @@ -11802,18 +10351,6 @@ impl FileKindField { pub fn not(&self, value: i32) -> FileWhereParam { FileWhereParam::KindNot(value) } - pub fn lt(&self, value: i32) -> FileWhereParam { - FileWhereParam::KindLt(value) - } - pub fn lte(&self, value: i32) -> FileWhereParam { - FileWhereParam::KindLte(value) - } - pub fn gt(&self, value: i32) -> FileWhereParam { - FileWhereParam::KindGt(value) - } - pub fn gte(&self, value: i32) -> FileWhereParam { - FileWhereParam::KindGte(value) - } } pub struct FileSetKind(i32); impl From for FileSetParam { @@ -11865,12 +10402,6 @@ impl FileSizeInBytesField { pub fn not(&self, value: String) -> FileWhereParam { FileWhereParam::SizeInBytesNot(value) } - pub fn has_prefix(&self, value: String) -> FileWhereParam { - FileWhereParam::SizeInBytesHasPrefix(value) - } - pub fn has_suffix(&self, value: String) -> FileWhereParam { - FileWhereParam::SizeInBytesHasSuffix(value) - } } pub struct FileSetSizeInBytes(String); impl From for FileSetParam { @@ -11922,12 +10453,6 @@ impl FilePartialChecksumField { pub fn not(&self, value: String) -> FileWhereParam { FileWhereParam::PartialChecksumNot(value) } - pub fn has_prefix(&self, value: String) -> FileWhereParam { - FileWhereParam::PartialChecksumHasPrefix(value) - } - pub fn has_suffix(&self, value: String) -> FileWhereParam { - FileWhereParam::PartialChecksumHasSuffix(value) - } } pub struct FileSetPartialChecksum(String); impl From for FileSetParam { @@ -11979,12 +10504,6 @@ impl FileChecksumField { pub fn not(&self, value: String) -> FileWhereParam { FileWhereParam::ChecksumNot(value) } - pub fn has_prefix(&self, value: String) -> FileWhereParam { - FileWhereParam::ChecksumHasPrefix(value) - } - pub fn has_suffix(&self, value: String) -> FileWhereParam { - FileWhereParam::ChecksumHasSuffix(value) - } } pub struct FileSetChecksum(String); impl From for FileSetParam { @@ -12007,16 +10526,16 @@ impl FileEncryptionField { FileCursor::Encryption(cursor) } pub fn increment(&self, value: i32) -> FileSetParam { - FileSetParam::Encryption(value) + FileSetParam::SetEncryption(value) } pub fn decrement(&self, value: i32) -> FileSetParam { - FileSetParam::Encryption(value) + FileSetParam::SetEncryption(value) } pub fn multiply(&self, value: i32) -> FileSetParam { - FileSetParam::Encryption(value) + FileSetParam::SetEncryption(value) } pub fn divide(&self, value: i32) -> FileSetParam { - FileSetParam::Encryption(value) + FileSetParam::SetEncryption(value) } pub fn in_vec(&self, value: Vec) -> FileWhereParam { FileWhereParam::EncryptionInVec(value) @@ -12039,18 +10558,6 @@ impl FileEncryptionField { pub fn not(&self, value: i32) -> FileWhereParam { FileWhereParam::EncryptionNot(value) } - pub fn lt(&self, value: i32) -> FileWhereParam { - FileWhereParam::EncryptionLt(value) - } - pub fn lte(&self, value: i32) -> FileWhereParam { - FileWhereParam::EncryptionLte(value) - } - pub fn gt(&self, value: i32) -> FileWhereParam { - FileWhereParam::EncryptionGt(value) - } - pub fn gte(&self, value: i32) -> FileWhereParam { - FileWhereParam::EncryptionGte(value) - } } pub struct FileSetEncryption(i32); impl From for FileSetParam { @@ -12102,12 +10609,6 @@ impl FileIpfsIdField { pub fn not(&self, value: String) -> FileWhereParam { FileWhereParam::IpfsIdNot(value) } - pub fn has_prefix(&self, value: String) -> FileWhereParam { - FileWhereParam::IpfsIdHasPrefix(value) - } - pub fn has_suffix(&self, value: String) -> FileWhereParam { - FileWhereParam::IpfsIdHasSuffix(value) - } } pub struct FileSetIpfsId(String); impl From for FileSetParam { @@ -12156,18 +10657,6 @@ impl FileDateCreatedField { pub fn not(&self, value: chrono::DateTime) -> FileWhereParam { FileWhereParam::DateCreatedNot(value) } - pub fn before(&self, value: chrono::DateTime) -> FileWhereParam { - FileWhereParam::DateCreatedBefore(value) - } - pub fn after(&self, value: chrono::DateTime) -> FileWhereParam { - FileWhereParam::DateCreatedAfter(value) - } - pub fn before_equals(&self, value: chrono::DateTime) -> FileWhereParam { - FileWhereParam::DateCreatedBeforeEquals(value) - } - pub fn after_equals(&self, value: chrono::DateTime) -> FileWhereParam { - FileWhereParam::DateCreatedAfterEquals(value) - } } pub struct FileSetDateCreated(chrono::DateTime); impl From for FileSetParam { @@ -12216,18 +10705,6 @@ impl FileDateModifiedField { pub fn not(&self, value: chrono::DateTime) -> FileWhereParam { FileWhereParam::DateModifiedNot(value) } - pub fn before(&self, value: chrono::DateTime) -> FileWhereParam { - FileWhereParam::DateModifiedBefore(value) - } - pub fn after(&self, value: chrono::DateTime) -> FileWhereParam { - FileWhereParam::DateModifiedAfter(value) - } - pub fn before_equals(&self, value: chrono::DateTime) -> FileWhereParam { - FileWhereParam::DateModifiedBeforeEquals(value) - } - pub fn after_equals(&self, value: chrono::DateTime) -> FileWhereParam { - FileWhereParam::DateModifiedAfterEquals(value) - } } pub struct FileSetDateModified(chrono::DateTime); impl From for FileSetParam { @@ -12276,18 +10753,6 @@ impl FileDateIndexedField { pub fn not(&self, value: chrono::DateTime) -> FileWhereParam { FileWhereParam::DateIndexedNot(value) } - pub fn before(&self, value: chrono::DateTime) -> FileWhereParam { - FileWhereParam::DateIndexedBefore(value) - } - pub fn after(&self, value: chrono::DateTime) -> FileWhereParam { - FileWhereParam::DateIndexedAfter(value) - } - pub fn before_equals(&self, value: chrono::DateTime) -> FileWhereParam { - FileWhereParam::DateIndexedBeforeEquals(value) - } - pub fn after_equals(&self, value: chrono::DateTime) -> FileWhereParam { - FileWhereParam::DateIndexedAfterEquals(value) - } } pub struct FileSetDateIndexed(chrono::DateTime); impl From for FileSetParam { @@ -12859,10 +11324,6 @@ pub enum FileWhereParam { IdGt(i32), IdGte(i32), IdNot(i32), - IdLt(i32), - IdLte(i32), - IdGt(i32), - IdGte(i32), KindEquals(i32), KindInVec(Vec), KindNotInVec(Vec), @@ -12871,10 +11332,6 @@ pub enum FileWhereParam { KindGt(i32), KindGte(i32), KindNot(i32), - KindLt(i32), - KindLte(i32), - KindGt(i32), - KindGte(i32), SizeInBytesEquals(String), SizeInBytesInVec(Vec), SizeInBytesNotInVec(Vec), @@ -12886,8 +11343,6 @@ pub enum FileWhereParam { SizeInBytesStartsWith(String), SizeInBytesEndsWith(String), SizeInBytesNot(String), - SizeInBytesHasPrefix(String), - SizeInBytesHasSuffix(String), PartialChecksumEquals(String), PartialChecksumInVec(Vec), PartialChecksumNotInVec(Vec), @@ -12899,8 +11354,6 @@ pub enum FileWhereParam { PartialChecksumStartsWith(String), PartialChecksumEndsWith(String), PartialChecksumNot(String), - PartialChecksumHasPrefix(String), - PartialChecksumHasSuffix(String), ChecksumEquals(String), ChecksumInVec(Vec), ChecksumNotInVec(Vec), @@ -12912,8 +11365,6 @@ pub enum FileWhereParam { ChecksumStartsWith(String), ChecksumEndsWith(String), ChecksumNot(String), - ChecksumHasPrefix(String), - ChecksumHasSuffix(String), EncryptionEquals(i32), EncryptionInVec(Vec), EncryptionNotInVec(Vec), @@ -12922,10 +11373,6 @@ pub enum FileWhereParam { EncryptionGt(i32), EncryptionGte(i32), EncryptionNot(i32), - EncryptionLt(i32), - EncryptionLte(i32), - EncryptionGt(i32), - EncryptionGte(i32), IpfsIdEquals(String), IpfsIdInVec(Vec), IpfsIdNotInVec(Vec), @@ -12937,8 +11384,6 @@ pub enum FileWhereParam { IpfsIdStartsWith(String), IpfsIdEndsWith(String), IpfsIdNot(String), - IpfsIdHasPrefix(String), - IpfsIdHasSuffix(String), DateCreatedEquals(chrono::DateTime), DateCreatedInVec(Vec>), DateCreatedNotInVec(Vec>), @@ -12947,10 +11392,6 @@ pub enum FileWhereParam { DateCreatedGt(chrono::DateTime), DateCreatedGte(chrono::DateTime), DateCreatedNot(chrono::DateTime), - DateCreatedBefore(chrono::DateTime), - DateCreatedAfter(chrono::DateTime), - DateCreatedBeforeEquals(chrono::DateTime), - DateCreatedAfterEquals(chrono::DateTime), DateModifiedEquals(chrono::DateTime), DateModifiedInVec(Vec>), DateModifiedNotInVec(Vec>), @@ -12959,10 +11400,6 @@ pub enum FileWhereParam { DateModifiedGt(chrono::DateTime), DateModifiedGte(chrono::DateTime), DateModifiedNot(chrono::DateTime), - DateModifiedBefore(chrono::DateTime), - DateModifiedAfter(chrono::DateTime), - DateModifiedBeforeEquals(chrono::DateTime), - DateModifiedAfterEquals(chrono::DateTime), DateIndexedEquals(chrono::DateTime), DateIndexedInVec(Vec>), DateIndexedNotInVec(Vec>), @@ -12971,10 +11408,6 @@ pub enum FileWhereParam { DateIndexedGt(chrono::DateTime), DateIndexedGte(chrono::DateTime), DateIndexedNot(chrono::DateTime), - DateIndexedBefore(chrono::DateTime), - DateIndexedAfter(chrono::DateTime), - DateIndexedBeforeEquals(chrono::DateTime), - DateIndexedAfterEquals(chrono::DateTime), FileTagsSome(Vec), FileTagsEvery(Vec), FileLabelsSome(Vec), @@ -13098,42 +11531,6 @@ impl FileWhereParam { }]), ..Default::default() }, - Self::IdLt(value) => Field { - name: "id".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::IdLte(value) => Field { - name: "id".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::IdGt(value) => Field { - name: "id".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::IdGte(value) => Field { - name: "id".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::KindEquals(value) => Field { name: "kind".into(), fields: Some(vec![Field { @@ -13224,42 +11621,6 @@ impl FileWhereParam { }]), ..Default::default() }, - Self::KindLt(value) => Field { - name: "kind".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::KindLte(value) => Field { - name: "kind".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::KindGt(value) => Field { - name: "kind".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::KindGte(value) => Field { - name: "kind".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::SizeInBytesEquals(value) => Field { name: "size_in_bytes".into(), fields: Some(vec![Field { @@ -13377,24 +11738,6 @@ impl FileWhereParam { }]), ..Default::default() }, - Self::SizeInBytesHasPrefix(value) => Field { - name: "size_in_bytes".into(), - fields: Some(vec![Field { - name: "starts_with".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::SizeInBytesHasSuffix(value) => Field { - name: "size_in_bytes".into(), - fields: Some(vec![Field { - name: "ends_with".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::PartialChecksumEquals(value) => Field { name: "partial_checksum".into(), fields: Some(vec![Field { @@ -13512,24 +11855,6 @@ impl FileWhereParam { }]), ..Default::default() }, - Self::PartialChecksumHasPrefix(value) => Field { - name: "partial_checksum".into(), - fields: Some(vec![Field { - name: "starts_with".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::PartialChecksumHasSuffix(value) => Field { - name: "partial_checksum".into(), - fields: Some(vec![Field { - name: "ends_with".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::ChecksumEquals(value) => Field { name: "checksum".into(), fields: Some(vec![Field { @@ -13647,24 +11972,6 @@ impl FileWhereParam { }]), ..Default::default() }, - Self::ChecksumHasPrefix(value) => Field { - name: "checksum".into(), - fields: Some(vec![Field { - name: "starts_with".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::ChecksumHasSuffix(value) => Field { - name: "checksum".into(), - fields: Some(vec![Field { - name: "ends_with".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::EncryptionEquals(value) => Field { name: "encryption".into(), fields: Some(vec![Field { @@ -13755,42 +12062,6 @@ impl FileWhereParam { }]), ..Default::default() }, - Self::EncryptionLt(value) => Field { - name: "encryption".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::EncryptionLte(value) => Field { - name: "encryption".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::EncryptionGt(value) => Field { - name: "encryption".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::EncryptionGte(value) => Field { - name: "encryption".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::IpfsIdEquals(value) => Field { name: "ipfs_id".into(), fields: Some(vec![Field { @@ -13908,24 +12179,6 @@ impl FileWhereParam { }]), ..Default::default() }, - Self::IpfsIdHasPrefix(value) => Field { - name: "ipfs_id".into(), - fields: Some(vec![Field { - name: "starts_with".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::IpfsIdHasSuffix(value) => Field { - name: "ipfs_id".into(), - fields: Some(vec![Field { - name: "ends_with".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::DateCreatedEquals(value) => Field { name: "date_created".into(), fields: Some(vec![Field { @@ -14016,42 +12269,6 @@ impl FileWhereParam { }]), ..Default::default() }, - Self::DateCreatedBefore(value) => Field { - name: "date_created".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateCreatedAfter(value) => Field { - name: "date_created".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateCreatedBeforeEquals(value) => Field { - name: "date_created".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateCreatedAfterEquals(value) => Field { - name: "date_created".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::DateModifiedEquals(value) => Field { name: "date_modified".into(), fields: Some(vec![Field { @@ -14142,42 +12359,6 @@ impl FileWhereParam { }]), ..Default::default() }, - Self::DateModifiedBefore(value) => Field { - name: "date_modified".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateModifiedAfter(value) => Field { - name: "date_modified".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateModifiedBeforeEquals(value) => Field { - name: "date_modified".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateModifiedAfterEquals(value) => Field { - name: "date_modified".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::DateIndexedEquals(value) => Field { name: "date_indexed".into(), fields: Some(vec![Field { @@ -14268,42 +12449,6 @@ impl FileWhereParam { }]), ..Default::default() }, - Self::DateIndexedBefore(value) => Field { - name: "date_indexed".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateIndexedAfter(value) => Field { - name: "date_indexed".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateIndexedBeforeEquals(value) => Field { - name: "date_indexed".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateIndexedAfterEquals(value) => Field { - name: "date_indexed".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::FileTagsSome(value) => Field { name: "file_tags".into(), fields: Some(vec![Field { @@ -14506,7 +12651,7 @@ pub struct FileFindFirst<'a> { with_params: Vec, } impl<'a> FileFindFirst<'a> { - pub async fn exec(self) -> QueryResult { + pub async fn exec(self) -> QueryResult> { let Self { mut query, order_by_params, @@ -14565,7 +12710,7 @@ pub struct FileFindUnique<'a> { with_params: Vec, } impl<'a> FileFindUnique<'a> { - pub async fn exec(self) -> QueryResult { + pub async fn exec(self) -> QueryResult> { let Self { mut query, with_params, @@ -14695,7 +12840,7 @@ impl<'a> FileUpsertOne<'a> { }); self } - pub fn update(mut self, params: Vec) -> Self { + pub fn update(mut self, params: Vec) -> Self { self.query.inputs.push(Input { name: "update".into(), fields: params @@ -15016,16 +13161,16 @@ impl FilePathIdField { FilePathCursor::Id(cursor) } pub fn increment(&self, value: i32) -> FilePathSetParam { - FilePathSetParam::Id(value) + FilePathSetParam::SetId(value) } pub fn decrement(&self, value: i32) -> FilePathSetParam { - FilePathSetParam::Id(value) + FilePathSetParam::SetId(value) } pub fn multiply(&self, value: i32) -> FilePathSetParam { - FilePathSetParam::Id(value) + FilePathSetParam::SetId(value) } pub fn divide(&self, value: i32) -> FilePathSetParam { - FilePathSetParam::Id(value) + FilePathSetParam::SetId(value) } pub fn in_vec(&self, value: Vec) -> FilePathWhereParam { FilePathWhereParam::IdInVec(value) @@ -15048,18 +13193,6 @@ impl FilePathIdField { pub fn not(&self, value: i32) -> FilePathWhereParam { FilePathWhereParam::IdNot(value) } - pub fn lt(&self, value: i32) -> FilePathWhereParam { - FilePathWhereParam::IdLt(value) - } - pub fn lte(&self, value: i32) -> FilePathWhereParam { - FilePathWhereParam::IdLte(value) - } - pub fn gt(&self, value: i32) -> FilePathWhereParam { - FilePathWhereParam::IdGt(value) - } - pub fn gte(&self, value: i32) -> FilePathWhereParam { - FilePathWhereParam::IdGte(value) - } } pub struct FilePathSetId(i32); impl From for FilePathSetParam { @@ -15103,16 +13236,16 @@ impl FilePathLocationIdField { FilePathCursor::LocationId(cursor) } pub fn increment(&self, value: i32) -> FilePathSetParam { - FilePathSetParam::LocationId(value) + FilePathSetParam::SetLocationId(value) } pub fn decrement(&self, value: i32) -> FilePathSetParam { - FilePathSetParam::LocationId(value) + FilePathSetParam::SetLocationId(value) } pub fn multiply(&self, value: i32) -> FilePathSetParam { - FilePathSetParam::LocationId(value) + FilePathSetParam::SetLocationId(value) } pub fn divide(&self, value: i32) -> FilePathSetParam { - FilePathSetParam::LocationId(value) + FilePathSetParam::SetLocationId(value) } pub fn in_vec(&self, value: Vec) -> FilePathWhereParam { FilePathWhereParam::LocationIdInVec(value) @@ -15135,18 +13268,6 @@ impl FilePathLocationIdField { pub fn not(&self, value: i32) -> FilePathWhereParam { FilePathWhereParam::LocationIdNot(value) } - pub fn lt(&self, value: i32) -> FilePathWhereParam { - FilePathWhereParam::LocationIdLt(value) - } - pub fn lte(&self, value: i32) -> FilePathWhereParam { - FilePathWhereParam::LocationIdLte(value) - } - pub fn gt(&self, value: i32) -> FilePathWhereParam { - FilePathWhereParam::LocationIdGt(value) - } - pub fn gte(&self, value: i32) -> FilePathWhereParam { - FilePathWhereParam::LocationIdGte(value) - } } pub struct FilePathSetLocationId(i32); impl From for FilePathSetParam { @@ -15198,12 +13319,6 @@ impl FilePathMaterializedPathField { pub fn not(&self, value: String) -> FilePathWhereParam { FilePathWhereParam::MaterializedPathNot(value) } - pub fn has_prefix(&self, value: String) -> FilePathWhereParam { - FilePathWhereParam::MaterializedPathHasPrefix(value) - } - pub fn has_suffix(&self, value: String) -> FilePathWhereParam { - FilePathWhereParam::MaterializedPathHasSuffix(value) - } } pub struct FilePathSetMaterializedPath(String); impl From for FilePathSetParam { @@ -15255,12 +13370,6 @@ impl FilePathNameField { pub fn not(&self, value: String) -> FilePathWhereParam { FilePathWhereParam::NameNot(value) } - pub fn has_prefix(&self, value: String) -> FilePathWhereParam { - FilePathWhereParam::NameHasPrefix(value) - } - pub fn has_suffix(&self, value: String) -> FilePathWhereParam { - FilePathWhereParam::NameHasSuffix(value) - } } pub struct FilePathSetName(String); impl From for FilePathSetParam { @@ -15312,12 +13421,6 @@ impl FilePathExtensionField { pub fn not(&self, value: String) -> FilePathWhereParam { FilePathWhereParam::ExtensionNot(value) } - pub fn has_prefix(&self, value: String) -> FilePathWhereParam { - FilePathWhereParam::ExtensionHasPrefix(value) - } - pub fn has_suffix(&self, value: String) -> FilePathWhereParam { - FilePathWhereParam::ExtensionHasSuffix(value) - } } pub struct FilePathSetExtension(String); impl From for FilePathSetParam { @@ -15340,16 +13443,16 @@ impl FilePathFileIdField { FilePathCursor::FileId(cursor) } pub fn increment(&self, value: i32) -> FilePathSetParam { - FilePathSetParam::FileId(value) + FilePathSetParam::SetFileId(value) } pub fn decrement(&self, value: i32) -> FilePathSetParam { - FilePathSetParam::FileId(value) + FilePathSetParam::SetFileId(value) } pub fn multiply(&self, value: i32) -> FilePathSetParam { - FilePathSetParam::FileId(value) + FilePathSetParam::SetFileId(value) } pub fn divide(&self, value: i32) -> FilePathSetParam { - FilePathSetParam::FileId(value) + FilePathSetParam::SetFileId(value) } pub fn in_vec(&self, value: Vec) -> FilePathWhereParam { FilePathWhereParam::FileIdInVec(value) @@ -15372,18 +13475,6 @@ impl FilePathFileIdField { pub fn not(&self, value: i32) -> FilePathWhereParam { FilePathWhereParam::FileIdNot(value) } - pub fn lt(&self, value: i32) -> FilePathWhereParam { - FilePathWhereParam::FileIdLt(value) - } - pub fn lte(&self, value: i32) -> FilePathWhereParam { - FilePathWhereParam::FileIdLte(value) - } - pub fn gt(&self, value: i32) -> FilePathWhereParam { - FilePathWhereParam::FileIdGt(value) - } - pub fn gte(&self, value: i32) -> FilePathWhereParam { - FilePathWhereParam::FileIdGte(value) - } } pub struct FilePathSetFileId(i32); impl From for FilePathSetParam { @@ -15406,16 +13497,16 @@ impl FilePathParentIdField { FilePathCursor::ParentId(cursor) } pub fn increment(&self, value: i32) -> FilePathSetParam { - FilePathSetParam::ParentId(value) + FilePathSetParam::SetParentId(value) } pub fn decrement(&self, value: i32) -> FilePathSetParam { - FilePathSetParam::ParentId(value) + FilePathSetParam::SetParentId(value) } pub fn multiply(&self, value: i32) -> FilePathSetParam { - FilePathSetParam::ParentId(value) + FilePathSetParam::SetParentId(value) } pub fn divide(&self, value: i32) -> FilePathSetParam { - FilePathSetParam::ParentId(value) + FilePathSetParam::SetParentId(value) } pub fn in_vec(&self, value: Vec) -> FilePathWhereParam { FilePathWhereParam::ParentIdInVec(value) @@ -15438,18 +13529,6 @@ impl FilePathParentIdField { pub fn not(&self, value: i32) -> FilePathWhereParam { FilePathWhereParam::ParentIdNot(value) } - pub fn lt(&self, value: i32) -> FilePathWhereParam { - FilePathWhereParam::ParentIdLt(value) - } - pub fn lte(&self, value: i32) -> FilePathWhereParam { - FilePathWhereParam::ParentIdLte(value) - } - pub fn gt(&self, value: i32) -> FilePathWhereParam { - FilePathWhereParam::ParentIdGt(value) - } - pub fn gte(&self, value: i32) -> FilePathWhereParam { - FilePathWhereParam::ParentIdGte(value) - } } pub struct FilePathSetParentId(i32); impl From for FilePathSetParam { @@ -15472,16 +13551,16 @@ impl FilePathEncryptionField { FilePathCursor::Encryption(cursor) } pub fn increment(&self, value: i32) -> FilePathSetParam { - FilePathSetParam::Encryption(value) + FilePathSetParam::SetEncryption(value) } pub fn decrement(&self, value: i32) -> FilePathSetParam { - FilePathSetParam::Encryption(value) + FilePathSetParam::SetEncryption(value) } pub fn multiply(&self, value: i32) -> FilePathSetParam { - FilePathSetParam::Encryption(value) + FilePathSetParam::SetEncryption(value) } pub fn divide(&self, value: i32) -> FilePathSetParam { - FilePathSetParam::Encryption(value) + FilePathSetParam::SetEncryption(value) } pub fn in_vec(&self, value: Vec) -> FilePathWhereParam { FilePathWhereParam::EncryptionInVec(value) @@ -15504,18 +13583,6 @@ impl FilePathEncryptionField { pub fn not(&self, value: i32) -> FilePathWhereParam { FilePathWhereParam::EncryptionNot(value) } - pub fn lt(&self, value: i32) -> FilePathWhereParam { - FilePathWhereParam::EncryptionLt(value) - } - pub fn lte(&self, value: i32) -> FilePathWhereParam { - FilePathWhereParam::EncryptionLte(value) - } - pub fn gt(&self, value: i32) -> FilePathWhereParam { - FilePathWhereParam::EncryptionGt(value) - } - pub fn gte(&self, value: i32) -> FilePathWhereParam { - FilePathWhereParam::EncryptionGte(value) - } } pub struct FilePathSetEncryption(i32); impl From for FilePathSetParam { @@ -15567,12 +13634,6 @@ impl FilePathPermissionsField { pub fn not(&self, value: String) -> FilePathWhereParam { FilePathWhereParam::PermissionsNot(value) } - pub fn has_prefix(&self, value: String) -> FilePathWhereParam { - FilePathWhereParam::PermissionsHasPrefix(value) - } - pub fn has_suffix(&self, value: String) -> FilePathWhereParam { - FilePathWhereParam::PermissionsHasSuffix(value) - } } pub struct FilePathSetPermissions(String); impl From for FilePathSetParam { @@ -15624,24 +13685,6 @@ impl FilePathDateCreatedField { pub fn not(&self, value: chrono::DateTime) -> FilePathWhereParam { FilePathWhereParam::DateCreatedNot(value) } - pub fn before(&self, value: chrono::DateTime) -> FilePathWhereParam { - FilePathWhereParam::DateCreatedBefore(value) - } - pub fn after(&self, value: chrono::DateTime) -> FilePathWhereParam { - FilePathWhereParam::DateCreatedAfter(value) - } - pub fn before_equals( - &self, - value: chrono::DateTime, - ) -> FilePathWhereParam { - FilePathWhereParam::DateCreatedBeforeEquals(value) - } - pub fn after_equals( - &self, - value: chrono::DateTime, - ) -> FilePathWhereParam { - FilePathWhereParam::DateCreatedAfterEquals(value) - } } pub struct FilePathSetDateCreated(chrono::DateTime); impl From for FilePathSetParam { @@ -15693,24 +13736,6 @@ impl FilePathDateModifiedField { pub fn not(&self, value: chrono::DateTime) -> FilePathWhereParam { FilePathWhereParam::DateModifiedNot(value) } - pub fn before(&self, value: chrono::DateTime) -> FilePathWhereParam { - FilePathWhereParam::DateModifiedBefore(value) - } - pub fn after(&self, value: chrono::DateTime) -> FilePathWhereParam { - FilePathWhereParam::DateModifiedAfter(value) - } - pub fn before_equals( - &self, - value: chrono::DateTime, - ) -> FilePathWhereParam { - FilePathWhereParam::DateModifiedBeforeEquals(value) - } - pub fn after_equals( - &self, - value: chrono::DateTime, - ) -> FilePathWhereParam { - FilePathWhereParam::DateModifiedAfterEquals(value) - } } pub struct FilePathSetDateModified(chrono::DateTime); impl From for FilePathSetParam { @@ -15762,24 +13787,6 @@ impl FilePathDateIndexedField { pub fn not(&self, value: chrono::DateTime) -> FilePathWhereParam { FilePathWhereParam::DateIndexedNot(value) } - pub fn before(&self, value: chrono::DateTime) -> FilePathWhereParam { - FilePathWhereParam::DateIndexedBefore(value) - } - pub fn after(&self, value: chrono::DateTime) -> FilePathWhereParam { - FilePathWhereParam::DateIndexedAfter(value) - } - pub fn before_equals( - &self, - value: chrono::DateTime, - ) -> FilePathWhereParam { - FilePathWhereParam::DateIndexedBeforeEquals(value) - } - pub fn after_equals( - &self, - value: chrono::DateTime, - ) -> FilePathWhereParam { - FilePathWhereParam::DateIndexedAfterEquals(value) - } } pub struct FilePathSetDateIndexed(chrono::DateTime); impl From for FilePathSetParam { @@ -16304,10 +14311,6 @@ pub enum FilePathWhereParam { IdGt(i32), IdGte(i32), IdNot(i32), - IdLt(i32), - IdLte(i32), - IdGt(i32), - IdGte(i32), IsDirEquals(bool), LocationIdEquals(i32), LocationIdInVec(Vec), @@ -16317,10 +14320,6 @@ pub enum FilePathWhereParam { LocationIdGt(i32), LocationIdGte(i32), LocationIdNot(i32), - LocationIdLt(i32), - LocationIdLte(i32), - LocationIdGt(i32), - LocationIdGte(i32), MaterializedPathEquals(String), MaterializedPathInVec(Vec), MaterializedPathNotInVec(Vec), @@ -16332,8 +14331,6 @@ pub enum FilePathWhereParam { MaterializedPathStartsWith(String), MaterializedPathEndsWith(String), MaterializedPathNot(String), - MaterializedPathHasPrefix(String), - MaterializedPathHasSuffix(String), NameEquals(String), NameInVec(Vec), NameNotInVec(Vec), @@ -16345,8 +14342,6 @@ pub enum FilePathWhereParam { NameStartsWith(String), NameEndsWith(String), NameNot(String), - NameHasPrefix(String), - NameHasSuffix(String), ExtensionEquals(String), ExtensionInVec(Vec), ExtensionNotInVec(Vec), @@ -16358,8 +14353,6 @@ pub enum FilePathWhereParam { ExtensionStartsWith(String), ExtensionEndsWith(String), ExtensionNot(String), - ExtensionHasPrefix(String), - ExtensionHasSuffix(String), FileIdEquals(i32), FileIdInVec(Vec), FileIdNotInVec(Vec), @@ -16368,10 +14361,6 @@ pub enum FilePathWhereParam { FileIdGt(i32), FileIdGte(i32), FileIdNot(i32), - FileIdLt(i32), - FileIdLte(i32), - FileIdGt(i32), - FileIdGte(i32), ParentIdEquals(i32), ParentIdInVec(Vec), ParentIdNotInVec(Vec), @@ -16380,10 +14369,6 @@ pub enum FilePathWhereParam { ParentIdGt(i32), ParentIdGte(i32), ParentIdNot(i32), - ParentIdLt(i32), - ParentIdLte(i32), - ParentIdGt(i32), - ParentIdGte(i32), EncryptionEquals(i32), EncryptionInVec(Vec), EncryptionNotInVec(Vec), @@ -16392,10 +14377,6 @@ pub enum FilePathWhereParam { EncryptionGt(i32), EncryptionGte(i32), EncryptionNot(i32), - EncryptionLt(i32), - EncryptionLte(i32), - EncryptionGt(i32), - EncryptionGte(i32), PermissionsEquals(String), PermissionsInVec(Vec), PermissionsNotInVec(Vec), @@ -16407,8 +14388,6 @@ pub enum FilePathWhereParam { PermissionsStartsWith(String), PermissionsEndsWith(String), PermissionsNot(String), - PermissionsHasPrefix(String), - PermissionsHasSuffix(String), DateCreatedEquals(chrono::DateTime), DateCreatedInVec(Vec>), DateCreatedNotInVec(Vec>), @@ -16417,10 +14396,6 @@ pub enum FilePathWhereParam { DateCreatedGt(chrono::DateTime), DateCreatedGte(chrono::DateTime), DateCreatedNot(chrono::DateTime), - DateCreatedBefore(chrono::DateTime), - DateCreatedAfter(chrono::DateTime), - DateCreatedBeforeEquals(chrono::DateTime), - DateCreatedAfterEquals(chrono::DateTime), DateModifiedEquals(chrono::DateTime), DateModifiedInVec(Vec>), DateModifiedNotInVec(Vec>), @@ -16429,10 +14404,6 @@ pub enum FilePathWhereParam { DateModifiedGt(chrono::DateTime), DateModifiedGte(chrono::DateTime), DateModifiedNot(chrono::DateTime), - DateModifiedBefore(chrono::DateTime), - DateModifiedAfter(chrono::DateTime), - DateModifiedBeforeEquals(chrono::DateTime), - DateModifiedAfterEquals(chrono::DateTime), DateIndexedEquals(chrono::DateTime), DateIndexedInVec(Vec>), DateIndexedNotInVec(Vec>), @@ -16441,10 +14412,6 @@ pub enum FilePathWhereParam { DateIndexedGt(chrono::DateTime), DateIndexedGte(chrono::DateTime), DateIndexedNot(chrono::DateTime), - DateIndexedBefore(chrono::DateTime), - DateIndexedAfter(chrono::DateTime), - DateIndexedBeforeEquals(chrono::DateTime), - DateIndexedAfterEquals(chrono::DateTime), FileIs(Vec), LocationIs(Vec), ParentIs(Vec), @@ -16565,42 +14532,6 @@ impl FilePathWhereParam { }]), ..Default::default() }, - Self::IdLt(value) => Field { - name: "id".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::IdLte(value) => Field { - name: "id".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::IdGt(value) => Field { - name: "id".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::IdGte(value) => Field { - name: "id".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::IsDirEquals(value) => Field { name: "is_dir".into(), fields: Some(vec![Field { @@ -16700,42 +14631,6 @@ impl FilePathWhereParam { }]), ..Default::default() }, - Self::LocationIdLt(value) => Field { - name: "location_id".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::LocationIdLte(value) => Field { - name: "location_id".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::LocationIdGt(value) => Field { - name: "location_id".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::LocationIdGte(value) => Field { - name: "location_id".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::MaterializedPathEquals(value) => Field { name: "materialized_path".into(), fields: Some(vec![Field { @@ -16853,24 +14748,6 @@ impl FilePathWhereParam { }]), ..Default::default() }, - Self::MaterializedPathHasPrefix(value) => Field { - name: "materialized_path".into(), - fields: Some(vec![Field { - name: "starts_with".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::MaterializedPathHasSuffix(value) => Field { - name: "materialized_path".into(), - fields: Some(vec![Field { - name: "ends_with".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::NameEquals(value) => Field { name: "name".into(), fields: Some(vec![Field { @@ -16988,24 +14865,6 @@ impl FilePathWhereParam { }]), ..Default::default() }, - Self::NameHasPrefix(value) => Field { - name: "name".into(), - fields: Some(vec![Field { - name: "starts_with".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::NameHasSuffix(value) => Field { - name: "name".into(), - fields: Some(vec![Field { - name: "ends_with".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::ExtensionEquals(value) => Field { name: "extension".into(), fields: Some(vec![Field { @@ -17123,24 +14982,6 @@ impl FilePathWhereParam { }]), ..Default::default() }, - Self::ExtensionHasPrefix(value) => Field { - name: "extension".into(), - fields: Some(vec![Field { - name: "starts_with".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::ExtensionHasSuffix(value) => Field { - name: "extension".into(), - fields: Some(vec![Field { - name: "ends_with".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::FileIdEquals(value) => Field { name: "file_id".into(), fields: Some(vec![Field { @@ -17231,42 +15072,6 @@ impl FilePathWhereParam { }]), ..Default::default() }, - Self::FileIdLt(value) => Field { - name: "file_id".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::FileIdLte(value) => Field { - name: "file_id".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::FileIdGt(value) => Field { - name: "file_id".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::FileIdGte(value) => Field { - name: "file_id".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::ParentIdEquals(value) => Field { name: "parent_id".into(), fields: Some(vec![Field { @@ -17357,42 +15162,6 @@ impl FilePathWhereParam { }]), ..Default::default() }, - Self::ParentIdLt(value) => Field { - name: "parent_id".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::ParentIdLte(value) => Field { - name: "parent_id".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::ParentIdGt(value) => Field { - name: "parent_id".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::ParentIdGte(value) => Field { - name: "parent_id".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::EncryptionEquals(value) => Field { name: "encryption".into(), fields: Some(vec![Field { @@ -17483,42 +15252,6 @@ impl FilePathWhereParam { }]), ..Default::default() }, - Self::EncryptionLt(value) => Field { - name: "encryption".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::EncryptionLte(value) => Field { - name: "encryption".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::EncryptionGt(value) => Field { - name: "encryption".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::EncryptionGte(value) => Field { - name: "encryption".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::PermissionsEquals(value) => Field { name: "permissions".into(), fields: Some(vec![Field { @@ -17636,24 +15369,6 @@ impl FilePathWhereParam { }]), ..Default::default() }, - Self::PermissionsHasPrefix(value) => Field { - name: "permissions".into(), - fields: Some(vec![Field { - name: "starts_with".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::PermissionsHasSuffix(value) => Field { - name: "permissions".into(), - fields: Some(vec![Field { - name: "ends_with".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::DateCreatedEquals(value) => Field { name: "date_created".into(), fields: Some(vec![Field { @@ -17744,42 +15459,6 @@ impl FilePathWhereParam { }]), ..Default::default() }, - Self::DateCreatedBefore(value) => Field { - name: "date_created".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateCreatedAfter(value) => Field { - name: "date_created".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateCreatedBeforeEquals(value) => Field { - name: "date_created".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateCreatedAfterEquals(value) => Field { - name: "date_created".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::DateModifiedEquals(value) => Field { name: "date_modified".into(), fields: Some(vec![Field { @@ -17870,42 +15549,6 @@ impl FilePathWhereParam { }]), ..Default::default() }, - Self::DateModifiedBefore(value) => Field { - name: "date_modified".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateModifiedAfter(value) => Field { - name: "date_modified".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateModifiedBeforeEquals(value) => Field { - name: "date_modified".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateModifiedAfterEquals(value) => Field { - name: "date_modified".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::DateIndexedEquals(value) => Field { name: "date_indexed".into(), fields: Some(vec![Field { @@ -17996,42 +15639,6 @@ impl FilePathWhereParam { }]), ..Default::default() }, - Self::DateIndexedBefore(value) => Field { - name: "date_indexed".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateIndexedAfter(value) => Field { - name: "date_indexed".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateIndexedBeforeEquals(value) => Field { - name: "date_indexed".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateIndexedAfterEquals(value) => Field { - name: "date_indexed".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::FileIs(value) => Field { name: "file".into(), fields: Some(vec![Field { @@ -18205,7 +15812,7 @@ pub struct FilePathFindFirst<'a> { with_params: Vec, } impl<'a> FilePathFindFirst<'a> { - pub async fn exec(self) -> QueryResult { + pub async fn exec(self) -> QueryResult> { let Self { mut query, order_by_params, @@ -18264,7 +15871,7 @@ pub struct FilePathFindUnique<'a> { with_params: Vec, } impl<'a> FilePathFindUnique<'a> { - pub async fn exec(self) -> QueryResult { + pub async fn exec(self) -> QueryResult> { let Self { mut query, with_params, @@ -18394,7 +16001,7 @@ impl<'a> FilePathUpsertOne<'a> { }); self } - pub fn update(mut self, params: Vec) -> Self { + pub fn update(mut self, params: Vec) -> Self { self.query.inputs.push(Input { name: "update".into(), fields: params @@ -18649,16 +16256,16 @@ impl TagIdField { TagCursor::Id(cursor) } pub fn increment(&self, value: i32) -> TagSetParam { - TagSetParam::Id(value) + TagSetParam::SetId(value) } pub fn decrement(&self, value: i32) -> TagSetParam { - TagSetParam::Id(value) + TagSetParam::SetId(value) } pub fn multiply(&self, value: i32) -> TagSetParam { - TagSetParam::Id(value) + TagSetParam::SetId(value) } pub fn divide(&self, value: i32) -> TagSetParam { - TagSetParam::Id(value) + TagSetParam::SetId(value) } pub fn in_vec(&self, value: Vec) -> TagWhereParam { TagWhereParam::IdInVec(value) @@ -18681,18 +16288,6 @@ impl TagIdField { pub fn not(&self, value: i32) -> TagWhereParam { TagWhereParam::IdNot(value) } - pub fn lt(&self, value: i32) -> TagWhereParam { - TagWhereParam::IdLt(value) - } - pub fn lte(&self, value: i32) -> TagWhereParam { - TagWhereParam::IdLte(value) - } - pub fn gt(&self, value: i32) -> TagWhereParam { - TagWhereParam::IdGt(value) - } - pub fn gte(&self, value: i32) -> TagWhereParam { - TagWhereParam::IdGte(value) - } } pub struct TagSetId(i32); impl From for TagSetParam { @@ -18744,12 +16339,6 @@ impl TagNameField { pub fn not(&self, value: String) -> TagWhereParam { TagWhereParam::NameNot(value) } - pub fn has_prefix(&self, value: String) -> TagWhereParam { - TagWhereParam::NameHasPrefix(value) - } - pub fn has_suffix(&self, value: String) -> TagWhereParam { - TagWhereParam::NameHasSuffix(value) - } } pub struct TagSetName(String); impl From for TagSetParam { @@ -18772,16 +16361,16 @@ impl TagEncryptionField { TagCursor::Encryption(cursor) } pub fn increment(&self, value: i32) -> TagSetParam { - TagSetParam::Encryption(value) + TagSetParam::SetEncryption(value) } pub fn decrement(&self, value: i32) -> TagSetParam { - TagSetParam::Encryption(value) + TagSetParam::SetEncryption(value) } pub fn multiply(&self, value: i32) -> TagSetParam { - TagSetParam::Encryption(value) + TagSetParam::SetEncryption(value) } pub fn divide(&self, value: i32) -> TagSetParam { - TagSetParam::Encryption(value) + TagSetParam::SetEncryption(value) } pub fn in_vec(&self, value: Vec) -> TagWhereParam { TagWhereParam::EncryptionInVec(value) @@ -18804,18 +16393,6 @@ impl TagEncryptionField { pub fn not(&self, value: i32) -> TagWhereParam { TagWhereParam::EncryptionNot(value) } - pub fn lt(&self, value: i32) -> TagWhereParam { - TagWhereParam::EncryptionLt(value) - } - pub fn lte(&self, value: i32) -> TagWhereParam { - TagWhereParam::EncryptionLte(value) - } - pub fn gt(&self, value: i32) -> TagWhereParam { - TagWhereParam::EncryptionGt(value) - } - pub fn gte(&self, value: i32) -> TagWhereParam { - TagWhereParam::EncryptionGte(value) - } } pub struct TagSetEncryption(i32); impl From for TagSetParam { @@ -18838,16 +16415,16 @@ impl TagTotalFilesField { TagCursor::TotalFiles(cursor) } pub fn increment(&self, value: i32) -> TagSetParam { - TagSetParam::TotalFiles(value) + TagSetParam::SetTotalFiles(value) } pub fn decrement(&self, value: i32) -> TagSetParam { - TagSetParam::TotalFiles(value) + TagSetParam::SetTotalFiles(value) } pub fn multiply(&self, value: i32) -> TagSetParam { - TagSetParam::TotalFiles(value) + TagSetParam::SetTotalFiles(value) } pub fn divide(&self, value: i32) -> TagSetParam { - TagSetParam::TotalFiles(value) + TagSetParam::SetTotalFiles(value) } pub fn in_vec(&self, value: Vec) -> TagWhereParam { TagWhereParam::TotalFilesInVec(value) @@ -18870,18 +16447,6 @@ impl TagTotalFilesField { pub fn not(&self, value: i32) -> TagWhereParam { TagWhereParam::TotalFilesNot(value) } - pub fn lt(&self, value: i32) -> TagWhereParam { - TagWhereParam::TotalFilesLt(value) - } - pub fn lte(&self, value: i32) -> TagWhereParam { - TagWhereParam::TotalFilesLte(value) - } - pub fn gt(&self, value: i32) -> TagWhereParam { - TagWhereParam::TotalFilesGt(value) - } - pub fn gte(&self, value: i32) -> TagWhereParam { - TagWhereParam::TotalFilesGte(value) - } } pub struct TagSetTotalFiles(i32); impl From for TagSetParam { @@ -18904,16 +16469,16 @@ impl TagRedundancyGoalField { TagCursor::RedundancyGoal(cursor) } pub fn increment(&self, value: i32) -> TagSetParam { - TagSetParam::RedundancyGoal(value) + TagSetParam::SetRedundancyGoal(value) } pub fn decrement(&self, value: i32) -> TagSetParam { - TagSetParam::RedundancyGoal(value) + TagSetParam::SetRedundancyGoal(value) } pub fn multiply(&self, value: i32) -> TagSetParam { - TagSetParam::RedundancyGoal(value) + TagSetParam::SetRedundancyGoal(value) } pub fn divide(&self, value: i32) -> TagSetParam { - TagSetParam::RedundancyGoal(value) + TagSetParam::SetRedundancyGoal(value) } pub fn in_vec(&self, value: Vec) -> TagWhereParam { TagWhereParam::RedundancyGoalInVec(value) @@ -18936,18 +16501,6 @@ impl TagRedundancyGoalField { pub fn not(&self, value: i32) -> TagWhereParam { TagWhereParam::RedundancyGoalNot(value) } - pub fn lt(&self, value: i32) -> TagWhereParam { - TagWhereParam::RedundancyGoalLt(value) - } - pub fn lte(&self, value: i32) -> TagWhereParam { - TagWhereParam::RedundancyGoalLte(value) - } - pub fn gt(&self, value: i32) -> TagWhereParam { - TagWhereParam::RedundancyGoalGt(value) - } - pub fn gte(&self, value: i32) -> TagWhereParam { - TagWhereParam::RedundancyGoalGte(value) - } } pub struct TagSetRedundancyGoal(i32); impl From for TagSetParam { @@ -18993,18 +16546,6 @@ impl TagDateCreatedField { pub fn not(&self, value: chrono::DateTime) -> TagWhereParam { TagWhereParam::DateCreatedNot(value) } - pub fn before(&self, value: chrono::DateTime) -> TagWhereParam { - TagWhereParam::DateCreatedBefore(value) - } - pub fn after(&self, value: chrono::DateTime) -> TagWhereParam { - TagWhereParam::DateCreatedAfter(value) - } - pub fn before_equals(&self, value: chrono::DateTime) -> TagWhereParam { - TagWhereParam::DateCreatedBeforeEquals(value) - } - pub fn after_equals(&self, value: chrono::DateTime) -> TagWhereParam { - TagWhereParam::DateCreatedAfterEquals(value) - } } pub struct TagSetDateCreated(chrono::DateTime); impl From for TagSetParam { @@ -19050,18 +16591,6 @@ impl TagDateModifiedField { pub fn not(&self, value: chrono::DateTime) -> TagWhereParam { TagWhereParam::DateModifiedNot(value) } - pub fn before(&self, value: chrono::DateTime) -> TagWhereParam { - TagWhereParam::DateModifiedBefore(value) - } - pub fn after(&self, value: chrono::DateTime) -> TagWhereParam { - TagWhereParam::DateModifiedAfter(value) - } - pub fn before_equals(&self, value: chrono::DateTime) -> TagWhereParam { - TagWhereParam::DateModifiedBeforeEquals(value) - } - pub fn after_equals(&self, value: chrono::DateTime) -> TagWhereParam { - TagWhereParam::DateModifiedAfterEquals(value) - } } pub struct TagSetDateModified(chrono::DateTime); impl From for TagSetParam { @@ -19324,10 +16853,6 @@ pub enum TagWhereParam { IdGt(i32), IdGte(i32), IdNot(i32), - IdLt(i32), - IdLte(i32), - IdGt(i32), - IdGte(i32), NameEquals(String), NameInVec(Vec), NameNotInVec(Vec), @@ -19339,8 +16864,6 @@ pub enum TagWhereParam { NameStartsWith(String), NameEndsWith(String), NameNot(String), - NameHasPrefix(String), - NameHasSuffix(String), EncryptionEquals(i32), EncryptionInVec(Vec), EncryptionNotInVec(Vec), @@ -19349,10 +16872,6 @@ pub enum TagWhereParam { EncryptionGt(i32), EncryptionGte(i32), EncryptionNot(i32), - EncryptionLt(i32), - EncryptionLte(i32), - EncryptionGt(i32), - EncryptionGte(i32), TotalFilesEquals(i32), TotalFilesInVec(Vec), TotalFilesNotInVec(Vec), @@ -19361,10 +16880,6 @@ pub enum TagWhereParam { TotalFilesGt(i32), TotalFilesGte(i32), TotalFilesNot(i32), - TotalFilesLt(i32), - TotalFilesLte(i32), - TotalFilesGt(i32), - TotalFilesGte(i32), RedundancyGoalEquals(i32), RedundancyGoalInVec(Vec), RedundancyGoalNotInVec(Vec), @@ -19373,10 +16888,6 @@ pub enum TagWhereParam { RedundancyGoalGt(i32), RedundancyGoalGte(i32), RedundancyGoalNot(i32), - RedundancyGoalLt(i32), - RedundancyGoalLte(i32), - RedundancyGoalGt(i32), - RedundancyGoalGte(i32), DateCreatedEquals(chrono::DateTime), DateCreatedInVec(Vec>), DateCreatedNotInVec(Vec>), @@ -19385,10 +16896,6 @@ pub enum TagWhereParam { DateCreatedGt(chrono::DateTime), DateCreatedGte(chrono::DateTime), DateCreatedNot(chrono::DateTime), - DateCreatedBefore(chrono::DateTime), - DateCreatedAfter(chrono::DateTime), - DateCreatedBeforeEquals(chrono::DateTime), - DateCreatedAfterEquals(chrono::DateTime), DateModifiedEquals(chrono::DateTime), DateModifiedInVec(Vec>), DateModifiedNotInVec(Vec>), @@ -19397,10 +16904,6 @@ pub enum TagWhereParam { DateModifiedGt(chrono::DateTime), DateModifiedGte(chrono::DateTime), DateModifiedNot(chrono::DateTime), - DateModifiedBefore(chrono::DateTime), - DateModifiedAfter(chrono::DateTime), - DateModifiedBeforeEquals(chrono::DateTime), - DateModifiedAfterEquals(chrono::DateTime), TagFilesSome(Vec), TagFilesEvery(Vec), } @@ -19518,42 +17021,6 @@ impl TagWhereParam { }]), ..Default::default() }, - Self::IdLt(value) => Field { - name: "id".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::IdLte(value) => Field { - name: "id".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::IdGt(value) => Field { - name: "id".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::IdGte(value) => Field { - name: "id".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::NameEquals(value) => Field { name: "name".into(), fields: Some(vec![Field { @@ -19671,24 +17138,6 @@ impl TagWhereParam { }]), ..Default::default() }, - Self::NameHasPrefix(value) => Field { - name: "name".into(), - fields: Some(vec![Field { - name: "starts_with".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::NameHasSuffix(value) => Field { - name: "name".into(), - fields: Some(vec![Field { - name: "ends_with".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::EncryptionEquals(value) => Field { name: "encryption".into(), fields: Some(vec![Field { @@ -19779,42 +17228,6 @@ impl TagWhereParam { }]), ..Default::default() }, - Self::EncryptionLt(value) => Field { - name: "encryption".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::EncryptionLte(value) => Field { - name: "encryption".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::EncryptionGt(value) => Field { - name: "encryption".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::EncryptionGte(value) => Field { - name: "encryption".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::TotalFilesEquals(value) => Field { name: "total_files".into(), fields: Some(vec![Field { @@ -19905,42 +17318,6 @@ impl TagWhereParam { }]), ..Default::default() }, - Self::TotalFilesLt(value) => Field { - name: "total_files".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::TotalFilesLte(value) => Field { - name: "total_files".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::TotalFilesGt(value) => Field { - name: "total_files".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::TotalFilesGte(value) => Field { - name: "total_files".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::RedundancyGoalEquals(value) => Field { name: "redundancy_goal".into(), fields: Some(vec![Field { @@ -20031,42 +17408,6 @@ impl TagWhereParam { }]), ..Default::default() }, - Self::RedundancyGoalLt(value) => Field { - name: "redundancy_goal".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::RedundancyGoalLte(value) => Field { - name: "redundancy_goal".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::RedundancyGoalGt(value) => Field { - name: "redundancy_goal".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::RedundancyGoalGte(value) => Field { - name: "redundancy_goal".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::DateCreatedEquals(value) => Field { name: "date_created".into(), fields: Some(vec![Field { @@ -20157,42 +17498,6 @@ impl TagWhereParam { }]), ..Default::default() }, - Self::DateCreatedBefore(value) => Field { - name: "date_created".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateCreatedAfter(value) => Field { - name: "date_created".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateCreatedBeforeEquals(value) => Field { - name: "date_created".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateCreatedAfterEquals(value) => Field { - name: "date_created".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::DateModifiedEquals(value) => Field { name: "date_modified".into(), fields: Some(vec![Field { @@ -20283,42 +17588,6 @@ impl TagWhereParam { }]), ..Default::default() }, - Self::DateModifiedBefore(value) => Field { - name: "date_modified".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateModifiedAfter(value) => Field { - name: "date_modified".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateModifiedBeforeEquals(value) => Field { - name: "date_modified".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateModifiedAfterEquals(value) => Field { - name: "date_modified".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::TagFilesSome(value) => Field { name: "tag_files".into(), fields: Some(vec![Field { @@ -20465,7 +17734,7 @@ pub struct TagFindFirst<'a> { with_params: Vec, } impl<'a> TagFindFirst<'a> { - pub async fn exec(self) -> QueryResult { + pub async fn exec(self) -> QueryResult> { let Self { mut query, order_by_params, @@ -20524,7 +17793,7 @@ pub struct TagFindUnique<'a> { with_params: Vec, } impl<'a> TagFindUnique<'a> { - pub async fn exec(self) -> QueryResult { + pub async fn exec(self) -> QueryResult> { let Self { mut query, with_params, @@ -20647,7 +17916,7 @@ impl<'a> TagUpsertOne<'a> { }); self } - pub fn update(mut self, params: Vec) -> Self { + pub fn update(mut self, params: Vec) -> Self { self.query.inputs.push(Input { name: "update".into(), fields: params @@ -20920,24 +18189,6 @@ impl TagOnFileDateCreatedField { pub fn not(&self, value: chrono::DateTime) -> TagOnFileWhereParam { TagOnFileWhereParam::DateCreatedNot(value) } - pub fn before(&self, value: chrono::DateTime) -> TagOnFileWhereParam { - TagOnFileWhereParam::DateCreatedBefore(value) - } - pub fn after(&self, value: chrono::DateTime) -> TagOnFileWhereParam { - TagOnFileWhereParam::DateCreatedAfter(value) - } - pub fn before_equals( - &self, - value: chrono::DateTime, - ) -> TagOnFileWhereParam { - TagOnFileWhereParam::DateCreatedBeforeEquals(value) - } - pub fn after_equals( - &self, - value: chrono::DateTime, - ) -> TagOnFileWhereParam { - TagOnFileWhereParam::DateCreatedAfterEquals(value) - } } pub struct TagOnFileSetDateCreated(chrono::DateTime); impl From for TagOnFileSetParam { @@ -20960,16 +18211,16 @@ impl TagOnFileTagIdField { TagOnFileCursor::TagId(cursor) } pub fn increment(&self, value: i32) -> TagOnFileSetParam { - TagOnFileSetParam::TagId(value) + TagOnFileSetParam::SetTagId(value) } pub fn decrement(&self, value: i32) -> TagOnFileSetParam { - TagOnFileSetParam::TagId(value) + TagOnFileSetParam::SetTagId(value) } pub fn multiply(&self, value: i32) -> TagOnFileSetParam { - TagOnFileSetParam::TagId(value) + TagOnFileSetParam::SetTagId(value) } pub fn divide(&self, value: i32) -> TagOnFileSetParam { - TagOnFileSetParam::TagId(value) + TagOnFileSetParam::SetTagId(value) } pub fn in_vec(&self, value: Vec) -> TagOnFileWhereParam { TagOnFileWhereParam::TagIdInVec(value) @@ -20992,18 +18243,6 @@ impl TagOnFileTagIdField { pub fn not(&self, value: i32) -> TagOnFileWhereParam { TagOnFileWhereParam::TagIdNot(value) } - pub fn lt(&self, value: i32) -> TagOnFileWhereParam { - TagOnFileWhereParam::TagIdLt(value) - } - pub fn lte(&self, value: i32) -> TagOnFileWhereParam { - TagOnFileWhereParam::TagIdLte(value) - } - pub fn gt(&self, value: i32) -> TagOnFileWhereParam { - TagOnFileWhereParam::TagIdGt(value) - } - pub fn gte(&self, value: i32) -> TagOnFileWhereParam { - TagOnFileWhereParam::TagIdGte(value) - } } pub struct TagOnFileSetTagId(i32); impl From for TagOnFileSetParam { @@ -21044,16 +18283,16 @@ impl TagOnFileFileIdField { TagOnFileCursor::FileId(cursor) } pub fn increment(&self, value: i32) -> TagOnFileSetParam { - TagOnFileSetParam::FileId(value) + TagOnFileSetParam::SetFileId(value) } pub fn decrement(&self, value: i32) -> TagOnFileSetParam { - TagOnFileSetParam::FileId(value) + TagOnFileSetParam::SetFileId(value) } pub fn multiply(&self, value: i32) -> TagOnFileSetParam { - TagOnFileSetParam::FileId(value) + TagOnFileSetParam::SetFileId(value) } pub fn divide(&self, value: i32) -> TagOnFileSetParam { - TagOnFileSetParam::FileId(value) + TagOnFileSetParam::SetFileId(value) } pub fn in_vec(&self, value: Vec) -> TagOnFileWhereParam { TagOnFileWhereParam::FileIdInVec(value) @@ -21076,18 +18315,6 @@ impl TagOnFileFileIdField { pub fn not(&self, value: i32) -> TagOnFileWhereParam { TagOnFileWhereParam::FileIdNot(value) } - pub fn lt(&self, value: i32) -> TagOnFileWhereParam { - TagOnFileWhereParam::FileIdLt(value) - } - pub fn lte(&self, value: i32) -> TagOnFileWhereParam { - TagOnFileWhereParam::FileIdLte(value) - } - pub fn gt(&self, value: i32) -> TagOnFileWhereParam { - TagOnFileWhereParam::FileIdGt(value) - } - pub fn gte(&self, value: i32) -> TagOnFileWhereParam { - TagOnFileWhereParam::FileIdGte(value) - } } pub struct TagOnFileSetFileId(i32); impl From for TagOnFileSetParam { @@ -21249,10 +18476,6 @@ pub enum TagOnFileWhereParam { DateCreatedGt(chrono::DateTime), DateCreatedGte(chrono::DateTime), DateCreatedNot(chrono::DateTime), - DateCreatedBefore(chrono::DateTime), - DateCreatedAfter(chrono::DateTime), - DateCreatedBeforeEquals(chrono::DateTime), - DateCreatedAfterEquals(chrono::DateTime), TagIdEquals(i32), TagIdInVec(Vec), TagIdNotInVec(Vec), @@ -21261,10 +18484,6 @@ pub enum TagOnFileWhereParam { TagIdGt(i32), TagIdGte(i32), TagIdNot(i32), - TagIdLt(i32), - TagIdLte(i32), - TagIdGt(i32), - TagIdGte(i32), TagIs(Vec), FileIdEquals(i32), FileIdInVec(Vec), @@ -21274,10 +18493,6 @@ pub enum TagOnFileWhereParam { FileIdGt(i32), FileIdGte(i32), FileIdNot(i32), - FileIdLt(i32), - FileIdLte(i32), - FileIdGt(i32), - FileIdGte(i32), FileIs(Vec), } impl TagOnFileWhereParam { @@ -21394,42 +18609,6 @@ impl TagOnFileWhereParam { }]), ..Default::default() }, - Self::DateCreatedBefore(value) => Field { - name: "date_created".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateCreatedAfter(value) => Field { - name: "date_created".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateCreatedBeforeEquals(value) => Field { - name: "date_created".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateCreatedAfterEquals(value) => Field { - name: "date_created".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::TagIdEquals(value) => Field { name: "tag_id".into(), fields: Some(vec![Field { @@ -21520,42 +18699,6 @@ impl TagOnFileWhereParam { }]), ..Default::default() }, - Self::TagIdLt(value) => Field { - name: "tag_id".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::TagIdLte(value) => Field { - name: "tag_id".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::TagIdGt(value) => Field { - name: "tag_id".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::TagIdGte(value) => Field { - name: "tag_id".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::TagIs(value) => Field { name: "tag".into(), fields: Some(vec![Field { @@ -21655,42 +18798,6 @@ impl TagOnFileWhereParam { }]), ..Default::default() }, - Self::FileIdLt(value) => Field { - name: "file_id".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::FileIdLte(value) => Field { - name: "file_id".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::FileIdGt(value) => Field { - name: "file_id".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::FileIdGte(value) => Field { - name: "file_id".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::FileIs(value) => Field { name: "file".into(), fields: Some(vec![Field { @@ -21824,7 +18931,7 @@ pub struct TagOnFileFindFirst<'a> { with_params: Vec, } impl<'a> TagOnFileFindFirst<'a> { - pub async fn exec(self) -> QueryResult { + pub async fn exec(self) -> QueryResult> { let Self { mut query, order_by_params, @@ -21883,7 +18990,7 @@ pub struct TagOnFileFindUnique<'a> { with_params: Vec, } impl<'a> TagOnFileFindUnique<'a> { - pub async fn exec(self) -> QueryResult { + pub async fn exec(self) -> QueryResult> { let Self { mut query, with_params, @@ -22013,7 +19120,7 @@ impl<'a> TagOnFileUpsertOne<'a> { }); self } - pub fn update(mut self, params: Vec) -> Self { + pub fn update(mut self, params: Vec) -> Self { self.query.inputs.push(Input { name: "update".into(), fields: params @@ -22250,16 +19357,16 @@ impl LabelIdField { LabelCursor::Id(cursor) } pub fn increment(&self, value: i32) -> LabelSetParam { - LabelSetParam::Id(value) + LabelSetParam::SetId(value) } pub fn decrement(&self, value: i32) -> LabelSetParam { - LabelSetParam::Id(value) + LabelSetParam::SetId(value) } pub fn multiply(&self, value: i32) -> LabelSetParam { - LabelSetParam::Id(value) + LabelSetParam::SetId(value) } pub fn divide(&self, value: i32) -> LabelSetParam { - LabelSetParam::Id(value) + LabelSetParam::SetId(value) } pub fn in_vec(&self, value: Vec) -> LabelWhereParam { LabelWhereParam::IdInVec(value) @@ -22282,18 +19389,6 @@ impl LabelIdField { pub fn not(&self, value: i32) -> LabelWhereParam { LabelWhereParam::IdNot(value) } - pub fn lt(&self, value: i32) -> LabelWhereParam { - LabelWhereParam::IdLt(value) - } - pub fn lte(&self, value: i32) -> LabelWhereParam { - LabelWhereParam::IdLte(value) - } - pub fn gt(&self, value: i32) -> LabelWhereParam { - LabelWhereParam::IdGt(value) - } - pub fn gte(&self, value: i32) -> LabelWhereParam { - LabelWhereParam::IdGte(value) - } } pub struct LabelSetId(i32); impl From for LabelSetParam { @@ -22345,12 +19440,6 @@ impl LabelNameField { pub fn not(&self, value: String) -> LabelWhereParam { LabelWhereParam::NameNot(value) } - pub fn has_prefix(&self, value: String) -> LabelWhereParam { - LabelWhereParam::NameHasPrefix(value) - } - pub fn has_suffix(&self, value: String) -> LabelWhereParam { - LabelWhereParam::NameHasSuffix(value) - } } pub struct LabelSetName(String); impl From for LabelSetParam { @@ -22399,18 +19488,6 @@ impl LabelDateCreatedField { pub fn not(&self, value: chrono::DateTime) -> LabelWhereParam { LabelWhereParam::DateCreatedNot(value) } - pub fn before(&self, value: chrono::DateTime) -> LabelWhereParam { - LabelWhereParam::DateCreatedBefore(value) - } - pub fn after(&self, value: chrono::DateTime) -> LabelWhereParam { - LabelWhereParam::DateCreatedAfter(value) - } - pub fn before_equals(&self, value: chrono::DateTime) -> LabelWhereParam { - LabelWhereParam::DateCreatedBeforeEquals(value) - } - pub fn after_equals(&self, value: chrono::DateTime) -> LabelWhereParam { - LabelWhereParam::DateCreatedAfterEquals(value) - } } pub struct LabelSetDateCreated(chrono::DateTime); impl From for LabelSetParam { @@ -22459,18 +19536,6 @@ impl LabelDateModifiedField { pub fn not(&self, value: chrono::DateTime) -> LabelWhereParam { LabelWhereParam::DateModifiedNot(value) } - pub fn before(&self, value: chrono::DateTime) -> LabelWhereParam { - LabelWhereParam::DateModifiedBefore(value) - } - pub fn after(&self, value: chrono::DateTime) -> LabelWhereParam { - LabelWhereParam::DateModifiedAfter(value) - } - pub fn before_equals(&self, value: chrono::DateTime) -> LabelWhereParam { - LabelWhereParam::DateModifiedBeforeEquals(value) - } - pub fn after_equals(&self, value: chrono::DateTime) -> LabelWhereParam { - LabelWhereParam::DateModifiedAfterEquals(value) - } } pub struct LabelSetDateModified(chrono::DateTime); impl From for LabelSetParam { @@ -22679,10 +19744,6 @@ pub enum LabelWhereParam { IdGt(i32), IdGte(i32), IdNot(i32), - IdLt(i32), - IdLte(i32), - IdGt(i32), - IdGte(i32), NameEquals(String), NameInVec(Vec), NameNotInVec(Vec), @@ -22694,8 +19755,6 @@ pub enum LabelWhereParam { NameStartsWith(String), NameEndsWith(String), NameNot(String), - NameHasPrefix(String), - NameHasSuffix(String), DateCreatedEquals(chrono::DateTime), DateCreatedInVec(Vec>), DateCreatedNotInVec(Vec>), @@ -22704,10 +19763,6 @@ pub enum LabelWhereParam { DateCreatedGt(chrono::DateTime), DateCreatedGte(chrono::DateTime), DateCreatedNot(chrono::DateTime), - DateCreatedBefore(chrono::DateTime), - DateCreatedAfter(chrono::DateTime), - DateCreatedBeforeEquals(chrono::DateTime), - DateCreatedAfterEquals(chrono::DateTime), DateModifiedEquals(chrono::DateTime), DateModifiedInVec(Vec>), DateModifiedNotInVec(Vec>), @@ -22716,10 +19771,6 @@ pub enum LabelWhereParam { DateModifiedGt(chrono::DateTime), DateModifiedGte(chrono::DateTime), DateModifiedNot(chrono::DateTime), - DateModifiedBefore(chrono::DateTime), - DateModifiedAfter(chrono::DateTime), - DateModifiedBeforeEquals(chrono::DateTime), - DateModifiedAfterEquals(chrono::DateTime), LabelFilesSome(Vec), LabelFilesEvery(Vec), } @@ -22837,42 +19888,6 @@ impl LabelWhereParam { }]), ..Default::default() }, - Self::IdLt(value) => Field { - name: "id".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::IdLte(value) => Field { - name: "id".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::IdGt(value) => Field { - name: "id".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::IdGte(value) => Field { - name: "id".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::NameEquals(value) => Field { name: "name".into(), fields: Some(vec![Field { @@ -22990,24 +20005,6 @@ impl LabelWhereParam { }]), ..Default::default() }, - Self::NameHasPrefix(value) => Field { - name: "name".into(), - fields: Some(vec![Field { - name: "starts_with".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::NameHasSuffix(value) => Field { - name: "name".into(), - fields: Some(vec![Field { - name: "ends_with".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::DateCreatedEquals(value) => Field { name: "date_created".into(), fields: Some(vec![Field { @@ -23098,42 +20095,6 @@ impl LabelWhereParam { }]), ..Default::default() }, - Self::DateCreatedBefore(value) => Field { - name: "date_created".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateCreatedAfter(value) => Field { - name: "date_created".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateCreatedBeforeEquals(value) => Field { - name: "date_created".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateCreatedAfterEquals(value) => Field { - name: "date_created".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::DateModifiedEquals(value) => Field { name: "date_modified".into(), fields: Some(vec![Field { @@ -23224,42 +20185,6 @@ impl LabelWhereParam { }]), ..Default::default() }, - Self::DateModifiedBefore(value) => Field { - name: "date_modified".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateModifiedAfter(value) => Field { - name: "date_modified".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateModifiedBeforeEquals(value) => Field { - name: "date_modified".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateModifiedAfterEquals(value) => Field { - name: "date_modified".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::LabelFilesSome(value) => Field { name: "label_files".into(), fields: Some(vec![Field { @@ -23406,7 +20331,7 @@ pub struct LabelFindFirst<'a> { with_params: Vec, } impl<'a> LabelFindFirst<'a> { - pub async fn exec(self) -> QueryResult { + pub async fn exec(self) -> QueryResult> { let Self { mut query, order_by_params, @@ -23465,7 +20390,7 @@ pub struct LabelFindUnique<'a> { with_params: Vec, } impl<'a> LabelFindUnique<'a> { - pub async fn exec(self) -> QueryResult { + pub async fn exec(self) -> QueryResult> { let Self { mut query, with_params, @@ -23588,7 +20513,7 @@ impl<'a> LabelUpsertOne<'a> { }); self } - pub fn update(mut self, params: Vec) -> Self { + pub fn update(mut self, params: Vec) -> Self { self.query.inputs.push(Input { name: "update".into(), fields: params @@ -23861,24 +20786,6 @@ impl LabelOnFileDateCreatedField { pub fn not(&self, value: chrono::DateTime) -> LabelOnFileWhereParam { LabelOnFileWhereParam::DateCreatedNot(value) } - pub fn before(&self, value: chrono::DateTime) -> LabelOnFileWhereParam { - LabelOnFileWhereParam::DateCreatedBefore(value) - } - pub fn after(&self, value: chrono::DateTime) -> LabelOnFileWhereParam { - LabelOnFileWhereParam::DateCreatedAfter(value) - } - pub fn before_equals( - &self, - value: chrono::DateTime, - ) -> LabelOnFileWhereParam { - LabelOnFileWhereParam::DateCreatedBeforeEquals(value) - } - pub fn after_equals( - &self, - value: chrono::DateTime, - ) -> LabelOnFileWhereParam { - LabelOnFileWhereParam::DateCreatedAfterEquals(value) - } } pub struct LabelOnFileSetDateCreated(chrono::DateTime); impl From for LabelOnFileSetParam { @@ -23901,16 +20808,16 @@ impl LabelOnFileLabelIdField { LabelOnFileCursor::LabelId(cursor) } pub fn increment(&self, value: i32) -> LabelOnFileSetParam { - LabelOnFileSetParam::LabelId(value) + LabelOnFileSetParam::SetLabelId(value) } pub fn decrement(&self, value: i32) -> LabelOnFileSetParam { - LabelOnFileSetParam::LabelId(value) + LabelOnFileSetParam::SetLabelId(value) } pub fn multiply(&self, value: i32) -> LabelOnFileSetParam { - LabelOnFileSetParam::LabelId(value) + LabelOnFileSetParam::SetLabelId(value) } pub fn divide(&self, value: i32) -> LabelOnFileSetParam { - LabelOnFileSetParam::LabelId(value) + LabelOnFileSetParam::SetLabelId(value) } pub fn in_vec(&self, value: Vec) -> LabelOnFileWhereParam { LabelOnFileWhereParam::LabelIdInVec(value) @@ -23933,18 +20840,6 @@ impl LabelOnFileLabelIdField { pub fn not(&self, value: i32) -> LabelOnFileWhereParam { LabelOnFileWhereParam::LabelIdNot(value) } - pub fn lt(&self, value: i32) -> LabelOnFileWhereParam { - LabelOnFileWhereParam::LabelIdLt(value) - } - pub fn lte(&self, value: i32) -> LabelOnFileWhereParam { - LabelOnFileWhereParam::LabelIdLte(value) - } - pub fn gt(&self, value: i32) -> LabelOnFileWhereParam { - LabelOnFileWhereParam::LabelIdGt(value) - } - pub fn gte(&self, value: i32) -> LabelOnFileWhereParam { - LabelOnFileWhereParam::LabelIdGte(value) - } } pub struct LabelOnFileSetLabelId(i32); impl From for LabelOnFileSetParam { @@ -23985,16 +20880,16 @@ impl LabelOnFileFileIdField { LabelOnFileCursor::FileId(cursor) } pub fn increment(&self, value: i32) -> LabelOnFileSetParam { - LabelOnFileSetParam::FileId(value) + LabelOnFileSetParam::SetFileId(value) } pub fn decrement(&self, value: i32) -> LabelOnFileSetParam { - LabelOnFileSetParam::FileId(value) + LabelOnFileSetParam::SetFileId(value) } pub fn multiply(&self, value: i32) -> LabelOnFileSetParam { - LabelOnFileSetParam::FileId(value) + LabelOnFileSetParam::SetFileId(value) } pub fn divide(&self, value: i32) -> LabelOnFileSetParam { - LabelOnFileSetParam::FileId(value) + LabelOnFileSetParam::SetFileId(value) } pub fn in_vec(&self, value: Vec) -> LabelOnFileWhereParam { LabelOnFileWhereParam::FileIdInVec(value) @@ -24017,18 +20912,6 @@ impl LabelOnFileFileIdField { pub fn not(&self, value: i32) -> LabelOnFileWhereParam { LabelOnFileWhereParam::FileIdNot(value) } - pub fn lt(&self, value: i32) -> LabelOnFileWhereParam { - LabelOnFileWhereParam::FileIdLt(value) - } - pub fn lte(&self, value: i32) -> LabelOnFileWhereParam { - LabelOnFileWhereParam::FileIdLte(value) - } - pub fn gt(&self, value: i32) -> LabelOnFileWhereParam { - LabelOnFileWhereParam::FileIdGt(value) - } - pub fn gte(&self, value: i32) -> LabelOnFileWhereParam { - LabelOnFileWhereParam::FileIdGte(value) - } } pub struct LabelOnFileSetFileId(i32); impl From for LabelOnFileSetParam { @@ -24190,10 +21073,6 @@ pub enum LabelOnFileWhereParam { DateCreatedGt(chrono::DateTime), DateCreatedGte(chrono::DateTime), DateCreatedNot(chrono::DateTime), - DateCreatedBefore(chrono::DateTime), - DateCreatedAfter(chrono::DateTime), - DateCreatedBeforeEquals(chrono::DateTime), - DateCreatedAfterEquals(chrono::DateTime), LabelIdEquals(i32), LabelIdInVec(Vec), LabelIdNotInVec(Vec), @@ -24202,10 +21081,6 @@ pub enum LabelOnFileWhereParam { LabelIdGt(i32), LabelIdGte(i32), LabelIdNot(i32), - LabelIdLt(i32), - LabelIdLte(i32), - LabelIdGt(i32), - LabelIdGte(i32), LabelIs(Vec), FileIdEquals(i32), FileIdInVec(Vec), @@ -24215,10 +21090,6 @@ pub enum LabelOnFileWhereParam { FileIdGt(i32), FileIdGte(i32), FileIdNot(i32), - FileIdLt(i32), - FileIdLte(i32), - FileIdGt(i32), - FileIdGte(i32), FileIs(Vec), } impl LabelOnFileWhereParam { @@ -24335,42 +21206,6 @@ impl LabelOnFileWhereParam { }]), ..Default::default() }, - Self::DateCreatedBefore(value) => Field { - name: "date_created".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateCreatedAfter(value) => Field { - name: "date_created".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateCreatedBeforeEquals(value) => Field { - name: "date_created".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateCreatedAfterEquals(value) => Field { - name: "date_created".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::LabelIdEquals(value) => Field { name: "label_id".into(), fields: Some(vec![Field { @@ -24461,42 +21296,6 @@ impl LabelOnFileWhereParam { }]), ..Default::default() }, - Self::LabelIdLt(value) => Field { - name: "label_id".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::LabelIdLte(value) => Field { - name: "label_id".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::LabelIdGt(value) => Field { - name: "label_id".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::LabelIdGte(value) => Field { - name: "label_id".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::LabelIs(value) => Field { name: "label".into(), fields: Some(vec![Field { @@ -24596,42 +21395,6 @@ impl LabelOnFileWhereParam { }]), ..Default::default() }, - Self::FileIdLt(value) => Field { - name: "file_id".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::FileIdLte(value) => Field { - name: "file_id".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::FileIdGt(value) => Field { - name: "file_id".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::FileIdGte(value) => Field { - name: "file_id".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::FileIs(value) => Field { name: "file".into(), fields: Some(vec![Field { @@ -24768,7 +21531,7 @@ pub struct LabelOnFileFindFirst<'a> { with_params: Vec, } impl<'a> LabelOnFileFindFirst<'a> { - pub async fn exec(self) -> QueryResult { + pub async fn exec(self) -> QueryResult> { let Self { mut query, order_by_params, @@ -24827,7 +21590,7 @@ pub struct LabelOnFileFindUnique<'a> { with_params: Vec, } impl<'a> LabelOnFileFindUnique<'a> { - pub async fn exec(self) -> QueryResult { + pub async fn exec(self) -> QueryResult> { let Self { mut query, with_params, @@ -24960,7 +21723,7 @@ impl<'a> LabelOnFileUpsertOne<'a> { }); self } - pub fn update(mut self, params: Vec) -> Self { + pub fn update(mut self, params: Vec) -> Self { self.query.inputs.push(Input { name: "update".into(), fields: params @@ -25244,12 +22007,6 @@ impl JobIdField { pub fn not(&self, value: String) -> JobWhereParam { JobWhereParam::IdNot(value) } - pub fn has_prefix(&self, value: String) -> JobWhereParam { - JobWhereParam::IdHasPrefix(value) - } - pub fn has_suffix(&self, value: String) -> JobWhereParam { - JobWhereParam::IdHasSuffix(value) - } } pub struct JobSetId(String); impl From for JobSetParam { @@ -25272,16 +22029,16 @@ impl JobActionField { JobCursor::Action(cursor) } pub fn increment(&self, value: i32) -> JobSetParam { - JobSetParam::Action(value) + JobSetParam::SetAction(value) } pub fn decrement(&self, value: i32) -> JobSetParam { - JobSetParam::Action(value) + JobSetParam::SetAction(value) } pub fn multiply(&self, value: i32) -> JobSetParam { - JobSetParam::Action(value) + JobSetParam::SetAction(value) } pub fn divide(&self, value: i32) -> JobSetParam { - JobSetParam::Action(value) + JobSetParam::SetAction(value) } pub fn in_vec(&self, value: Vec) -> JobWhereParam { JobWhereParam::ActionInVec(value) @@ -25304,18 +22061,6 @@ impl JobActionField { pub fn not(&self, value: i32) -> JobWhereParam { JobWhereParam::ActionNot(value) } - pub fn lt(&self, value: i32) -> JobWhereParam { - JobWhereParam::ActionLt(value) - } - pub fn lte(&self, value: i32) -> JobWhereParam { - JobWhereParam::ActionLte(value) - } - pub fn gt(&self, value: i32) -> JobWhereParam { - JobWhereParam::ActionGt(value) - } - pub fn gte(&self, value: i32) -> JobWhereParam { - JobWhereParam::ActionGte(value) - } } pub struct JobSetAction(i32); impl From for JobSetParam { @@ -25338,16 +22083,16 @@ impl JobStatusField { JobCursor::Status(cursor) } pub fn increment(&self, value: i32) -> JobSetParam { - JobSetParam::Status(value) + JobSetParam::SetStatus(value) } pub fn decrement(&self, value: i32) -> JobSetParam { - JobSetParam::Status(value) + JobSetParam::SetStatus(value) } pub fn multiply(&self, value: i32) -> JobSetParam { - JobSetParam::Status(value) + JobSetParam::SetStatus(value) } pub fn divide(&self, value: i32) -> JobSetParam { - JobSetParam::Status(value) + JobSetParam::SetStatus(value) } pub fn in_vec(&self, value: Vec) -> JobWhereParam { JobWhereParam::StatusInVec(value) @@ -25370,18 +22115,6 @@ impl JobStatusField { pub fn not(&self, value: i32) -> JobWhereParam { JobWhereParam::StatusNot(value) } - pub fn lt(&self, value: i32) -> JobWhereParam { - JobWhereParam::StatusLt(value) - } - pub fn lte(&self, value: i32) -> JobWhereParam { - JobWhereParam::StatusLte(value) - } - pub fn gt(&self, value: i32) -> JobWhereParam { - JobWhereParam::StatusGt(value) - } - pub fn gte(&self, value: i32) -> JobWhereParam { - JobWhereParam::StatusGte(value) - } } pub struct JobSetStatus(i32); impl From for JobSetParam { @@ -25404,16 +22137,16 @@ impl JobTaskCountField { JobCursor::TaskCount(cursor) } pub fn increment(&self, value: i32) -> JobSetParam { - JobSetParam::TaskCount(value) + JobSetParam::SetTaskCount(value) } pub fn decrement(&self, value: i32) -> JobSetParam { - JobSetParam::TaskCount(value) + JobSetParam::SetTaskCount(value) } pub fn multiply(&self, value: i32) -> JobSetParam { - JobSetParam::TaskCount(value) + JobSetParam::SetTaskCount(value) } pub fn divide(&self, value: i32) -> JobSetParam { - JobSetParam::TaskCount(value) + JobSetParam::SetTaskCount(value) } pub fn in_vec(&self, value: Vec) -> JobWhereParam { JobWhereParam::TaskCountInVec(value) @@ -25436,18 +22169,6 @@ impl JobTaskCountField { pub fn not(&self, value: i32) -> JobWhereParam { JobWhereParam::TaskCountNot(value) } - pub fn lt(&self, value: i32) -> JobWhereParam { - JobWhereParam::TaskCountLt(value) - } - pub fn lte(&self, value: i32) -> JobWhereParam { - JobWhereParam::TaskCountLte(value) - } - pub fn gt(&self, value: i32) -> JobWhereParam { - JobWhereParam::TaskCountGt(value) - } - pub fn gte(&self, value: i32) -> JobWhereParam { - JobWhereParam::TaskCountGte(value) - } } pub struct JobSetTaskCount(i32); impl From for JobSetParam { @@ -25470,16 +22191,16 @@ impl JobCompletedTaskCountField { JobCursor::CompletedTaskCount(cursor) } pub fn increment(&self, value: i32) -> JobSetParam { - JobSetParam::CompletedTaskCount(value) + JobSetParam::SetCompletedTaskCount(value) } pub fn decrement(&self, value: i32) -> JobSetParam { - JobSetParam::CompletedTaskCount(value) + JobSetParam::SetCompletedTaskCount(value) } pub fn multiply(&self, value: i32) -> JobSetParam { - JobSetParam::CompletedTaskCount(value) + JobSetParam::SetCompletedTaskCount(value) } pub fn divide(&self, value: i32) -> JobSetParam { - JobSetParam::CompletedTaskCount(value) + JobSetParam::SetCompletedTaskCount(value) } pub fn in_vec(&self, value: Vec) -> JobWhereParam { JobWhereParam::CompletedTaskCountInVec(value) @@ -25502,18 +22223,6 @@ impl JobCompletedTaskCountField { pub fn not(&self, value: i32) -> JobWhereParam { JobWhereParam::CompletedTaskCountNot(value) } - pub fn lt(&self, value: i32) -> JobWhereParam { - JobWhereParam::CompletedTaskCountLt(value) - } - pub fn lte(&self, value: i32) -> JobWhereParam { - JobWhereParam::CompletedTaskCountLte(value) - } - pub fn gt(&self, value: i32) -> JobWhereParam { - JobWhereParam::CompletedTaskCountGt(value) - } - pub fn gte(&self, value: i32) -> JobWhereParam { - JobWhereParam::CompletedTaskCountGte(value) - } } pub struct JobSetCompletedTaskCount(i32); impl From for JobSetParam { @@ -25559,18 +22268,6 @@ impl JobDateCreatedField { pub fn not(&self, value: chrono::DateTime) -> JobWhereParam { JobWhereParam::DateCreatedNot(value) } - pub fn before(&self, value: chrono::DateTime) -> JobWhereParam { - JobWhereParam::DateCreatedBefore(value) - } - pub fn after(&self, value: chrono::DateTime) -> JobWhereParam { - JobWhereParam::DateCreatedAfter(value) - } - pub fn before_equals(&self, value: chrono::DateTime) -> JobWhereParam { - JobWhereParam::DateCreatedBeforeEquals(value) - } - pub fn after_equals(&self, value: chrono::DateTime) -> JobWhereParam { - JobWhereParam::DateCreatedAfterEquals(value) - } } pub struct JobSetDateCreated(chrono::DateTime); impl From for JobSetParam { @@ -25616,18 +22313,6 @@ impl JobDateModifiedField { pub fn not(&self, value: chrono::DateTime) -> JobWhereParam { JobWhereParam::DateModifiedNot(value) } - pub fn before(&self, value: chrono::DateTime) -> JobWhereParam { - JobWhereParam::DateModifiedBefore(value) - } - pub fn after(&self, value: chrono::DateTime) -> JobWhereParam { - JobWhereParam::DateModifiedAfter(value) - } - pub fn before_equals(&self, value: chrono::DateTime) -> JobWhereParam { - JobWhereParam::DateModifiedBeforeEquals(value) - } - pub fn after_equals(&self, value: chrono::DateTime) -> JobWhereParam { - JobWhereParam::DateModifiedAfterEquals(value) - } } pub struct JobSetDateModified(chrono::DateTime); impl From for JobSetParam { @@ -25650,16 +22335,16 @@ impl JobSecondsElapsedField { JobCursor::SecondsElapsed(cursor) } pub fn increment(&self, value: i32) -> JobSetParam { - JobSetParam::SecondsElapsed(value) + JobSetParam::SetSecondsElapsed(value) } pub fn decrement(&self, value: i32) -> JobSetParam { - JobSetParam::SecondsElapsed(value) + JobSetParam::SetSecondsElapsed(value) } pub fn multiply(&self, value: i32) -> JobSetParam { - JobSetParam::SecondsElapsed(value) + JobSetParam::SetSecondsElapsed(value) } pub fn divide(&self, value: i32) -> JobSetParam { - JobSetParam::SecondsElapsed(value) + JobSetParam::SetSecondsElapsed(value) } pub fn in_vec(&self, value: Vec) -> JobWhereParam { JobWhereParam::SecondsElapsedInVec(value) @@ -25682,18 +22367,6 @@ impl JobSecondsElapsedField { pub fn not(&self, value: i32) -> JobWhereParam { JobWhereParam::SecondsElapsedNot(value) } - pub fn lt(&self, value: i32) -> JobWhereParam { - JobWhereParam::SecondsElapsedLt(value) - } - pub fn lte(&self, value: i32) -> JobWhereParam { - JobWhereParam::SecondsElapsedLte(value) - } - pub fn gt(&self, value: i32) -> JobWhereParam { - JobWhereParam::SecondsElapsedGt(value) - } - pub fn gte(&self, value: i32) -> JobWhereParam { - JobWhereParam::SecondsElapsedGte(value) - } } pub struct JobSetSecondsElapsed(i32); impl From for JobSetParam { @@ -25890,8 +22563,6 @@ pub enum JobWhereParam { IdStartsWith(String), IdEndsWith(String), IdNot(String), - IdHasPrefix(String), - IdHasSuffix(String), ActionEquals(i32), ActionInVec(Vec), ActionNotInVec(Vec), @@ -25900,10 +22571,6 @@ pub enum JobWhereParam { ActionGt(i32), ActionGte(i32), ActionNot(i32), - ActionLt(i32), - ActionLte(i32), - ActionGt(i32), - ActionGte(i32), StatusEquals(i32), StatusInVec(Vec), StatusNotInVec(Vec), @@ -25912,10 +22579,6 @@ pub enum JobWhereParam { StatusGt(i32), StatusGte(i32), StatusNot(i32), - StatusLt(i32), - StatusLte(i32), - StatusGt(i32), - StatusGte(i32), TaskCountEquals(i32), TaskCountInVec(Vec), TaskCountNotInVec(Vec), @@ -25924,10 +22587,6 @@ pub enum JobWhereParam { TaskCountGt(i32), TaskCountGte(i32), TaskCountNot(i32), - TaskCountLt(i32), - TaskCountLte(i32), - TaskCountGt(i32), - TaskCountGte(i32), CompletedTaskCountEquals(i32), CompletedTaskCountInVec(Vec), CompletedTaskCountNotInVec(Vec), @@ -25936,10 +22595,6 @@ pub enum JobWhereParam { CompletedTaskCountGt(i32), CompletedTaskCountGte(i32), CompletedTaskCountNot(i32), - CompletedTaskCountLt(i32), - CompletedTaskCountLte(i32), - CompletedTaskCountGt(i32), - CompletedTaskCountGte(i32), DateCreatedEquals(chrono::DateTime), DateCreatedInVec(Vec>), DateCreatedNotInVec(Vec>), @@ -25948,10 +22603,6 @@ pub enum JobWhereParam { DateCreatedGt(chrono::DateTime), DateCreatedGte(chrono::DateTime), DateCreatedNot(chrono::DateTime), - DateCreatedBefore(chrono::DateTime), - DateCreatedAfter(chrono::DateTime), - DateCreatedBeforeEquals(chrono::DateTime), - DateCreatedAfterEquals(chrono::DateTime), DateModifiedEquals(chrono::DateTime), DateModifiedInVec(Vec>), DateModifiedNotInVec(Vec>), @@ -25960,10 +22611,6 @@ pub enum JobWhereParam { DateModifiedGt(chrono::DateTime), DateModifiedGte(chrono::DateTime), DateModifiedNot(chrono::DateTime), - DateModifiedBefore(chrono::DateTime), - DateModifiedAfter(chrono::DateTime), - DateModifiedBeforeEquals(chrono::DateTime), - DateModifiedAfterEquals(chrono::DateTime), SecondsElapsedEquals(i32), SecondsElapsedInVec(Vec), SecondsElapsedNotInVec(Vec), @@ -25972,10 +22619,6 @@ pub enum JobWhereParam { SecondsElapsedGt(i32), SecondsElapsedGte(i32), SecondsElapsedNot(i32), - SecondsElapsedLt(i32), - SecondsElapsedLte(i32), - SecondsElapsedGt(i32), - SecondsElapsedGte(i32), } impl JobWhereParam { pub fn to_field(&self) -> Field { @@ -26118,24 +22761,6 @@ impl JobWhereParam { }]), ..Default::default() }, - Self::IdHasPrefix(value) => Field { - name: "id".into(), - fields: Some(vec![Field { - name: "starts_with".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::IdHasSuffix(value) => Field { - name: "id".into(), - fields: Some(vec![Field { - name: "ends_with".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::ActionEquals(value) => Field { name: "action".into(), fields: Some(vec![Field { @@ -26226,42 +22851,6 @@ impl JobWhereParam { }]), ..Default::default() }, - Self::ActionLt(value) => Field { - name: "action".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::ActionLte(value) => Field { - name: "action".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::ActionGt(value) => Field { - name: "action".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::ActionGte(value) => Field { - name: "action".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::StatusEquals(value) => Field { name: "status".into(), fields: Some(vec![Field { @@ -26352,42 +22941,6 @@ impl JobWhereParam { }]), ..Default::default() }, - Self::StatusLt(value) => Field { - name: "status".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::StatusLte(value) => Field { - name: "status".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::StatusGt(value) => Field { - name: "status".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::StatusGte(value) => Field { - name: "status".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::TaskCountEquals(value) => Field { name: "task_count".into(), fields: Some(vec![Field { @@ -26478,42 +23031,6 @@ impl JobWhereParam { }]), ..Default::default() }, - Self::TaskCountLt(value) => Field { - name: "task_count".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::TaskCountLte(value) => Field { - name: "task_count".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::TaskCountGt(value) => Field { - name: "task_count".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::TaskCountGte(value) => Field { - name: "task_count".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::CompletedTaskCountEquals(value) => Field { name: "completed_task_count".into(), fields: Some(vec![Field { @@ -26604,42 +23121,6 @@ impl JobWhereParam { }]), ..Default::default() }, - Self::CompletedTaskCountLt(value) => Field { - name: "completed_task_count".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::CompletedTaskCountLte(value) => Field { - name: "completed_task_count".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::CompletedTaskCountGt(value) => Field { - name: "completed_task_count".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::CompletedTaskCountGte(value) => Field { - name: "completed_task_count".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::DateCreatedEquals(value) => Field { name: "date_created".into(), fields: Some(vec![Field { @@ -26730,42 +23211,6 @@ impl JobWhereParam { }]), ..Default::default() }, - Self::DateCreatedBefore(value) => Field { - name: "date_created".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateCreatedAfter(value) => Field { - name: "date_created".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateCreatedBeforeEquals(value) => Field { - name: "date_created".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateCreatedAfterEquals(value) => Field { - name: "date_created".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::DateModifiedEquals(value) => Field { name: "date_modified".into(), fields: Some(vec![Field { @@ -26856,42 +23301,6 @@ impl JobWhereParam { }]), ..Default::default() }, - Self::DateModifiedBefore(value) => Field { - name: "date_modified".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateModifiedAfter(value) => Field { - name: "date_modified".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateModifiedBeforeEquals(value) => Field { - name: "date_modified".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateModifiedAfterEquals(value) => Field { - name: "date_modified".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::SecondsElapsedEquals(value) => Field { name: "seconds_elapsed".into(), fields: Some(vec![Field { @@ -26982,42 +23391,6 @@ impl JobWhereParam { }]), ..Default::default() }, - Self::SecondsElapsedLt(value) => Field { - name: "seconds_elapsed".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::SecondsElapsedLte(value) => Field { - name: "seconds_elapsed".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::SecondsElapsedGt(value) => Field { - name: "seconds_elapsed".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::SecondsElapsedGte(value) => Field { - name: "seconds_elapsed".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, } } } @@ -27146,7 +23519,7 @@ pub struct JobFindFirst<'a> { with_params: Vec, } impl<'a> JobFindFirst<'a> { - pub async fn exec(self) -> QueryResult { + pub async fn exec(self) -> QueryResult> { let Self { mut query, order_by_params, @@ -27205,7 +23578,7 @@ pub struct JobFindUnique<'a> { with_params: Vec, } impl<'a> JobFindUnique<'a> { - pub async fn exec(self) -> QueryResult { + pub async fn exec(self) -> QueryResult> { let Self { mut query, with_params, @@ -27335,7 +23708,7 @@ impl<'a> JobUpsertOne<'a> { }); self } - pub fn update(mut self, params: Vec) -> Self { + pub fn update(mut self, params: Vec) -> Self { self.query.inputs.push(Input { name: "update".into(), fields: params @@ -27584,16 +23957,16 @@ impl SpaceIdField { SpaceCursor::Id(cursor) } pub fn increment(&self, value: i32) -> SpaceSetParam { - SpaceSetParam::Id(value) + SpaceSetParam::SetId(value) } pub fn decrement(&self, value: i32) -> SpaceSetParam { - SpaceSetParam::Id(value) + SpaceSetParam::SetId(value) } pub fn multiply(&self, value: i32) -> SpaceSetParam { - SpaceSetParam::Id(value) + SpaceSetParam::SetId(value) } pub fn divide(&self, value: i32) -> SpaceSetParam { - SpaceSetParam::Id(value) + SpaceSetParam::SetId(value) } pub fn in_vec(&self, value: Vec) -> SpaceWhereParam { SpaceWhereParam::IdInVec(value) @@ -27616,18 +23989,6 @@ impl SpaceIdField { pub fn not(&self, value: i32) -> SpaceWhereParam { SpaceWhereParam::IdNot(value) } - pub fn lt(&self, value: i32) -> SpaceWhereParam { - SpaceWhereParam::IdLt(value) - } - pub fn lte(&self, value: i32) -> SpaceWhereParam { - SpaceWhereParam::IdLte(value) - } - pub fn gt(&self, value: i32) -> SpaceWhereParam { - SpaceWhereParam::IdGt(value) - } - pub fn gte(&self, value: i32) -> SpaceWhereParam { - SpaceWhereParam::IdGte(value) - } } pub struct SpaceSetId(i32); impl From for SpaceSetParam { @@ -27679,12 +24040,6 @@ impl SpaceNameField { pub fn not(&self, value: String) -> SpaceWhereParam { SpaceWhereParam::NameNot(value) } - pub fn has_prefix(&self, value: String) -> SpaceWhereParam { - SpaceWhereParam::NameHasPrefix(value) - } - pub fn has_suffix(&self, value: String) -> SpaceWhereParam { - SpaceWhereParam::NameHasSuffix(value) - } } pub struct SpaceSetName(String); impl From for SpaceSetParam { @@ -27707,16 +24062,16 @@ impl SpaceEncryptionField { SpaceCursor::Encryption(cursor) } pub fn increment(&self, value: i32) -> SpaceSetParam { - SpaceSetParam::Encryption(value) + SpaceSetParam::SetEncryption(value) } pub fn decrement(&self, value: i32) -> SpaceSetParam { - SpaceSetParam::Encryption(value) + SpaceSetParam::SetEncryption(value) } pub fn multiply(&self, value: i32) -> SpaceSetParam { - SpaceSetParam::Encryption(value) + SpaceSetParam::SetEncryption(value) } pub fn divide(&self, value: i32) -> SpaceSetParam { - SpaceSetParam::Encryption(value) + SpaceSetParam::SetEncryption(value) } pub fn in_vec(&self, value: Vec) -> SpaceWhereParam { SpaceWhereParam::EncryptionInVec(value) @@ -27739,18 +24094,6 @@ impl SpaceEncryptionField { pub fn not(&self, value: i32) -> SpaceWhereParam { SpaceWhereParam::EncryptionNot(value) } - pub fn lt(&self, value: i32) -> SpaceWhereParam { - SpaceWhereParam::EncryptionLt(value) - } - pub fn lte(&self, value: i32) -> SpaceWhereParam { - SpaceWhereParam::EncryptionLte(value) - } - pub fn gt(&self, value: i32) -> SpaceWhereParam { - SpaceWhereParam::EncryptionGt(value) - } - pub fn gte(&self, value: i32) -> SpaceWhereParam { - SpaceWhereParam::EncryptionGte(value) - } } pub struct SpaceSetEncryption(i32); impl From for SpaceSetParam { @@ -27799,18 +24142,6 @@ impl SpaceDateCreatedField { pub fn not(&self, value: chrono::DateTime) -> SpaceWhereParam { SpaceWhereParam::DateCreatedNot(value) } - pub fn before(&self, value: chrono::DateTime) -> SpaceWhereParam { - SpaceWhereParam::DateCreatedBefore(value) - } - pub fn after(&self, value: chrono::DateTime) -> SpaceWhereParam { - SpaceWhereParam::DateCreatedAfter(value) - } - pub fn before_equals(&self, value: chrono::DateTime) -> SpaceWhereParam { - SpaceWhereParam::DateCreatedBeforeEquals(value) - } - pub fn after_equals(&self, value: chrono::DateTime) -> SpaceWhereParam { - SpaceWhereParam::DateCreatedAfterEquals(value) - } } pub struct SpaceSetDateCreated(chrono::DateTime); impl From for SpaceSetParam { @@ -27859,18 +24190,6 @@ impl SpaceDateModifiedField { pub fn not(&self, value: chrono::DateTime) -> SpaceWhereParam { SpaceWhereParam::DateModifiedNot(value) } - pub fn before(&self, value: chrono::DateTime) -> SpaceWhereParam { - SpaceWhereParam::DateModifiedBefore(value) - } - pub fn after(&self, value: chrono::DateTime) -> SpaceWhereParam { - SpaceWhereParam::DateModifiedAfter(value) - } - pub fn before_equals(&self, value: chrono::DateTime) -> SpaceWhereParam { - SpaceWhereParam::DateModifiedBeforeEquals(value) - } - pub fn after_equals(&self, value: chrono::DateTime) -> SpaceWhereParam { - SpaceWhereParam::DateModifiedAfterEquals(value) - } } pub struct SpaceSetDateModified(chrono::DateTime); impl From for SpaceSetParam { @@ -27914,16 +24233,16 @@ impl SpaceLibraryIdField { SpaceCursor::LibraryId(cursor) } pub fn increment(&self, value: i32) -> SpaceSetParam { - SpaceSetParam::LibraryId(value) + SpaceSetParam::SetLibraryId(value) } pub fn decrement(&self, value: i32) -> SpaceSetParam { - SpaceSetParam::LibraryId(value) + SpaceSetParam::SetLibraryId(value) } pub fn multiply(&self, value: i32) -> SpaceSetParam { - SpaceSetParam::LibraryId(value) + SpaceSetParam::SetLibraryId(value) } pub fn divide(&self, value: i32) -> SpaceSetParam { - SpaceSetParam::LibraryId(value) + SpaceSetParam::SetLibraryId(value) } pub fn in_vec(&self, value: Vec) -> SpaceWhereParam { SpaceWhereParam::LibraryIdInVec(value) @@ -27946,18 +24265,6 @@ impl SpaceLibraryIdField { pub fn not(&self, value: i32) -> SpaceWhereParam { SpaceWhereParam::LibraryIdNot(value) } - pub fn lt(&self, value: i32) -> SpaceWhereParam { - SpaceWhereParam::LibraryIdLt(value) - } - pub fn lte(&self, value: i32) -> SpaceWhereParam { - SpaceWhereParam::LibraryIdLte(value) - } - pub fn gt(&self, value: i32) -> SpaceWhereParam { - SpaceWhereParam::LibraryIdGt(value) - } - pub fn gte(&self, value: i32) -> SpaceWhereParam { - SpaceWhereParam::LibraryIdGte(value) - } } pub struct SpaceSetLibraryId(i32); impl From for SpaceSetParam { @@ -28145,10 +24452,6 @@ pub enum SpaceWhereParam { IdGt(i32), IdGte(i32), IdNot(i32), - IdLt(i32), - IdLte(i32), - IdGt(i32), - IdGte(i32), NameEquals(String), NameInVec(Vec), NameNotInVec(Vec), @@ -28160,8 +24463,6 @@ pub enum SpaceWhereParam { NameStartsWith(String), NameEndsWith(String), NameNot(String), - NameHasPrefix(String), - NameHasSuffix(String), EncryptionEquals(i32), EncryptionInVec(Vec), EncryptionNotInVec(Vec), @@ -28170,10 +24471,6 @@ pub enum SpaceWhereParam { EncryptionGt(i32), EncryptionGte(i32), EncryptionNot(i32), - EncryptionLt(i32), - EncryptionLte(i32), - EncryptionGt(i32), - EncryptionGte(i32), DateCreatedEquals(chrono::DateTime), DateCreatedInVec(Vec>), DateCreatedNotInVec(Vec>), @@ -28182,10 +24479,6 @@ pub enum SpaceWhereParam { DateCreatedGt(chrono::DateTime), DateCreatedGte(chrono::DateTime), DateCreatedNot(chrono::DateTime), - DateCreatedBefore(chrono::DateTime), - DateCreatedAfter(chrono::DateTime), - DateCreatedBeforeEquals(chrono::DateTime), - DateCreatedAfterEquals(chrono::DateTime), DateModifiedEquals(chrono::DateTime), DateModifiedInVec(Vec>), DateModifiedNotInVec(Vec>), @@ -28194,10 +24487,6 @@ pub enum SpaceWhereParam { DateModifiedGt(chrono::DateTime), DateModifiedGte(chrono::DateTime), DateModifiedNot(chrono::DateTime), - DateModifiedBefore(chrono::DateTime), - DateModifiedAfter(chrono::DateTime), - DateModifiedBeforeEquals(chrono::DateTime), - DateModifiedAfterEquals(chrono::DateTime), LibraryIs(Vec), LibraryIdEquals(i32), LibraryIdInVec(Vec), @@ -28207,10 +24496,6 @@ pub enum SpaceWhereParam { LibraryIdGt(i32), LibraryIdGte(i32), LibraryIdNot(i32), - LibraryIdLt(i32), - LibraryIdLte(i32), - LibraryIdGt(i32), - LibraryIdGte(i32), } impl SpaceWhereParam { pub fn to_field(&self) -> Field { @@ -28326,42 +24611,6 @@ impl SpaceWhereParam { }]), ..Default::default() }, - Self::IdLt(value) => Field { - name: "id".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::IdLte(value) => Field { - name: "id".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::IdGt(value) => Field { - name: "id".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::IdGte(value) => Field { - name: "id".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::NameEquals(value) => Field { name: "name".into(), fields: Some(vec![Field { @@ -28479,24 +24728,6 @@ impl SpaceWhereParam { }]), ..Default::default() }, - Self::NameHasPrefix(value) => Field { - name: "name".into(), - fields: Some(vec![Field { - name: "starts_with".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::NameHasSuffix(value) => Field { - name: "name".into(), - fields: Some(vec![Field { - name: "ends_with".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::EncryptionEquals(value) => Field { name: "encryption".into(), fields: Some(vec![Field { @@ -28587,42 +24818,6 @@ impl SpaceWhereParam { }]), ..Default::default() }, - Self::EncryptionLt(value) => Field { - name: "encryption".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::EncryptionLte(value) => Field { - name: "encryption".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::EncryptionGt(value) => Field { - name: "encryption".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::EncryptionGte(value) => Field { - name: "encryption".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::DateCreatedEquals(value) => Field { name: "date_created".into(), fields: Some(vec![Field { @@ -28713,42 +24908,6 @@ impl SpaceWhereParam { }]), ..Default::default() }, - Self::DateCreatedBefore(value) => Field { - name: "date_created".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateCreatedAfter(value) => Field { - name: "date_created".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateCreatedBeforeEquals(value) => Field { - name: "date_created".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateCreatedAfterEquals(value) => Field { - name: "date_created".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::DateModifiedEquals(value) => Field { name: "date_modified".into(), fields: Some(vec![Field { @@ -28839,42 +24998,6 @@ impl SpaceWhereParam { }]), ..Default::default() }, - Self::DateModifiedBefore(value) => Field { - name: "date_modified".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateModifiedAfter(value) => Field { - name: "date_modified".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateModifiedBeforeEquals(value) => Field { - name: "date_modified".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateModifiedAfterEquals(value) => Field { - name: "date_modified".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::LibraryIs(value) => Field { name: "Library".into(), fields: Some(vec![Field { @@ -28974,42 +25097,6 @@ impl SpaceWhereParam { }]), ..Default::default() }, - Self::LibraryIdLt(value) => Field { - name: "libraryId".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::LibraryIdLte(value) => Field { - name: "libraryId".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::LibraryIdGt(value) => Field { - name: "libraryId".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::LibraryIdGte(value) => Field { - name: "libraryId".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, } } } @@ -29138,7 +25225,7 @@ pub struct SpaceFindFirst<'a> { with_params: Vec, } impl<'a> SpaceFindFirst<'a> { - pub async fn exec(self) -> QueryResult { + pub async fn exec(self) -> QueryResult> { let Self { mut query, order_by_params, @@ -29197,7 +25284,7 @@ pub struct SpaceFindUnique<'a> { with_params: Vec, } impl<'a> SpaceFindUnique<'a> { - pub async fn exec(self) -> QueryResult { + pub async fn exec(self) -> QueryResult> { let Self { mut query, with_params, @@ -29321,7 +25408,7 @@ impl<'a> SpaceUpsertOne<'a> { }); self } - pub fn update(mut self, params: Vec) -> Self { + pub fn update(mut self, params: Vec) -> Self { self.query.inputs.push(Input { name: "update".into(), fields: params @@ -29553,16 +25640,16 @@ impl AlbumIdField { AlbumCursor::Id(cursor) } pub fn increment(&self, value: i32) -> AlbumSetParam { - AlbumSetParam::Id(value) + AlbumSetParam::SetId(value) } pub fn decrement(&self, value: i32) -> AlbumSetParam { - AlbumSetParam::Id(value) + AlbumSetParam::SetId(value) } pub fn multiply(&self, value: i32) -> AlbumSetParam { - AlbumSetParam::Id(value) + AlbumSetParam::SetId(value) } pub fn divide(&self, value: i32) -> AlbumSetParam { - AlbumSetParam::Id(value) + AlbumSetParam::SetId(value) } pub fn in_vec(&self, value: Vec) -> AlbumWhereParam { AlbumWhereParam::IdInVec(value) @@ -29585,18 +25672,6 @@ impl AlbumIdField { pub fn not(&self, value: i32) -> AlbumWhereParam { AlbumWhereParam::IdNot(value) } - pub fn lt(&self, value: i32) -> AlbumWhereParam { - AlbumWhereParam::IdLt(value) - } - pub fn lte(&self, value: i32) -> AlbumWhereParam { - AlbumWhereParam::IdLte(value) - } - pub fn gt(&self, value: i32) -> AlbumWhereParam { - AlbumWhereParam::IdGt(value) - } - pub fn gte(&self, value: i32) -> AlbumWhereParam { - AlbumWhereParam::IdGte(value) - } } pub struct AlbumSetId(i32); impl From for AlbumSetParam { @@ -29648,12 +25723,6 @@ impl AlbumNameField { pub fn not(&self, value: String) -> AlbumWhereParam { AlbumWhereParam::NameNot(value) } - pub fn has_prefix(&self, value: String) -> AlbumWhereParam { - AlbumWhereParam::NameHasPrefix(value) - } - pub fn has_suffix(&self, value: String) -> AlbumWhereParam { - AlbumWhereParam::NameHasSuffix(value) - } } pub struct AlbumSetName(String); impl From for AlbumSetParam { @@ -29723,18 +25792,6 @@ impl AlbumDateCreatedField { pub fn not(&self, value: chrono::DateTime) -> AlbumWhereParam { AlbumWhereParam::DateCreatedNot(value) } - pub fn before(&self, value: chrono::DateTime) -> AlbumWhereParam { - AlbumWhereParam::DateCreatedBefore(value) - } - pub fn after(&self, value: chrono::DateTime) -> AlbumWhereParam { - AlbumWhereParam::DateCreatedAfter(value) - } - pub fn before_equals(&self, value: chrono::DateTime) -> AlbumWhereParam { - AlbumWhereParam::DateCreatedBeforeEquals(value) - } - pub fn after_equals(&self, value: chrono::DateTime) -> AlbumWhereParam { - AlbumWhereParam::DateCreatedAfterEquals(value) - } } pub struct AlbumSetDateCreated(chrono::DateTime); impl From for AlbumSetParam { @@ -29783,18 +25840,6 @@ impl AlbumDateModifiedField { pub fn not(&self, value: chrono::DateTime) -> AlbumWhereParam { AlbumWhereParam::DateModifiedNot(value) } - pub fn before(&self, value: chrono::DateTime) -> AlbumWhereParam { - AlbumWhereParam::DateModifiedBefore(value) - } - pub fn after(&self, value: chrono::DateTime) -> AlbumWhereParam { - AlbumWhereParam::DateModifiedAfter(value) - } - pub fn before_equals(&self, value: chrono::DateTime) -> AlbumWhereParam { - AlbumWhereParam::DateModifiedBeforeEquals(value) - } - pub fn after_equals(&self, value: chrono::DateTime) -> AlbumWhereParam { - AlbumWhereParam::DateModifiedAfterEquals(value) - } } pub struct AlbumSetDateModified(chrono::DateTime); impl From for AlbumSetParam { @@ -29934,10 +25979,6 @@ pub enum AlbumWhereParam { IdGt(i32), IdGte(i32), IdNot(i32), - IdLt(i32), - IdLte(i32), - IdGt(i32), - IdGte(i32), NameEquals(String), NameInVec(Vec), NameNotInVec(Vec), @@ -29949,8 +25990,6 @@ pub enum AlbumWhereParam { NameStartsWith(String), NameEndsWith(String), NameNot(String), - NameHasPrefix(String), - NameHasSuffix(String), IsHiddenEquals(bool), DateCreatedEquals(chrono::DateTime), DateCreatedInVec(Vec>), @@ -29960,10 +25999,6 @@ pub enum AlbumWhereParam { DateCreatedGt(chrono::DateTime), DateCreatedGte(chrono::DateTime), DateCreatedNot(chrono::DateTime), - DateCreatedBefore(chrono::DateTime), - DateCreatedAfter(chrono::DateTime), - DateCreatedBeforeEquals(chrono::DateTime), - DateCreatedAfterEquals(chrono::DateTime), DateModifiedEquals(chrono::DateTime), DateModifiedInVec(Vec>), DateModifiedNotInVec(Vec>), @@ -29972,10 +26007,6 @@ pub enum AlbumWhereParam { DateModifiedGt(chrono::DateTime), DateModifiedGte(chrono::DateTime), DateModifiedNot(chrono::DateTime), - DateModifiedBefore(chrono::DateTime), - DateModifiedAfter(chrono::DateTime), - DateModifiedBeforeEquals(chrono::DateTime), - DateModifiedAfterEquals(chrono::DateTime), } impl AlbumWhereParam { pub fn to_field(&self) -> Field { @@ -30091,42 +26122,6 @@ impl AlbumWhereParam { }]), ..Default::default() }, - Self::IdLt(value) => Field { - name: "id".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::IdLte(value) => Field { - name: "id".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::IdGt(value) => Field { - name: "id".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::IdGte(value) => Field { - name: "id".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::NameEquals(value) => Field { name: "name".into(), fields: Some(vec![Field { @@ -30244,24 +26239,6 @@ impl AlbumWhereParam { }]), ..Default::default() }, - Self::NameHasPrefix(value) => Field { - name: "name".into(), - fields: Some(vec![Field { - name: "starts_with".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::NameHasSuffix(value) => Field { - name: "name".into(), - fields: Some(vec![Field { - name: "ends_with".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::IsHiddenEquals(value) => Field { name: "is_hidden".into(), fields: Some(vec![Field { @@ -30361,42 +26338,6 @@ impl AlbumWhereParam { }]), ..Default::default() }, - Self::DateCreatedBefore(value) => Field { - name: "date_created".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateCreatedAfter(value) => Field { - name: "date_created".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateCreatedBeforeEquals(value) => Field { - name: "date_created".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateCreatedAfterEquals(value) => Field { - name: "date_created".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::DateModifiedEquals(value) => Field { name: "date_modified".into(), fields: Some(vec![Field { @@ -30487,42 +26428,6 @@ impl AlbumWhereParam { }]), ..Default::default() }, - Self::DateModifiedBefore(value) => Field { - name: "date_modified".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateModifiedAfter(value) => Field { - name: "date_modified".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateModifiedBeforeEquals(value) => Field { - name: "date_modified".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateModifiedAfterEquals(value) => Field { - name: "date_modified".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, } } } @@ -30651,7 +26556,7 @@ pub struct AlbumFindFirst<'a> { with_params: Vec, } impl<'a> AlbumFindFirst<'a> { - pub async fn exec(self) -> QueryResult { + pub async fn exec(self) -> QueryResult> { let Self { mut query, order_by_params, @@ -30710,7 +26615,7 @@ pub struct AlbumFindUnique<'a> { with_params: Vec, } impl<'a> AlbumFindUnique<'a> { - pub async fn exec(self) -> QueryResult { + pub async fn exec(self) -> QueryResult> { let Self { mut query, with_params, @@ -30834,7 +26739,7 @@ impl<'a> AlbumUpsertOne<'a> { }); self } - pub fn update(mut self, params: Vec) -> Self { + pub fn update(mut self, params: Vec) -> Self { self.query.inputs.push(Input { name: "update".into(), fields: params @@ -31081,16 +26986,16 @@ impl CommentIdField { CommentCursor::Id(cursor) } pub fn increment(&self, value: i32) -> CommentSetParam { - CommentSetParam::Id(value) + CommentSetParam::SetId(value) } pub fn decrement(&self, value: i32) -> CommentSetParam { - CommentSetParam::Id(value) + CommentSetParam::SetId(value) } pub fn multiply(&self, value: i32) -> CommentSetParam { - CommentSetParam::Id(value) + CommentSetParam::SetId(value) } pub fn divide(&self, value: i32) -> CommentSetParam { - CommentSetParam::Id(value) + CommentSetParam::SetId(value) } pub fn in_vec(&self, value: Vec) -> CommentWhereParam { CommentWhereParam::IdInVec(value) @@ -31113,18 +27018,6 @@ impl CommentIdField { pub fn not(&self, value: i32) -> CommentWhereParam { CommentWhereParam::IdNot(value) } - pub fn lt(&self, value: i32) -> CommentWhereParam { - CommentWhereParam::IdLt(value) - } - pub fn lte(&self, value: i32) -> CommentWhereParam { - CommentWhereParam::IdLte(value) - } - pub fn gt(&self, value: i32) -> CommentWhereParam { - CommentWhereParam::IdGt(value) - } - pub fn gte(&self, value: i32) -> CommentWhereParam { - CommentWhereParam::IdGte(value) - } } pub struct CommentSetId(i32); impl From for CommentSetParam { @@ -31176,12 +27069,6 @@ impl CommentContentField { pub fn not(&self, value: String) -> CommentWhereParam { CommentWhereParam::ContentNot(value) } - pub fn has_prefix(&self, value: String) -> CommentWhereParam { - CommentWhereParam::ContentHasPrefix(value) - } - pub fn has_suffix(&self, value: String) -> CommentWhereParam { - CommentWhereParam::ContentHasSuffix(value) - } } pub struct CommentSetContent(String); impl From for CommentSetParam { @@ -31230,24 +27117,6 @@ impl CommentDateCreatedField { pub fn not(&self, value: chrono::DateTime) -> CommentWhereParam { CommentWhereParam::DateCreatedNot(value) } - pub fn before(&self, value: chrono::DateTime) -> CommentWhereParam { - CommentWhereParam::DateCreatedBefore(value) - } - pub fn after(&self, value: chrono::DateTime) -> CommentWhereParam { - CommentWhereParam::DateCreatedAfter(value) - } - pub fn before_equals( - &self, - value: chrono::DateTime, - ) -> CommentWhereParam { - CommentWhereParam::DateCreatedBeforeEquals(value) - } - pub fn after_equals( - &self, - value: chrono::DateTime, - ) -> CommentWhereParam { - CommentWhereParam::DateCreatedAfterEquals(value) - } } pub struct CommentSetDateCreated(chrono::DateTime); impl From for CommentSetParam { @@ -31296,24 +27165,6 @@ impl CommentDateModifiedField { pub fn not(&self, value: chrono::DateTime) -> CommentWhereParam { CommentWhereParam::DateModifiedNot(value) } - pub fn before(&self, value: chrono::DateTime) -> CommentWhereParam { - CommentWhereParam::DateModifiedBefore(value) - } - pub fn after(&self, value: chrono::DateTime) -> CommentWhereParam { - CommentWhereParam::DateModifiedAfter(value) - } - pub fn before_equals( - &self, - value: chrono::DateTime, - ) -> CommentWhereParam { - CommentWhereParam::DateModifiedBeforeEquals(value) - } - pub fn after_equals( - &self, - value: chrono::DateTime, - ) -> CommentWhereParam { - CommentWhereParam::DateModifiedAfterEquals(value) - } } pub struct CommentSetDateModified(chrono::DateTime); impl From for CommentSetParam { @@ -31336,16 +27187,16 @@ impl CommentFileIdField { CommentCursor::FileId(cursor) } pub fn increment(&self, value: i32) -> CommentSetParam { - CommentSetParam::FileId(value) + CommentSetParam::SetFileId(value) } pub fn decrement(&self, value: i32) -> CommentSetParam { - CommentSetParam::FileId(value) + CommentSetParam::SetFileId(value) } pub fn multiply(&self, value: i32) -> CommentSetParam { - CommentSetParam::FileId(value) + CommentSetParam::SetFileId(value) } pub fn divide(&self, value: i32) -> CommentSetParam { - CommentSetParam::FileId(value) + CommentSetParam::SetFileId(value) } pub fn in_vec(&self, value: Vec) -> CommentWhereParam { CommentWhereParam::FileIdInVec(value) @@ -31368,18 +27219,6 @@ impl CommentFileIdField { pub fn not(&self, value: i32) -> CommentWhereParam { CommentWhereParam::FileIdNot(value) } - pub fn lt(&self, value: i32) -> CommentWhereParam { - CommentWhereParam::FileIdLt(value) - } - pub fn lte(&self, value: i32) -> CommentWhereParam { - CommentWhereParam::FileIdLte(value) - } - pub fn gt(&self, value: i32) -> CommentWhereParam { - CommentWhereParam::FileIdGt(value) - } - pub fn gte(&self, value: i32) -> CommentWhereParam { - CommentWhereParam::FileIdGte(value) - } } pub struct CommentSetFileId(i32); impl From for CommentSetParam { @@ -31571,10 +27410,6 @@ pub enum CommentWhereParam { IdGt(i32), IdGte(i32), IdNot(i32), - IdLt(i32), - IdLte(i32), - IdGt(i32), - IdGte(i32), ContentEquals(String), ContentInVec(Vec), ContentNotInVec(Vec), @@ -31586,8 +27421,6 @@ pub enum CommentWhereParam { ContentStartsWith(String), ContentEndsWith(String), ContentNot(String), - ContentHasPrefix(String), - ContentHasSuffix(String), DateCreatedEquals(chrono::DateTime), DateCreatedInVec(Vec>), DateCreatedNotInVec(Vec>), @@ -31596,10 +27429,6 @@ pub enum CommentWhereParam { DateCreatedGt(chrono::DateTime), DateCreatedGte(chrono::DateTime), DateCreatedNot(chrono::DateTime), - DateCreatedBefore(chrono::DateTime), - DateCreatedAfter(chrono::DateTime), - DateCreatedBeforeEquals(chrono::DateTime), - DateCreatedAfterEquals(chrono::DateTime), DateModifiedEquals(chrono::DateTime), DateModifiedInVec(Vec>), DateModifiedNotInVec(Vec>), @@ -31608,10 +27437,6 @@ pub enum CommentWhereParam { DateModifiedGt(chrono::DateTime), DateModifiedGte(chrono::DateTime), DateModifiedNot(chrono::DateTime), - DateModifiedBefore(chrono::DateTime), - DateModifiedAfter(chrono::DateTime), - DateModifiedBeforeEquals(chrono::DateTime), - DateModifiedAfterEquals(chrono::DateTime), FileIdEquals(i32), FileIdInVec(Vec), FileIdNotInVec(Vec), @@ -31620,10 +27445,6 @@ pub enum CommentWhereParam { FileIdGt(i32), FileIdGte(i32), FileIdNot(i32), - FileIdLt(i32), - FileIdLte(i32), - FileIdGt(i32), - FileIdGte(i32), FileIs(Vec), } impl CommentWhereParam { @@ -31740,42 +27561,6 @@ impl CommentWhereParam { }]), ..Default::default() }, - Self::IdLt(value) => Field { - name: "id".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::IdLte(value) => Field { - name: "id".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::IdGt(value) => Field { - name: "id".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::IdGte(value) => Field { - name: "id".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::ContentEquals(value) => Field { name: "content".into(), fields: Some(vec![Field { @@ -31893,24 +27678,6 @@ impl CommentWhereParam { }]), ..Default::default() }, - Self::ContentHasPrefix(value) => Field { - name: "content".into(), - fields: Some(vec![Field { - name: "starts_with".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::ContentHasSuffix(value) => Field { - name: "content".into(), - fields: Some(vec![Field { - name: "ends_with".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::DateCreatedEquals(value) => Field { name: "date_created".into(), fields: Some(vec![Field { @@ -32001,42 +27768,6 @@ impl CommentWhereParam { }]), ..Default::default() }, - Self::DateCreatedBefore(value) => Field { - name: "date_created".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateCreatedAfter(value) => Field { - name: "date_created".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateCreatedBeforeEquals(value) => Field { - name: "date_created".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateCreatedAfterEquals(value) => Field { - name: "date_created".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::DateModifiedEquals(value) => Field { name: "date_modified".into(), fields: Some(vec![Field { @@ -32127,42 +27858,6 @@ impl CommentWhereParam { }]), ..Default::default() }, - Self::DateModifiedBefore(value) => Field { - name: "date_modified".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateModifiedAfter(value) => Field { - name: "date_modified".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateModifiedBeforeEquals(value) => Field { - name: "date_modified".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::DateModifiedAfterEquals(value) => Field { - name: "date_modified".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::FileIdEquals(value) => Field { name: "file_id".into(), fields: Some(vec![Field { @@ -32253,42 +27948,6 @@ impl CommentWhereParam { }]), ..Default::default() }, - Self::FileIdLt(value) => Field { - name: "file_id".into(), - fields: Some(vec![Field { - name: "lt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::FileIdLte(value) => Field { - name: "file_id".into(), - fields: Some(vec![Field { - name: "lte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::FileIdGt(value) => Field { - name: "file_id".into(), - fields: Some(vec![Field { - name: "gt".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, - Self::FileIdGte(value) => Field { - name: "file_id".into(), - fields: Some(vec![Field { - name: "gte".into(), - value: Some(serde_json::to_value(value).unwrap()), - ..Default::default() - }]), - ..Default::default() - }, Self::FileIs(value) => Field { name: "file".into(), fields: Some(vec![Field { @@ -32426,7 +28085,7 @@ pub struct CommentFindFirst<'a> { with_params: Vec, } impl<'a> CommentFindFirst<'a> { - pub async fn exec(self) -> QueryResult { + pub async fn exec(self) -> QueryResult> { let Self { mut query, order_by_params, @@ -32485,7 +28144,7 @@ pub struct CommentFindUnique<'a> { with_params: Vec, } impl<'a> CommentFindUnique<'a> { - pub async fn exec(self) -> QueryResult { + pub async fn exec(self) -> QueryResult> { let Self { mut query, with_params, @@ -32613,7 +28272,7 @@ impl<'a> CommentUpsertOne<'a> { }); self } - pub fn update(mut self, params: Vec) -> Self { + pub fn update(mut self, params: Vec) -> Self { self.query.inputs.push(Input { name: "update".into(), fields: params @@ -32790,7 +28449,7 @@ impl<'a> CommentActions<'a> { } } #[derive(Debug, Clone, Copy, Serialize, Deserialize)] -enum MigrationScalarFieldEnum { +pub enum MigrationScalarFieldEnum { #[serde(rename = "id")] Id, #[serde(rename = "name")] @@ -32803,7 +28462,7 @@ enum MigrationScalarFieldEnum { AppliedAt, } #[derive(Debug, Clone, Copy, Serialize, Deserialize)] -enum LibraryScalarFieldEnum { +pub enum LibraryScalarFieldEnum { #[serde(rename = "id")] Id, #[serde(rename = "uuid")] @@ -32822,7 +28481,7 @@ enum LibraryScalarFieldEnum { Timezone, } #[derive(Debug, Clone, Copy, Serialize, Deserialize)] -enum LibraryStatisticsScalarFieldEnum { +pub enum LibraryStatisticsScalarFieldEnum { #[serde(rename = "id")] Id, #[serde(rename = "date_captured")] @@ -32839,7 +28498,7 @@ enum LibraryStatisticsScalarFieldEnum { TotalUniqueBytes, } #[derive(Debug, Clone, Copy, Serialize, Deserialize)] -enum ClientScalarFieldEnum { +pub enum ClientScalarFieldEnum { #[serde(rename = "id")] Id, #[serde(rename = "uuid")] @@ -32860,7 +28519,7 @@ enum ClientScalarFieldEnum { DateCreated, } #[derive(Debug, Clone, Copy, Serialize, Deserialize)] -enum LocationScalarFieldEnum { +pub enum LocationScalarFieldEnum { #[serde(rename = "id")] Id, #[serde(rename = "name")] @@ -32887,7 +28546,7 @@ enum LocationScalarFieldEnum { DateCreated, } #[derive(Debug, Clone, Copy, Serialize, Deserialize)] -enum FileScalarFieldEnum { +pub enum FileScalarFieldEnum { #[serde(rename = "id")] Id, #[serde(rename = "kind")] @@ -32910,7 +28569,7 @@ enum FileScalarFieldEnum { DateIndexed, } #[derive(Debug, Clone, Copy, Serialize, Deserialize)] -enum FilePathScalarFieldEnum { +pub enum FilePathScalarFieldEnum { #[serde(rename = "id")] Id, #[serde(rename = "is_dir")] @@ -32939,7 +28598,7 @@ enum FilePathScalarFieldEnum { DateIndexed, } #[derive(Debug, Clone, Copy, Serialize, Deserialize)] -enum TagScalarFieldEnum { +pub enum TagScalarFieldEnum { #[serde(rename = "id")] Id, #[serde(rename = "name")] @@ -32956,7 +28615,7 @@ enum TagScalarFieldEnum { DateModified, } #[derive(Debug, Clone, Copy, Serialize, Deserialize)] -enum TagOnFileScalarFieldEnum { +pub enum TagOnFileScalarFieldEnum { #[serde(rename = "date_created")] DateCreated, #[serde(rename = "tag_id")] @@ -32965,7 +28624,7 @@ enum TagOnFileScalarFieldEnum { FileId, } #[derive(Debug, Clone, Copy, Serialize, Deserialize)] -enum LabelScalarFieldEnum { +pub enum LabelScalarFieldEnum { #[serde(rename = "id")] Id, #[serde(rename = "name")] @@ -32976,7 +28635,7 @@ enum LabelScalarFieldEnum { DateModified, } #[derive(Debug, Clone, Copy, Serialize, Deserialize)] -enum LabelOnFileScalarFieldEnum { +pub enum LabelOnFileScalarFieldEnum { #[serde(rename = "date_created")] DateCreated, #[serde(rename = "label_id")] @@ -32985,7 +28644,7 @@ enum LabelOnFileScalarFieldEnum { FileId, } #[derive(Debug, Clone, Copy, Serialize, Deserialize)] -enum JobScalarFieldEnum { +pub enum JobScalarFieldEnum { #[serde(rename = "id")] Id, #[serde(rename = "action")] @@ -33004,7 +28663,7 @@ enum JobScalarFieldEnum { SecondsElapsed, } #[derive(Debug, Clone, Copy, Serialize, Deserialize)] -enum SpaceScalarFieldEnum { +pub enum SpaceScalarFieldEnum { #[serde(rename = "id")] Id, #[serde(rename = "name")] @@ -33019,7 +28678,7 @@ enum SpaceScalarFieldEnum { LibraryId, } #[derive(Debug, Clone, Copy, Serialize, Deserialize)] -enum AlbumScalarFieldEnum { +pub enum AlbumScalarFieldEnum { #[serde(rename = "id")] Id, #[serde(rename = "name")] @@ -33032,7 +28691,7 @@ enum AlbumScalarFieldEnum { DateModified, } #[derive(Debug, Clone, Copy, Serialize, Deserialize)] -enum CommentScalarFieldEnum { +pub enum CommentScalarFieldEnum { #[serde(rename = "id")] Id, #[serde(rename = "content")] @@ -33045,7 +28704,7 @@ enum CommentScalarFieldEnum { FileId, } #[derive(Debug, Clone, Copy, Serialize, Deserialize)] -enum SortOrder { +pub enum SortOrder { #[serde(rename = "asc")] Asc, #[serde(rename = "desc")] diff --git a/packages/core/src/sys/locations.rs b/packages/core/src/sys/locations.rs index ef3fbb9ac..71ff0cbdb 100644 --- a/packages/core/src/sys/locations.rs +++ b/packages/core/src/sys/locations.rs @@ -1,11 +1,9 @@ use crate::{ - db, file::indexer::IndexerJob, - job, - prisma::{File, FilePath, Location}, + prisma::{FilePath, Location}, state::client, sys::{volumes, volumes::Volume}, - Core, CoreContext, + CoreContext, }; use anyhow::Result; use log::info; @@ -21,11 +19,11 @@ use super::SysError; #[derive(Debug, Clone, Serialize, Deserialize, TS)] #[ts(export)] pub struct LocationResource { - pub id: i64, + pub id: i32, pub name: Option, pub path: Option, - pub total_capacity: Option, - pub available_capacity: Option, + pub total_capacity: Option, + pub available_capacity: Option, pub is_removable: bool, pub is_ejectable: bool, pub is_root_filesystem: bool, @@ -63,15 +61,19 @@ static DOTFILE_NAME: &str = ".spacedrive"; // - accessible on from the local filesystem // - already exists in the database pub async fn check_location(path: &str) -> Result { - let dotfile: DotSpacedrive = match fs::File::open(format!("{}/{}", path.clone(), DOTFILE_NAME)) { - Ok(file) => serde_json::from_reader(file).unwrap_or(DotSpacedrive::default()), - Err(e) => return Err(LocationError::DotfileReadFailure(e)), - }; + let dotfile: DotSpacedrive = + match fs::File::open(format!("{}/{}", path.clone(), DOTFILE_NAME)) { + Ok(file) => serde_json::from_reader(file).unwrap_or(DotSpacedrive::default()), + Err(e) => return Err(LocationError::DotfileReadFailure(e)), + }; Ok(dotfile) } -pub async fn get_location(ctx: &CoreContext, location_id: i64) -> Result { +pub async fn get_location( + ctx: &CoreContext, + location_id: i32, +) -> Result { let db = &ctx.database; // get location by location_id from db and include location_paths @@ -81,7 +83,7 @@ pub async fn get_location(ctx: &CoreContext, location_id: i64) -> Result location, None => Err(LocationError::NotFound(location_id.to_string()))?, @@ -92,15 +94,23 @@ pub async fn get_location(ctx: &CoreContext, location_id: i64) -> Result Result { +pub async fn new_location_and_scan( + ctx: &CoreContext, + path: &str, +) -> Result { let location = create_location(&ctx, path).await?; - ctx.spawn_job(Box::new(IndexerJob { path: path.to_string() })); + ctx.spawn_job(Box::new(IndexerJob { + path: path.to_string(), + })); Ok(location) } -pub async fn create_location(ctx: &CoreContext, path: &str) -> Result { +pub async fn create_location( + ctx: &CoreContext, + path: &str, +) -> Result { let db = &ctx.database; let config = client::get(); @@ -114,11 +124,14 @@ pub async fn create_location(ctx: &CoreContext, path: &str) -> Result location, None => { - info!("Location does not exist, creating new location for '{}'", &path); + info!( + "Location does not exist, creating new location for '{}'", + &path + ); let uuid = uuid::Uuid::new_v4(); // create new location let create_location_params = { @@ -128,7 +141,9 @@ pub async fn create_location(ctx: &CoreContext, path: &str) -> Result mount, @@ -137,8 +152,9 @@ pub async fn create_location(ctx: &CoreContext, path: &str) -> Result Result file, - Err(e) => Err(LocationError::DotfileWriteFailure(e, path.to_string()))?, - }; + let mut dotfile = + match fs::File::create(format!("{}/{}", path.clone(), DOTFILE_NAME)) { + Ok(file) => file, + Err(e) => { + Err(LocationError::DotfileWriteFailure(e, path.to_string()))? + }, + }; let data = DotSpacedrive { location_uuid: uuid.to_string(), @@ -164,7 +187,9 @@ pub async fn create_location(ctx: &CoreContext, path: &str) -> Result json, - Err(e) => Err(LocationError::DotfileSerializeFailure(e, path.to_string()))?, + Err(e) => { + Err(LocationError::DotfileSerializeFailure(e, path.to_string()))? + }, }; match dotfile.write_all(json.as_bytes()) { diff --git a/packages/core/src/sys/mod.rs b/packages/core/src/sys/mod.rs index 7d484b98f..f3f670499 100644 --- a/packages/core/src/sys/mod.rs +++ b/packages/core/src/sys/mod.rs @@ -2,7 +2,7 @@ pub mod locations; pub mod volumes; use thiserror::Error; -use crate::{db, job}; +use crate::{job, prisma}; use self::locations::LocationError; @@ -15,5 +15,5 @@ pub enum SysError { #[error("Error from job runner")] JobError(#[from] job::JobError), #[error("Database error")] - DatabaseError(#[from] db::DatabaseError), + DatabaseError(#[from] prisma::QueryError), } diff --git a/packages/core/src/sys/volumes.rs b/packages/core/src/sys/volumes.rs index 1b22d132e..2167d47e2 100644 --- a/packages/core/src/sys/volumes.rs +++ b/packages/core/src/sys/volumes.rs @@ -34,7 +34,8 @@ pub fn get_volumes() -> Result, SysError> { let mut name = disk.name().to_str().unwrap_or("Volume").to_string(); let is_removable = disk.is_removable(); - let file_system = String::from_utf8(disk.file_system().to_vec()).unwrap_or_else(|_| "Err".to_string()); + let file_system = String::from_utf8(disk.file_system().to_vec()) + .unwrap_or_else(|_| "Err".to_string()); let disk_type = match disk.type_() { sysinfo::DiskType::SSD => "SSD".to_string(), @@ -50,11 +51,16 @@ pub fn get_volumes() -> Result, SysError> { let mut caption = mount_point.clone(); caption.pop(); let wmic_process = Command::new("cmd") - .args(["/C", &format!("wmic logical disk where Caption='{caption}' get Size")]) + .args([ + "/C", + &format!("wmic logical disk where Caption='{caption}' get Size"), + ]) .output() .expect("failed to execute process"); let wmic_process_output = String::from_utf8(wmic_process.stdout).unwrap(); - let parsed_size = wmic_process_output.split("\r\r\n").collect::>()[1].to_string(); + let parsed_size = + wmic_process_output.split("\r\r\n").collect::>()[1] + .to_string(); if let Ok(n) = parsed_size.trim().parse::() { total_space = n; diff --git a/packages/core/src/util/time.rs b/packages/core/src/util/time.rs index 11a543741..f96859b8e 100644 --- a/packages/core/src/util/time.rs +++ b/packages/core/src/util/time.rs @@ -3,7 +3,9 @@ use chrono::NaiveDateTime; use std::io; use std::time::{SystemTime, UNIX_EPOCH}; -pub fn system_time_to_date_time(system_time: io::Result) -> Result { +pub fn system_time_to_date_time( + system_time: io::Result, +) -> Result { // extract system time or resort to current time if failure let system_time = system_time.unwrap_or(SystemTime::now()); let std_duration = system_time.duration_since(UNIX_EPOCH)?; diff --git a/packages/ui/style/tailwind.config.js b/packages/ui/style/tailwind.config.js index a6e7ea849..58c9d2e68 100644 --- a/packages/ui/style/tailwind.config.js +++ b/packages/ui/style/tailwind.config.js @@ -3,7 +3,7 @@ const plugin = require('tailwindcss/plugin'); const defaultTheme = require('tailwindcss/defaultTheme'); module.exports = { - purge: ['./src/index.html', './src/**/*.{vue,js,ts,jsx,tsx}'], + content: ['./src/index.html', './src/**/*.{vue,js,ts,jsx,tsx}'], darkMode: 'media', mode: 'jit', theme: { diff --git a/yarn.lock b/yarn.lock index 0cead4988..4312fa9b4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -468,7 +468,7 @@ "@babel/types@^7.12.6", "@babel/types@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.16.7.tgz#4ed19d51f840ed4bd5645be6ce40775fecf03159" - integrity sha512-E8HuV7FO9qLpx6OtoGfUQ2cjIYnbFwvZWYBS+87EwtdMvmUPJSwykpovFB+8insbpF0uJcpr8KMUi64XZntZcg== + integrity sha512-E8HuV7FO9qLpx6OtoGfUQ2cjIYnbFwvZWYBS+87EwtdMvmUPJSwykpovFB+8insbpF0uJcpr8KMUi32XZntZcg== dependencies: "@babel/helper-validator-identifier" "^7.16.7" to-fast-properties "^2.0.0"