From 36a63877d0a15ba63b1c53428856dfc8a49607c9 Mon Sep 17 00:00:00 2001 From: Jacob Sapoznikow Date: Sat, 31 Aug 2024 00:11:45 +0000 Subject: [PATCH] more --- Cargo.lock | 8 +- crates/commands/src/lib.rs | 2 + crates/commands/src/router.rs | 25 + crates/core/src/traits/mod.rs | 2 + crates/core/src/traits/runnable.rs | 6 + crates/data/src/lib.rs | 8 +- crates/data/src/prisma.rs | 3400 +--------------------------- crates/init/src/lib.rs | 2 + crates/rpc-rs-macros/Cargo.toml | 2 +- crates/rpc-rs-macros/src/lib.rs | 14 +- crates/rpc-rs/Cargo.toml | 2 +- crates/rpc-rs/src/events/mod.rs | 5 +- crates/rpc-rs/src/filtered.rs | 8 +- crates/rpc-rs/src/macros.rs | 18 +- prisma/schema.prisma | 1 + src/api/bindings/app.ts | 336 +-- 16 files changed, 115 insertions(+), 3724 deletions(-) create mode 100644 crates/commands/src/router.rs create mode 100644 crates/core/src/traits/runnable.rs diff --git a/Cargo.lock b/Cargo.lock index d52fcaa..a7d80eb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1227,7 +1227,7 @@ dependencies = [ "prisma-client-rust 0.6.8", "query 2.0.0", "reqwest 0.12.5 (registry+https://github.com/rust-lang/crates.io-index)", - "rpc-rs 0.2.0", + "rpc-rs 0.3.0", "serde 1.0.209 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.120 (registry+https://github.com/rust-lang/crates.io-index)", "specta 2.0.0-rc.13 (registry+https://github.com/rust-lang/crates.io-index)", @@ -6277,12 +6277,12 @@ dependencies = [ [[package]] name = "rpc-rs" -version = "0.2.0" +version = "0.3.0" dependencies = [ "async-trait 0.1.81 (registry+https://github.com/rust-lang/crates.io-index)", "axum 0.7.5 (registry+https://github.com/rust-lang/crates.io-index)", "http-body-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rpc-rs-macros 2.0.0", + "rpc-rs-macros 0.3.0", "serde 1.0.209 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.120 (registry+https://github.com/rust-lang/crates.io-index)", "specta 2.0.0-rc.13 (registry+https://github.com/rust-lang/crates.io-index)", @@ -6292,7 +6292,7 @@ dependencies = [ [[package]] name = "rpc-rs-macros" -version = "2.0.0" +version = "0.3.0" dependencies = [ "proc-macro2 1.0.86 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.36 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/crates/commands/src/lib.rs b/crates/commands/src/lib.rs index 3459d26..9d22554 100644 --- a/crates/commands/src/lib.rs +++ b/crates/commands/src/lib.rs @@ -1,3 +1,5 @@ +pub mod router; + use whcore::type_map; type_map! {} diff --git a/crates/commands/src/router.rs b/crates/commands/src/router.rs new file mode 100644 index 0000000..9c05f7c --- /dev/null +++ b/crates/commands/src/router.rs @@ -0,0 +1,25 @@ +use std::sync::Arc; + +use data::prisma::{PrismaClient, instance, installed_mod}; +use rpc_rs::{prisma_module, prisma_module_filtered, Router}; + +pub fn build_router() -> Router> { + let mut router = Router::new(); + + prisma_module!(router += ["instance", "instances"] { + client: PrismaClient, + module: instance, + container: instance, + primary_key: id, + }); + + prisma_module_filtered!(router += ["mod", "mods"] { + client: PrismaClient, + module: installed_mod, + container: installed_mod, + primary_key: id, + filter: instance_id = i32, + }); + + router +} diff --git a/crates/core/src/traits/mod.rs b/crates/core/src/traits/mod.rs index 1ff5318..3d8c772 100644 --- a/crates/core/src/traits/mod.rs +++ b/crates/core/src/traits/mod.rs @@ -1,3 +1,5 @@ pub mod into_async; +pub mod runnable; pub use into_async::*; +pub use runnable::*; diff --git a/crates/core/src/traits/runnable.rs b/crates/core/src/traits/runnable.rs new file mode 100644 index 0000000..0ed27a1 --- /dev/null +++ b/crates/core/src/traits/runnable.rs @@ -0,0 +1,6 @@ +use anyhow::Result; + +#[async_trait] +pub trait Runnable { + async fn run(&self) -> Result<()>; +} diff --git a/crates/data/src/lib.rs b/crates/data/src/lib.rs index 74531a9..f9dd3fd 100644 --- a/crates/data/src/lib.rs +++ b/crates/data/src/lib.rs @@ -11,6 +11,9 @@ use prisma_client_rust::specta::{NamedType, TypeMap}; use tokio::sync::OnceCell; use whcore::{async_trait::async_trait, type_map}; +pub use prisma::installed_mod::Data as InstalledMod; +pub use prisma::instance::Data as Instance; + #[async_trait] pub trait DbIntoAsync { async fn db_into_async(self, client: Arc) -> T; @@ -34,4 +37,7 @@ pub async fn get_or_init_client() -> Result> { CLIENT.get_or_try_init(client).await.cloned() } -type_map! {} +type_map! { + InstalledMod, + Instance, +} diff --git a/crates/data/src/prisma.rs b/crates/data/src/prisma.rs index cba09e4..036bd7b 100644 --- a/crates/data/src/prisma.rs +++ b/crates/data/src/prisma.rs @@ -1,3401 +1,3 @@ // File generated by Prisma Client Rust. DO NOT EDIT -pub static DATAMODEL_STR: &'static str = include_str!("/mnt/vol/Wormhole/prisma/schema.prisma"); -static DATABASE_STR: &'static str = "sqlite"; -pub use _prisma::*; -use prisma_client_rust::scalar_types::*; -pub mod _prisma { - use super::*; - pub struct PrismaClientBuilder { - url: Option, - action_notifier: ::prisma_client_rust::ActionNotifier, - } - impl PrismaClientBuilder { - fn new() -> Self { - Self { - url: None, - action_notifier: ::prisma_client_rust::ActionNotifier::new(), - } - } - pub fn with_url(mut self, url: String) -> Self { - self.url = Some(url); - self - } - pub async fn build(self) -> Result { - let internals = ::prisma_client_rust::PrismaClientInternals::new( - self.url, - self.action_notifier, - super::DATAMODEL_STR, - ) - .await?; - Ok(PrismaClient(internals)) - } - } - pub struct PrismaClient(::prisma_client_rust::PrismaClientInternals); - impl ::std::fmt::Debug for PrismaClient { - fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { - f.debug_struct("PrismaClient").finish() - } - } - impl PrismaClient { - pub fn _builder() -> PrismaClientBuilder { - PrismaClientBuilder::new() - } - pub fn _query_raw( - &self, - query: ::prisma_client_rust::Raw, - ) -> ::prisma_client_rust::QueryRaw { - ::prisma_client_rust::QueryRaw::new(&self.0, query, super::DATABASE_STR) - } - pub fn _execute_raw( - &self, - query: ::prisma_client_rust::Raw, - ) -> ::prisma_client_rust::ExecuteRaw { - ::prisma_client_rust::ExecuteRaw::new(&self.0, query, super::DATABASE_STR) - } - pub async fn _batch< - 'batch, - T: ::prisma_client_rust::BatchContainer<'batch, Marker>, - Marker, - >( - &self, - queries: T, - ) -> ::prisma_client_rust::Result< - >::ReturnType, - > { - ::prisma_client_rust::batch(queries, &self.0).await - } - pub fn _transaction(&self) -> ::prisma_client_rust::TransactionBuilder { - ::prisma_client_rust::TransactionBuilder::_new(self, &self.0) - } - pub fn instance(&self) -> super::instance::Actions { - super::instance::Actions { client: &self.0 } - } - pub fn installed_mod(&self) -> super::installed_mod::Actions { - super::installed_mod::Actions { client: &self.0 } - } - } - impl ::prisma_client_rust::PrismaClient for PrismaClient { - fn internals(&self) -> &::prisma_client_rust::PrismaClientInternals { - &self.0 - } - fn internals_mut(&mut self) -> &mut ::prisma_client_rust::PrismaClientInternals { - &mut self.0 - } - fn with_tx_id(&self, tx_id: Option<::prisma_client_rust::query_core::TxId>) -> Self { - Self(self.0.with_tx_id(tx_id)) - } - } - #[derive(Debug, Clone, Copy, :: serde :: Serialize, :: serde :: Deserialize, PartialEq, Eq)] - pub enum TransactionIsolationLevel { - #[serde(rename = "Serializable")] - Serializable, - } - impl ToString for TransactionIsolationLevel { - fn to_string(&self) -> String { - match self { - Self::Serializable => "Serializable".to_string(), - } - } - } - impl ::prisma_client_rust::TransactionIsolationLevel for TransactionIsolationLevel {} - #[derive(Debug, Clone, Copy, :: serde :: Serialize, :: serde :: Deserialize, PartialEq, Eq)] - pub enum InstanceScalarFieldEnum { - #[serde(rename = "id")] - Id, - #[serde(rename = "name")] - Name, - #[serde(rename = "plugin")] - Plugin, - #[serde(rename = "description")] - Description, - #[serde(rename = "updated")] - Updated, - #[serde(rename = "iconUrl")] - IconUrl, - #[serde(rename = "bannerUrl")] - BannerUrl, - #[serde(rename = "extraData")] - ExtraData, - } - impl ToString for InstanceScalarFieldEnum { - fn to_string(&self) -> String { - match self { - Self::Id => "id".to_string(), - Self::Name => "name".to_string(), - Self::Plugin => "plugin".to_string(), - Self::Description => "description".to_string(), - Self::Updated => "updated".to_string(), - Self::IconUrl => "iconUrl".to_string(), - Self::BannerUrl => "bannerUrl".to_string(), - Self::ExtraData => "extraData".to_string(), - } - } - } - #[derive(Debug, Clone, Copy, :: serde :: Serialize, :: serde :: Deserialize, PartialEq, Eq)] - pub enum InstalledModScalarFieldEnum { - #[serde(rename = "id")] - Id, - #[serde(rename = "fileSize")] - FileSize, - #[serde(rename = "updated")] - Updated, - #[serde(rename = "iconUrl")] - IconUrl, - #[serde(rename = "source")] - Source, - #[serde(rename = "projectId")] - ProjectId, - #[serde(rename = "projectName")] - ProjectName, - #[serde(rename = "projectDesc")] - ProjectDesc, - #[serde(rename = "projectVersion")] - ProjectVersion, - } - impl ToString for InstalledModScalarFieldEnum { - fn to_string(&self) -> String { - match self { - Self::Id => "id".to_string(), - Self::FileSize => "fileSize".to_string(), - Self::Updated => "updated".to_string(), - Self::IconUrl => "iconUrl".to_string(), - Self::Source => "source".to_string(), - Self::ProjectId => "projectId".to_string(), - Self::ProjectName => "projectName".to_string(), - Self::ProjectDesc => "projectDesc".to_string(), - Self::ProjectVersion => "projectVersion".to_string(), - } - } - } - #[derive(Debug, Clone, Copy, :: serde :: Serialize, :: serde :: Deserialize, PartialEq, Eq)] - pub enum SortOrder { - #[serde(rename = "asc")] - Asc, - #[serde(rename = "desc")] - Desc, - } - impl ToString for SortOrder { - fn to_string(&self) -> String { - match self { - Self::Asc => "asc".to_string(), - Self::Desc => "desc".to_string(), - } - } - } - #[derive(Debug, Clone, Copy, :: serde :: Serialize, :: serde :: Deserialize, PartialEq, Eq)] - pub enum NullsOrder { - #[serde(rename = "first")] - First, - #[serde(rename = "last")] - Last, - } - impl ToString for NullsOrder { - fn to_string(&self) -> String { - match self { - Self::First => "first".to_string(), - Self::Last => "last".to_string(), - } - } - } - impl Into<::prisma_client_rust::PrismaValue> for SortOrder { - fn into(self) -> ::prisma_client_rust::PrismaValue { - match self { - SortOrder::Asc => ::prisma_client_rust::PrismaValue::String("asc".to_string()), - SortOrder::Desc => ::prisma_client_rust::PrismaValue::String("desc".to_string()), - } - } - } - pub mod read_filters { - use super::*; - #[derive(Debug, Clone)] - pub enum IntFilter { - Equals(Int), - InVec(Vec), - NotInVec(Vec), - Lt(Int), - Lte(Int), - Gt(Int), - Gte(Int), - Not(Int), - } - impl Into<::prisma_client_rust::SerializedWhereValue> for IntFilter { - fn into(self) -> ::prisma_client_rust::SerializedWhereValue { - match self { - Self::Equals(value) => { - ::prisma_client_rust::SerializedWhereValue::Object(vec![( - "equals".to_string(), - ::prisma_client_rust::PrismaValue::Int(value), - )]) - } - Self::InVec(value) => { - ::prisma_client_rust::SerializedWhereValue::Object(vec![( - "in".to_string(), - ::prisma_client_rust::PrismaValue::List( - value - .into_iter() - .map(|value| ::prisma_client_rust::PrismaValue::Int(value)) - .collect(), - ), - )]) - } - Self::NotInVec(value) => { - ::prisma_client_rust::SerializedWhereValue::Object(vec![( - "notIn".to_string(), - ::prisma_client_rust::PrismaValue::List( - value - .into_iter() - .map(|value| ::prisma_client_rust::PrismaValue::Int(value)) - .collect(), - ), - )]) - } - Self::Lt(value) => ::prisma_client_rust::SerializedWhereValue::Object(vec![( - "lt".to_string(), - ::prisma_client_rust::PrismaValue::Int(value), - )]), - Self::Lte(value) => ::prisma_client_rust::SerializedWhereValue::Object(vec![( - "lte".to_string(), - ::prisma_client_rust::PrismaValue::Int(value), - )]), - Self::Gt(value) => ::prisma_client_rust::SerializedWhereValue::Object(vec![( - "gt".to_string(), - ::prisma_client_rust::PrismaValue::Int(value), - )]), - Self::Gte(value) => ::prisma_client_rust::SerializedWhereValue::Object(vec![( - "gte".to_string(), - ::prisma_client_rust::PrismaValue::Int(value), - )]), - Self::Not(value) => ::prisma_client_rust::SerializedWhereValue::Object(vec![( - "not".to_string(), - ::prisma_client_rust::PrismaValue::Int(value), - )]), - } - } - } - #[derive(Debug, Clone)] - pub enum DateTimeFilter { - Equals(DateTime), - InVec(Vec), - NotInVec(Vec), - Lt(DateTime), - Lte(DateTime), - Gt(DateTime), - Gte(DateTime), - Not(DateTime), - } - impl Into<::prisma_client_rust::SerializedWhereValue> for DateTimeFilter { - fn into(self) -> ::prisma_client_rust::SerializedWhereValue { - match self { - Self::Equals(value) => { - ::prisma_client_rust::SerializedWhereValue::Object(vec![( - "equals".to_string(), - ::prisma_client_rust::PrismaValue::DateTime(value), - )]) - } - Self::InVec(value) => { - ::prisma_client_rust::SerializedWhereValue::Object(vec![( - "in".to_string(), - ::prisma_client_rust::PrismaValue::List( - value - .into_iter() - .map(|value| ::prisma_client_rust::PrismaValue::DateTime(value)) - .collect(), - ), - )]) - } - Self::NotInVec(value) => { - ::prisma_client_rust::SerializedWhereValue::Object(vec![( - "notIn".to_string(), - ::prisma_client_rust::PrismaValue::List( - value - .into_iter() - .map(|value| ::prisma_client_rust::PrismaValue::DateTime(value)) - .collect(), - ), - )]) - } - Self::Lt(value) => ::prisma_client_rust::SerializedWhereValue::Object(vec![( - "lt".to_string(), - ::prisma_client_rust::PrismaValue::DateTime(value), - )]), - Self::Lte(value) => ::prisma_client_rust::SerializedWhereValue::Object(vec![( - "lte".to_string(), - ::prisma_client_rust::PrismaValue::DateTime(value), - )]), - Self::Gt(value) => ::prisma_client_rust::SerializedWhereValue::Object(vec![( - "gt".to_string(), - ::prisma_client_rust::PrismaValue::DateTime(value), - )]), - Self::Gte(value) => ::prisma_client_rust::SerializedWhereValue::Object(vec![( - "gte".to_string(), - ::prisma_client_rust::PrismaValue::DateTime(value), - )]), - Self::Not(value) => ::prisma_client_rust::SerializedWhereValue::Object(vec![( - "not".to_string(), - ::prisma_client_rust::PrismaValue::DateTime(value), - )]), - } - } - } - #[derive(Debug, Clone)] - pub enum StringFilter { - Equals(String), - InVec(Vec), - NotInVec(Vec), - Lt(String), - Lte(String), - Gt(String), - Gte(String), - Contains(String), - StartsWith(String), - EndsWith(String), - Not(String), - } - impl Into<::prisma_client_rust::SerializedWhereValue> for StringFilter { - fn into(self) -> ::prisma_client_rust::SerializedWhereValue { - match self { - Self::Equals(value) => { - ::prisma_client_rust::SerializedWhereValue::Object(vec![( - "equals".to_string(), - ::prisma_client_rust::PrismaValue::String(value), - )]) - } - Self::InVec(value) => { - ::prisma_client_rust::SerializedWhereValue::Object(vec![( - "in".to_string(), - ::prisma_client_rust::PrismaValue::List( - value - .into_iter() - .map(|value| ::prisma_client_rust::PrismaValue::String(value)) - .collect(), - ), - )]) - } - Self::NotInVec(value) => { - ::prisma_client_rust::SerializedWhereValue::Object(vec![( - "notIn".to_string(), - ::prisma_client_rust::PrismaValue::List( - value - .into_iter() - .map(|value| ::prisma_client_rust::PrismaValue::String(value)) - .collect(), - ), - )]) - } - Self::Lt(value) => ::prisma_client_rust::SerializedWhereValue::Object(vec![( - "lt".to_string(), - ::prisma_client_rust::PrismaValue::String(value), - )]), - Self::Lte(value) => ::prisma_client_rust::SerializedWhereValue::Object(vec![( - "lte".to_string(), - ::prisma_client_rust::PrismaValue::String(value), - )]), - Self::Gt(value) => ::prisma_client_rust::SerializedWhereValue::Object(vec![( - "gt".to_string(), - ::prisma_client_rust::PrismaValue::String(value), - )]), - Self::Gte(value) => ::prisma_client_rust::SerializedWhereValue::Object(vec![( - "gte".to_string(), - ::prisma_client_rust::PrismaValue::String(value), - )]), - Self::Contains(value) => { - ::prisma_client_rust::SerializedWhereValue::Object(vec![( - "contains".to_string(), - ::prisma_client_rust::PrismaValue::String(value), - )]) - } - Self::StartsWith(value) => { - ::prisma_client_rust::SerializedWhereValue::Object(vec![( - "startsWith".to_string(), - ::prisma_client_rust::PrismaValue::String(value), - )]) - } - Self::EndsWith(value) => { - ::prisma_client_rust::SerializedWhereValue::Object(vec![( - "endsWith".to_string(), - ::prisma_client_rust::PrismaValue::String(value), - )]) - } - Self::Not(value) => ::prisma_client_rust::SerializedWhereValue::Object(vec![( - "not".to_string(), - ::prisma_client_rust::PrismaValue::String(value), - )]), - } - } - } - #[derive(Debug, Clone)] - pub enum StringNullableFilter { - Equals(Option), - InVec(Vec), - NotInVec(Vec), - Lt(String), - Lte(String), - Gt(String), - Gte(String), - Contains(String), - StartsWith(String), - EndsWith(String), - Not(Option), - } - impl Into<::prisma_client_rust::SerializedWhereValue> for StringNullableFilter { - fn into(self) -> ::prisma_client_rust::SerializedWhereValue { - match self { - Self::Equals(value) => { - ::prisma_client_rust::SerializedWhereValue::Object(vec![( - "equals".to_string(), - value - .map(|value| ::prisma_client_rust::PrismaValue::String(value)) - .unwrap_or_else(|| ::prisma_client_rust::PrismaValue::Null), - )]) - } - Self::InVec(value) => { - ::prisma_client_rust::SerializedWhereValue::Object(vec![( - "in".to_string(), - ::prisma_client_rust::PrismaValue::List( - value - .into_iter() - .map(|value| ::prisma_client_rust::PrismaValue::String(value)) - .collect(), - ), - )]) - } - Self::NotInVec(value) => { - ::prisma_client_rust::SerializedWhereValue::Object(vec![( - "notIn".to_string(), - ::prisma_client_rust::PrismaValue::List( - value - .into_iter() - .map(|value| ::prisma_client_rust::PrismaValue::String(value)) - .collect(), - ), - )]) - } - Self::Lt(value) => ::prisma_client_rust::SerializedWhereValue::Object(vec![( - "lt".to_string(), - ::prisma_client_rust::PrismaValue::String(value), - )]), - Self::Lte(value) => ::prisma_client_rust::SerializedWhereValue::Object(vec![( - "lte".to_string(), - ::prisma_client_rust::PrismaValue::String(value), - )]), - Self::Gt(value) => ::prisma_client_rust::SerializedWhereValue::Object(vec![( - "gt".to_string(), - ::prisma_client_rust::PrismaValue::String(value), - )]), - Self::Gte(value) => ::prisma_client_rust::SerializedWhereValue::Object(vec![( - "gte".to_string(), - ::prisma_client_rust::PrismaValue::String(value), - )]), - Self::Contains(value) => { - ::prisma_client_rust::SerializedWhereValue::Object(vec![( - "contains".to_string(), - ::prisma_client_rust::PrismaValue::String(value), - )]) - } - Self::StartsWith(value) => { - ::prisma_client_rust::SerializedWhereValue::Object(vec![( - "startsWith".to_string(), - ::prisma_client_rust::PrismaValue::String(value), - )]) - } - Self::EndsWith(value) => { - ::prisma_client_rust::SerializedWhereValue::Object(vec![( - "endsWith".to_string(), - ::prisma_client_rust::PrismaValue::String(value), - )]) - } - Self::Not(value) => ::prisma_client_rust::SerializedWhereValue::Object(vec![( - "not".to_string(), - value - .map(|value| ::prisma_client_rust::PrismaValue::String(value)) - .unwrap_or_else(|| ::prisma_client_rust::PrismaValue::Null), - )]), - } - } - } - } - pub mod write_params { - use super::*; - #[derive(Debug, Clone)] - pub enum DateTimeParam { - Set(DateTime), - } - impl Into<::prisma_client_rust::PrismaValue> for DateTimeParam { - fn into(self) -> ::prisma_client_rust::PrismaValue { - match self { - Self::Set(value) => ::prisma_client_rust::PrismaValue::DateTime(value), - } - } - } - #[derive(Debug, Clone)] - pub enum IntParam { - Set(Int), - Increment(Int), - Decrement(Int), - Multiply(Int), - Divide(Int), - } - impl Into<::prisma_client_rust::PrismaValue> for IntParam { - fn into(self) -> ::prisma_client_rust::PrismaValue { - match self { - Self::Set(value) => ::prisma_client_rust::PrismaValue::Int(value), - Self::Increment(value) => ::prisma_client_rust::PrismaValue::Object(vec![( - "increment".to_string(), - ::prisma_client_rust::PrismaValue::Int(value), - )]), - Self::Decrement(value) => ::prisma_client_rust::PrismaValue::Object(vec![( - "decrement".to_string(), - ::prisma_client_rust::PrismaValue::Int(value), - )]), - Self::Multiply(value) => ::prisma_client_rust::PrismaValue::Object(vec![( - "multiply".to_string(), - ::prisma_client_rust::PrismaValue::Int(value), - )]), - Self::Divide(value) => ::prisma_client_rust::PrismaValue::Object(vec![( - "divide".to_string(), - ::prisma_client_rust::PrismaValue::Int(value), - )]), - } - } - } - #[derive(Debug, Clone)] - pub enum StringParam { - Set(String), - } - impl Into<::prisma_client_rust::PrismaValue> for StringParam { - fn into(self) -> ::prisma_client_rust::PrismaValue { - match self { - Self::Set(value) => ::prisma_client_rust::PrismaValue::String(value), - } - } - } - #[derive(Debug, Clone)] - pub enum StringNullableParam { - Set(Option), - } - impl Into<::prisma_client_rust::PrismaValue> for StringNullableParam { - fn into(self) -> ::prisma_client_rust::PrismaValue { - match self { - Self::Set(value) => value - .map(|value| ::prisma_client_rust::PrismaValue::String(value)) - .unwrap_or_else(|| ::prisma_client_rust::PrismaValue::Null), - } - } - } - } -} -pub mod instance { - use super::{_prisma::*, *}; - pub const NAME: &str = "Instance"; - #[derive(Debug, Clone)] - pub enum WhereParam { - Not(Vec), - Or(Vec), - And(Vec), - Id(super::_prisma::read_filters::IntFilter), - Name(super::_prisma::read_filters::StringFilter), - Plugin(super::_prisma::read_filters::StringFilter), - Description(super::_prisma::read_filters::StringFilter), - Updated(super::_prisma::read_filters::DateTimeFilter), - IconUrl(super::_prisma::read_filters::StringNullableFilter), - BannerUrl(super::_prisma::read_filters::StringNullableFilter), - ExtraData(super::_prisma::read_filters::StringFilter), - } - impl ::prisma_client_rust::WhereInput for WhereParam { - fn serialize(self) -> ::prisma_client_rust::SerializedWhereInput { - let (name, value) = match self { - Self::Not(value) => ( - "NOT", - ::prisma_client_rust::SerializedWhereValue::Object( - ::prisma_client_rust::merge_fields( - value - .into_iter() - .map(::prisma_client_rust::WhereInput::serialize) - .map(Into::into) - .collect(), - ), - ), - ), - Self::Or(value) => ( - "OR", - ::prisma_client_rust::SerializedWhereValue::List( - value - .into_iter() - .map(::prisma_client_rust::WhereInput::serialize) - .map(|p| ::prisma_client_rust::PrismaValue::Object(vec![p.into()])) - .collect(), - ), - ), - Self::And(value) => ( - "AND", - ::prisma_client_rust::SerializedWhereValue::Object( - ::prisma_client_rust::merge_fields( - value - .into_iter() - .map(::prisma_client_rust::WhereInput::serialize) - .map(Into::into) - .collect(), - ), - ), - ), - Self::Id(value) => (id::NAME, value.into()), - Self::Name(value) => (name::NAME, value.into()), - Self::Plugin(value) => (plugin::NAME, value.into()), - Self::Description(value) => (description::NAME, value.into()), - Self::Updated(value) => (updated::NAME, value.into()), - Self::IconUrl(value) => (icon_url::NAME, value.into()), - Self::BannerUrl(value) => (banner_url::NAME, value.into()), - Self::ExtraData(value) => (extra_data::NAME, value.into()), - }; - ::prisma_client_rust::SerializedWhereInput::new(name.to_string(), value.into()) - } - } - #[derive(Debug, Clone)] - pub enum UniqueWhereParam { - IdEquals(Int), - } - impl ::prisma_client_rust::WhereInput for UniqueWhereParam { - fn serialize(self) -> ::prisma_client_rust::SerializedWhereInput { - let (name, value) = match self { - UniqueWhereParam::IdEquals(value) => ( - "id", - ::prisma_client_rust::SerializedWhereValue::Value( - ::prisma_client_rust::PrismaValue::Int(value), - ), - ), - }; - ::prisma_client_rust::SerializedWhereInput::new(name.to_string(), value.into()) - } - } - impl From<::prisma_client_rust::Operator> for WhereParam { - fn from(op: ::prisma_client_rust::Operator) -> Self { - match op { - ::prisma_client_rust::Operator::Not(value) => Self::Not(value), - ::prisma_client_rust::Operator::And(value) => Self::And(value), - ::prisma_client_rust::Operator::Or(value) => Self::Or(value), - } - } - } - #[derive(Debug, Clone)] - pub enum OrderByWithRelationParam { - Id(super::SortOrder), - Name(super::SortOrder), - Plugin(super::SortOrder), - Description(super::SortOrder), - Updated(super::SortOrder), - IconUrl(super::SortOrder), - BannerUrl(super::SortOrder), - ExtraData(super::SortOrder), - } - impl Into<(String, ::prisma_client_rust::PrismaValue)> for OrderByWithRelationParam { - fn into(self) -> (String, ::prisma_client_rust::PrismaValue) { - let (k, v) = match self { - Self::Id(param) => ("id", param.into()), - Self::Name(param) => ("name", param.into()), - Self::Plugin(param) => ("plugin", param.into()), - Self::Description(param) => ("description", param.into()), - Self::Updated(param) => ("updated", param.into()), - Self::IconUrl(param) => ("iconUrl", param.into()), - Self::BannerUrl(param) => ("bannerUrl", param.into()), - Self::ExtraData(param) => ("extraData", param.into()), - }; - (k.to_string(), v) - } - } - #[derive(Debug, Clone)] - pub enum WithParam {} - impl Into<::prisma_client_rust::Selection> for WithParam { - fn into(self) -> ::prisma_client_rust::Selection { - match self {} - } - } - #[derive(Debug, Clone)] - pub enum SetParam { - Id(super::_prisma::write_params::IntParam), - Name(super::_prisma::write_params::StringParam), - Plugin(super::_prisma::write_params::StringParam), - Description(super::_prisma::write_params::StringParam), - Updated(super::_prisma::write_params::DateTimeParam), - IconUrl(super::_prisma::write_params::StringNullableParam), - BannerUrl(super::_prisma::write_params::StringNullableParam), - ExtraData(super::_prisma::write_params::StringParam), - } - impl Into<(String, ::prisma_client_rust::PrismaValue)> for SetParam { - fn into(self) -> (String, ::prisma_client_rust::PrismaValue) { - let (k, v) = match self { - Self::Id(value) => (id::NAME, value.into()), - Self::Name(value) => (name::NAME, value.into()), - Self::Plugin(value) => (plugin::NAME, value.into()), - Self::Description(value) => (description::NAME, value.into()), - Self::Updated(value) => (updated::NAME, value.into()), - Self::IconUrl(value) => (icon_url::NAME, value.into()), - Self::BannerUrl(value) => (banner_url::NAME, value.into()), - Self::ExtraData(value) => (extra_data::NAME, value.into()), - }; - (k.to_string(), v) - } - } - #[derive(Debug, Clone)] - pub enum UncheckedSetParam { - Id(super::_prisma::write_params::IntParam), - Name(super::_prisma::write_params::StringParam), - Plugin(super::_prisma::write_params::StringParam), - Description(super::_prisma::write_params::StringParam), - Updated(super::_prisma::write_params::DateTimeParam), - IconUrl(super::_prisma::write_params::StringNullableParam), - BannerUrl(super::_prisma::write_params::StringNullableParam), - ExtraData(super::_prisma::write_params::StringParam), - } - impl Into<(String, ::prisma_client_rust::PrismaValue)> for UncheckedSetParam { - fn into(self) -> (String, ::prisma_client_rust::PrismaValue) { - let (k, v) = match self { - Self::Id(value) => ("id", value.into()), - Self::Name(value) => ("name", value.into()), - Self::Plugin(value) => ("plugin", value.into()), - Self::Description(value) => ("description", value.into()), - Self::Updated(value) => ("updated", value.into()), - Self::IconUrl(value) => ("iconUrl", value.into()), - Self::BannerUrl(value) => ("bannerUrl", value.into()), - Self::ExtraData(value) => ("extraData", value.into()), - }; - (k.to_string(), v) - } - } - ::prisma_client_rust::macros::select_factory!( - _select_instance, - select, - prisma::instance, - struct Data { - #[serde(rename = "id")] - id: id::Type, - #[serde(rename = "name")] - name: name::Type, - #[serde(rename = "plugin")] - plugin: plugin::Type, - #[serde(rename = "description")] - description: description::Type, - #[serde(rename = "updated")] - updated: updated::Type, - #[serde(rename = "iconUrl")] - icon_url: icon_url::Type, - #[serde(rename = "bannerUrl")] - banner_url: banner_url::Type, - #[serde(rename = "extraData")] - extra_data: extra_data::Type, - }, - [ - (id, Scalar), - (name, Scalar), - (plugin, Scalar), - (description, Scalar), - (updated, Scalar), - (icon_url, Scalar), - (banner_url, Scalar), - (extra_data, Scalar) - ] - ); - pub enum SelectParam { - Id(id::Select), - Name(name::Select), - Plugin(plugin::Select), - Description(description::Select), - Updated(updated::Select), - IconUrl(icon_url::Select), - BannerUrl(banner_url::Select), - ExtraData(extra_data::Select), - } - impl Into<::prisma_client_rust::Selection> for SelectParam { - fn into(self) -> ::prisma_client_rust::Selection { - match self { - Self::Id(data) => data.into(), - Self::Name(data) => data.into(), - Self::Plugin(data) => data.into(), - Self::Description(data) => data.into(), - Self::Updated(data) => data.into(), - Self::IconUrl(data) => data.into(), - Self::BannerUrl(data) => data.into(), - Self::ExtraData(data) => data.into(), - } - } - } - ::prisma_client_rust::macros::include_factory!( - _include_instance, - include, - prisma::instance, - struct Data { - #[serde(rename = "id")] - id: id::Type, - #[serde(rename = "name")] - name: name::Type, - #[serde(rename = "plugin")] - plugin: plugin::Type, - #[serde(rename = "description")] - description: description::Type, - #[serde(rename = "updated")] - updated: updated::Type, - #[serde(rename = "iconUrl")] - icon_url: icon_url::Type, - #[serde(rename = "bannerUrl")] - banner_url: banner_url::Type, - #[serde(rename = "extraData")] - extra_data: extra_data::Type, - }, - [] - ); - pub enum IncludeParam { - Id(id::Include), - Name(name::Include), - Plugin(plugin::Include), - Description(description::Include), - Updated(updated::Include), - IconUrl(icon_url::Include), - BannerUrl(banner_url::Include), - ExtraData(extra_data::Include), - } - impl Into<::prisma_client_rust::Selection> for IncludeParam { - fn into(self) -> ::prisma_client_rust::Selection { - match self { - Self::Id(data) => data.into(), - Self::Name(data) => data.into(), - Self::Plugin(data) => data.into(), - Self::Description(data) => data.into(), - Self::Updated(data) => data.into(), - Self::IconUrl(data) => data.into(), - Self::BannerUrl(data) => data.into(), - Self::ExtraData(data) => data.into(), - } - } - } - #[derive(Debug, Clone)] - pub struct Create { - pub name: String, - pub plugin: String, - pub description: String, - pub extra_data: String, - pub _params: Vec, - } - impl Create { - pub fn to_query<'a>(self, client: &'a PrismaClient) -> CreateQuery<'a> { - client.instance().create( - self.name, - self.plugin, - self.description, - self.extra_data, - self._params, - ) - } - pub fn to_params(mut self) -> Vec { - self._params.extend([ - name::set(self.name), - plugin::set(self.plugin), - description::set(self.description), - extra_data::set(self.extra_data), - ]); - self._params - } - } - pub fn create( - name: String, - plugin: String, - description: String, - extra_data: String, - _params: Vec, - ) -> Create { - Create { - name, - plugin, - description, - extra_data, - _params, - } - } - #[derive( - Debug, - Clone, - :: serde :: Serialize, - :: serde :: Deserialize, - :: prisma_client_rust :: specta :: Type, - )] - # [specta (rename = "InstanceCreation" , crate = prisma_client_rust :: specta)] - pub struct CreateUnchecked { - #[serde(rename = "name")] - pub name: String, - #[serde(rename = "plugin")] - pub plugin: String, - #[serde(rename = "description")] - pub description: String, - #[serde(rename = "extraData")] - pub extra_data: String, - #[serde(skip)] - pub _params: Vec, - } - impl CreateUnchecked { - pub fn to_query<'a>(self, client: &'a PrismaClient) -> CreateUncheckedQuery<'a> { - client.instance().create_unchecked( - self.name, - self.plugin, - self.description, - self.extra_data, - self._params, - ) - } - pub fn to_params(mut self) -> Vec { - self._params.extend([ - name::set(self.name), - plugin::set(self.plugin), - description::set(self.description), - extra_data::set(self.extra_data), - ]); - self._params - } - } - pub fn create_unchecked( - name: String, - plugin: String, - description: String, - extra_data: String, - _params: Vec, - ) -> CreateUnchecked { - CreateUnchecked { - name, - plugin, - description, - extra_data, - _params, - } - } - #[derive( - Debug, - Clone, - :: serde :: Serialize, - :: serde :: Deserialize, - :: prisma_client_rust :: specta :: Type, - )] - # [specta (rename = "InstanceUpdate" , crate = prisma_client_rust :: specta)] - pub struct Update { - #[serde(rename = "id")] - pub id: id::Type, - #[serde(rename = "name", skip_serializing_if = "Option::is_none")] - pub name: Option, - #[serde(rename = "plugin", skip_serializing_if = "Option::is_none")] - pub plugin: Option, - #[serde(rename = "description", skip_serializing_if = "Option::is_none")] - pub description: Option, - #[serde(rename = "updated", skip_serializing_if = "Option::is_none")] - pub updated: Option, - #[serde(rename = "iconUrl", skip_serializing_if = "Option::is_none")] - pub icon_url: icon_url::Type, - #[serde(rename = "bannerUrl", skip_serializing_if = "Option::is_none")] - pub banner_url: banner_url::Type, - #[serde(rename = "extraData", skip_serializing_if = "Option::is_none")] - pub extra_data: Option, - } - impl Update { - pub fn as_params(self) -> Vec { - let mut params = Vec::new(); - if let Some(field) = self.name { - params.push(name::set(field)); - } - if let Some(field) = self.plugin { - params.push(plugin::set(field)); - } - if let Some(field) = self.description { - params.push(description::set(field)); - } - if let Some(field) = self.updated { - params.push(updated::set(field)); - } - if let Some(field) = self.icon_url { - params.push(icon_url::set(Some(field))); - } - if let Some(field) = self.banner_url { - params.push(banner_url::set(Some(field))); - } - if let Some(field) = self.extra_data { - params.push(extra_data::set(field)); - } - params - } - } - #[derive(Debug, Clone)] - pub struct Types; - impl ::prisma_client_rust::ModelTypes for Types { - type Data = Data; - type Where = WhereParam; - type WhereUnique = UniqueWhereParam; - type UncheckedSet = UncheckedSetParam; - type Set = SetParam; - type With = WithParam; - type OrderBy = OrderByWithRelationParam; - type Cursor = UniqueWhereParam; - const MODEL: &'static str = NAME; - fn scalar_selections() -> Vec<::prisma_client_rust::Selection> { - vec![ - ::prisma_client_rust::sel(id::NAME), - ::prisma_client_rust::sel(name::NAME), - ::prisma_client_rust::sel(plugin::NAME), - ::prisma_client_rust::sel(description::NAME), - ::prisma_client_rust::sel(updated::NAME), - ::prisma_client_rust::sel(icon_url::NAME), - ::prisma_client_rust::sel(banner_url::NAME), - ::prisma_client_rust::sel(extra_data::NAME), - ] - } - } - #[derive( - Debug, - Clone, - :: serde :: Serialize, - :: serde :: Deserialize, - :: prisma_client_rust :: specta :: Type, - )] - # [specta (rename = "Instance" , crate = prisma_client_rust :: specta)] - pub struct Data { - #[serde(rename = "id")] - pub id: id::Type, - #[serde(rename = "name")] - pub name: name::Type, - #[serde(rename = "plugin")] - pub plugin: plugin::Type, - #[serde(rename = "description")] - pub description: description::Type, - #[serde(rename = "updated")] - pub updated: updated::Type, - #[serde(rename = "iconUrl")] - pub icon_url: icon_url::Type, - #[serde(rename = "bannerUrl")] - pub banner_url: banner_url::Type, - #[serde(rename = "extraData")] - pub extra_data: extra_data::Type, - } - impl Data {} - ::prisma_client_rust::macros::partial_unchecked_factory!( - _partial_unchecked_instance, - prisma::instance, - struct Data { - #[serde(rename = "id")] - pub id: prisma::instance::id::Type, - #[serde(rename = "name")] - pub name: prisma::instance::name::Type, - #[serde(rename = "plugin")] - pub plugin: prisma::instance::plugin::Type, - #[serde(rename = "description")] - pub description: prisma::instance::description::Type, - #[serde(rename = "updated")] - pub updated: prisma::instance::updated::Type, - #[serde(rename = "iconUrl")] - #[serde(default, with = "::prisma_client_rust::serde::double_option")] - pub icon_url: prisma::instance::icon_url::Type, - #[serde(rename = "bannerUrl")] - #[serde(default, with = "::prisma_client_rust::serde::double_option")] - pub banner_url: prisma::instance::banner_url::Type, - #[serde(rename = "extraData")] - pub extra_data: prisma::instance::extra_data::Type, - } - ); - ::prisma_client_rust::macros::filter_factory!( - _instance_filter, - prisma::instance, - [ - (id, Scalar), - (name, Scalar), - (plugin, Scalar), - (description, Scalar), - (updated, Scalar), - (icon_url, Scalar), - (banner_url, Scalar), - (extra_data, Scalar) - ] - ); - pub type UniqueArgs = ::prisma_client_rust::UniqueArgs; - pub type ManyArgs = ::prisma_client_rust::ManyArgs; - pub type CountQuery<'a> = ::prisma_client_rust::Count<'a, Types>; - pub type CreateQuery<'a> = ::prisma_client_rust::Create<'a, Types>; - pub type CreateUncheckedQuery<'a> = ::prisma_client_rust::CreateUnchecked<'a, Types>; - pub type CreateManyQuery<'a> = ::prisma_client_rust::CreateMany<'a, Types>; - pub type FindUniqueQuery<'a> = ::prisma_client_rust::FindUnique<'a, Types>; - pub type FindManyQuery<'a> = ::prisma_client_rust::FindMany<'a, Types>; - pub type FindFirstQuery<'a> = ::prisma_client_rust::FindFirst<'a, Types>; - pub type UpdateQuery<'a> = ::prisma_client_rust::Update<'a, Types>; - pub type UpdateUncheckedQuery<'a> = ::prisma_client_rust::UpdateUnchecked<'a, Types>; - pub type UpdateManyQuery<'a> = ::prisma_client_rust::UpdateMany<'a, Types>; - pub type UpsertQuery<'a> = ::prisma_client_rust::Upsert<'a, Types>; - pub type DeleteQuery<'a> = ::prisma_client_rust::Delete<'a, Types>; - pub type DeleteManyQuery<'a> = ::prisma_client_rust::DeleteMany<'a, Types>; - #[derive(Clone)] - pub struct Actions<'a> { - pub client: &'a ::prisma_client_rust::PrismaClientInternals, - } - impl<'a> Actions<'a> { - pub fn find_unique(self, _where: UniqueWhereParam) -> FindUniqueQuery<'a> { - FindUniqueQuery::new(self.client, _where) - } - pub fn find_first(self, _where: Vec) -> FindFirstQuery<'a> { - FindFirstQuery::new(self.client, _where) - } - pub fn find_many(self, _where: Vec) -> FindManyQuery<'a> { - FindManyQuery::new(self.client, _where) - } - pub fn create( - self, - name: String, - plugin: String, - description: String, - extra_data: String, - mut _params: Vec, - ) -> CreateQuery<'a> { - _params.extend([ - name::set(name), - plugin::set(plugin), - description::set(description), - extra_data::set(extra_data), - ]); - CreateQuery::new(self.client, _params) - } - pub fn create_unchecked( - self, - name: String, - plugin: String, - description: String, - extra_data: String, - mut _params: Vec, - ) -> CreateUncheckedQuery<'a> { - _params.extend([ - name::set(name), - plugin::set(plugin), - description::set(description), - extra_data::set(extra_data), - ]); - CreateUncheckedQuery::new(self.client, _params.into_iter().map(Into::into).collect()) - } - pub fn create_many(self, data: Vec) -> CreateManyQuery<'a> { - let data = data.into_iter().map(CreateUnchecked::to_params).collect(); - CreateManyQuery::new(self.client, data) - } - pub fn update(self, _where: UniqueWhereParam, _params: Vec) -> UpdateQuery<'a> { - UpdateQuery::new(self.client, _where, _params, vec![]) - } - pub fn update_unchecked( - self, - _where: UniqueWhereParam, - _params: Vec, - ) -> UpdateUncheckedQuery<'a> { - UpdateUncheckedQuery::new( - self.client, - _where, - _params.into_iter().map(Into::into).collect(), - vec![], - ) - } - pub fn update_many( - self, - _where: Vec, - _params: Vec, - ) -> UpdateManyQuery<'a> { - UpdateManyQuery::new(self.client, _where, _params) - } - pub fn upsert( - self, - _where: UniqueWhereParam, - _create: Create, - _update: Vec, - ) -> UpsertQuery<'a> { - UpsertQuery::new(self.client, _where, _create.to_params(), _update) - } - pub fn delete(self, _where: UniqueWhereParam) -> DeleteQuery<'a> { - DeleteQuery::new(self.client, _where, vec![]) - } - pub fn delete_many(self, _where: Vec) -> DeleteManyQuery<'a> { - DeleteManyQuery::new(self.client, _where) - } - pub fn count(self, _where: Vec) -> CountQuery<'a> { - CountQuery::new(self.client, _where) - } - } - pub mod banner_url { - use super::super::{_prisma::*, *}; - use super::{SetParam, UncheckedSetParam, UniqueWhereParam, WhereParam, WithParam}; - pub const NAME: &str = "bannerUrl"; - pub type Type = Option; - pub type RecursiveSafeType = Type; - pub struct Equals(pub Option); - pub fn equals>(value: Option) -> T { - Equals(value).into() - } - impl From for WhereParam { - fn from(Equals(v): Equals) -> Self { - WhereParam::BannerUrl(_prisma::read_filters::StringNullableFilter::Equals(v)) - } - } - ::prisma_client_rust::scalar_where_param_fns!( - _prisma::read_filters::StringNullableFilter, - BannerUrl, - { - fn in_vec(_: Vec) -> InVec; - fn not_in_vec(_: Vec) -> NotInVec; - fn lt(_: String) -> Lt; - fn lte(_: String) -> Lte; - fn gt(_: String) -> Gt; - fn gte(_: String) -> Gte; - fn contains(_: String) -> Contains; - fn starts_with(_: String) -> StartsWith; - fn ends_with(_: String) -> EndsWith; - fn not(_: Option) -> Not; - } - ); - pub struct Order(SortOrder); - pub fn order>(v: SortOrder) -> T { - Order(v).into() - } - impl From for super::OrderByWithRelationParam { - fn from(Order(v): Order) -> Self { - Self::BannerUrl(v) - } - } - pub struct Set(pub Option); - impl From for SetParam { - fn from(Set(v): Set) -> Self { - Self::BannerUrl(_prisma::write_params::StringNullableParam::Set(v)) - } - } - pub fn set>(value: Option) -> T { - Set(value).into() - } - pub struct UpdateOperation(pub _prisma::write_params::StringNullableParam); - impl From for SetParam { - fn from(UpdateOperation(v): UpdateOperation) -> Self { - Self::BannerUrl(v) - } - } - impl From for UncheckedSetParam { - fn from(Set(v): Set) -> Self { - Self::BannerUrl(_prisma::write_params::StringNullableParam::Set(v)) - } - } - impl From for UncheckedSetParam { - fn from(UpdateOperation(v): UpdateOperation) -> Self { - Self::BannerUrl(v) - } - } - pub struct Select; - impl Into for Select { - fn into(self) -> super::SelectParam { - super::SelectParam::BannerUrl(self) - } - } - impl Into<::prisma_client_rust::Selection> for Select { - fn into(self) -> ::prisma_client_rust::Selection { - ::prisma_client_rust::sel(NAME) - } - } - pub struct Include; - impl Into for Include { - fn into(self) -> super::IncludeParam { - super::IncludeParam::BannerUrl(self) - } - } - impl Into<::prisma_client_rust::Selection> for Include { - fn into(self) -> ::prisma_client_rust::Selection { - ::prisma_client_rust::sel(NAME) - } - } - } - pub mod description { - use super::super::{_prisma::*, *}; - use super::{SetParam, UncheckedSetParam, UniqueWhereParam, WhereParam, WithParam}; - pub const NAME: &str = "description"; - pub type Type = String; - pub type RecursiveSafeType = Type; - pub struct Equals(pub String); - pub fn equals>(value: String) -> T { - Equals(value).into() - } - impl From for WhereParam { - fn from(Equals(v): Equals) -> Self { - WhereParam::Description(_prisma::read_filters::StringFilter::Equals(v)) - } - } - ::prisma_client_rust::scalar_where_param_fns!( - _prisma::read_filters::StringFilter, - Description, - { - fn in_vec(_: Vec) -> InVec; - fn not_in_vec(_: Vec) -> NotInVec; - fn lt(_: String) -> Lt; - fn lte(_: String) -> Lte; - fn gt(_: String) -> Gt; - fn gte(_: String) -> Gte; - fn contains(_: String) -> Contains; - fn starts_with(_: String) -> StartsWith; - fn ends_with(_: String) -> EndsWith; - fn not(_: String) -> Not; - } - ); - pub struct Order(SortOrder); - pub fn order>(v: SortOrder) -> T { - Order(v).into() - } - impl From for super::OrderByWithRelationParam { - fn from(Order(v): Order) -> Self { - Self::Description(v) - } - } - pub struct Set(pub String); - impl From for SetParam { - fn from(Set(v): Set) -> Self { - Self::Description(_prisma::write_params::StringParam::Set(v)) - } - } - pub fn set>(value: String) -> T { - Set(value).into() - } - pub struct UpdateOperation(pub _prisma::write_params::StringParam); - impl From for SetParam { - fn from(UpdateOperation(v): UpdateOperation) -> Self { - Self::Description(v) - } - } - impl From for UncheckedSetParam { - fn from(Set(v): Set) -> Self { - Self::Description(_prisma::write_params::StringParam::Set(v)) - } - } - impl From for UncheckedSetParam { - fn from(UpdateOperation(v): UpdateOperation) -> Self { - Self::Description(v) - } - } - pub struct Select; - impl Into for Select { - fn into(self) -> super::SelectParam { - super::SelectParam::Description(self) - } - } - impl Into<::prisma_client_rust::Selection> for Select { - fn into(self) -> ::prisma_client_rust::Selection { - ::prisma_client_rust::sel(NAME) - } - } - pub struct Include; - impl Into for Include { - fn into(self) -> super::IncludeParam { - super::IncludeParam::Description(self) - } - } - impl Into<::prisma_client_rust::Selection> for Include { - fn into(self) -> ::prisma_client_rust::Selection { - ::prisma_client_rust::sel(NAME) - } - } - } - pub mod extra_data { - use super::super::{_prisma::*, *}; - use super::{SetParam, UncheckedSetParam, UniqueWhereParam, WhereParam, WithParam}; - pub const NAME: &str = "extraData"; - pub type Type = String; - pub type RecursiveSafeType = Type; - pub struct Equals(pub String); - pub fn equals>(value: String) -> T { - Equals(value).into() - } - impl From for WhereParam { - fn from(Equals(v): Equals) -> Self { - WhereParam::ExtraData(_prisma::read_filters::StringFilter::Equals(v)) - } - } - ::prisma_client_rust::scalar_where_param_fns!( - _prisma::read_filters::StringFilter, - ExtraData, - { - fn in_vec(_: Vec) -> InVec; - fn not_in_vec(_: Vec) -> NotInVec; - fn lt(_: String) -> Lt; - fn lte(_: String) -> Lte; - fn gt(_: String) -> Gt; - fn gte(_: String) -> Gte; - fn contains(_: String) -> Contains; - fn starts_with(_: String) -> StartsWith; - fn ends_with(_: String) -> EndsWith; - fn not(_: String) -> Not; - } - ); - pub struct Order(SortOrder); - pub fn order>(v: SortOrder) -> T { - Order(v).into() - } - impl From for super::OrderByWithRelationParam { - fn from(Order(v): Order) -> Self { - Self::ExtraData(v) - } - } - pub struct Set(pub String); - impl From for SetParam { - fn from(Set(v): Set) -> Self { - Self::ExtraData(_prisma::write_params::StringParam::Set(v)) - } - } - pub fn set>(value: String) -> T { - Set(value).into() - } - pub struct UpdateOperation(pub _prisma::write_params::StringParam); - impl From for SetParam { - fn from(UpdateOperation(v): UpdateOperation) -> Self { - Self::ExtraData(v) - } - } - impl From for UncheckedSetParam { - fn from(Set(v): Set) -> Self { - Self::ExtraData(_prisma::write_params::StringParam::Set(v)) - } - } - impl From for UncheckedSetParam { - fn from(UpdateOperation(v): UpdateOperation) -> Self { - Self::ExtraData(v) - } - } - pub struct Select; - impl Into for Select { - fn into(self) -> super::SelectParam { - super::SelectParam::ExtraData(self) - } - } - impl Into<::prisma_client_rust::Selection> for Select { - fn into(self) -> ::prisma_client_rust::Selection { - ::prisma_client_rust::sel(NAME) - } - } - pub struct Include; - impl Into for Include { - fn into(self) -> super::IncludeParam { - super::IncludeParam::ExtraData(self) - } - } - impl Into<::prisma_client_rust::Selection> for Include { - fn into(self) -> ::prisma_client_rust::Selection { - ::prisma_client_rust::sel(NAME) - } - } - } - pub mod icon_url { - use super::super::{_prisma::*, *}; - use super::{SetParam, UncheckedSetParam, UniqueWhereParam, WhereParam, WithParam}; - pub const NAME: &str = "iconUrl"; - pub type Type = Option; - pub type RecursiveSafeType = Type; - pub struct Equals(pub Option); - pub fn equals>(value: Option) -> T { - Equals(value).into() - } - impl From for WhereParam { - fn from(Equals(v): Equals) -> Self { - WhereParam::IconUrl(_prisma::read_filters::StringNullableFilter::Equals(v)) - } - } - ::prisma_client_rust::scalar_where_param_fns!( - _prisma::read_filters::StringNullableFilter, - IconUrl, - { - fn in_vec(_: Vec) -> InVec; - fn not_in_vec(_: Vec) -> NotInVec; - fn lt(_: String) -> Lt; - fn lte(_: String) -> Lte; - fn gt(_: String) -> Gt; - fn gte(_: String) -> Gte; - fn contains(_: String) -> Contains; - fn starts_with(_: String) -> StartsWith; - fn ends_with(_: String) -> EndsWith; - fn not(_: Option) -> Not; - } - ); - pub struct Order(SortOrder); - pub fn order>(v: SortOrder) -> T { - Order(v).into() - } - impl From for super::OrderByWithRelationParam { - fn from(Order(v): Order) -> Self { - Self::IconUrl(v) - } - } - pub struct Set(pub Option); - impl From for SetParam { - fn from(Set(v): Set) -> Self { - Self::IconUrl(_prisma::write_params::StringNullableParam::Set(v)) - } - } - pub fn set>(value: Option) -> T { - Set(value).into() - } - pub struct UpdateOperation(pub _prisma::write_params::StringNullableParam); - impl From for SetParam { - fn from(UpdateOperation(v): UpdateOperation) -> Self { - Self::IconUrl(v) - } - } - impl From for UncheckedSetParam { - fn from(Set(v): Set) -> Self { - Self::IconUrl(_prisma::write_params::StringNullableParam::Set(v)) - } - } - impl From for UncheckedSetParam { - fn from(UpdateOperation(v): UpdateOperation) -> Self { - Self::IconUrl(v) - } - } - pub struct Select; - impl Into for Select { - fn into(self) -> super::SelectParam { - super::SelectParam::IconUrl(self) - } - } - impl Into<::prisma_client_rust::Selection> for Select { - fn into(self) -> ::prisma_client_rust::Selection { - ::prisma_client_rust::sel(NAME) - } - } - pub struct Include; - impl Into for Include { - fn into(self) -> super::IncludeParam { - super::IncludeParam::IconUrl(self) - } - } - impl Into<::prisma_client_rust::Selection> for Include { - fn into(self) -> ::prisma_client_rust::Selection { - ::prisma_client_rust::sel(NAME) - } - } - } - pub mod id { - use super::super::{_prisma::*, *}; - use super::{SetParam, UncheckedSetParam, UniqueWhereParam, WhereParam, WithParam}; - pub const NAME: &str = "id"; - pub type Type = Int; - pub type RecursiveSafeType = Type; - pub struct Equals(pub Int); - pub fn equals>(value: Int) -> T { - Equals(value).into() - } - impl From for UniqueWhereParam { - fn from(Equals(v): Equals) -> Self { - UniqueWhereParam::IdEquals(v) - } - } - impl From for WhereParam { - fn from(Equals(v): Equals) -> Self { - WhereParam::Id(_prisma::read_filters::IntFilter::Equals(v)) - } - } - ::prisma_client_rust::scalar_where_param_fns!(_prisma::read_filters::IntFilter, Id, { - fn in_vec(_: Vec) -> InVec; - fn not_in_vec(_: Vec) -> NotInVec; - fn lt(_: Int) -> Lt; - fn lte(_: Int) -> Lte; - fn gt(_: Int) -> Gt; - fn gte(_: Int) -> Gte; - fn not(_: Int) -> Not; - }); - pub struct Order(SortOrder); - pub fn order>(v: SortOrder) -> T { - Order(v).into() - } - impl From for super::OrderByWithRelationParam { - fn from(Order(v): Order) -> Self { - Self::Id(v) - } - } - pub struct Set(pub Int); - impl From for SetParam { - fn from(Set(v): Set) -> Self { - Self::Id(_prisma::write_params::IntParam::Set(v)) - } - } - pub fn set>(value: Int) -> T { - Set(value).into() - } - pub struct UpdateOperation(pub _prisma::write_params::IntParam); - impl From for SetParam { - fn from(UpdateOperation(v): UpdateOperation) -> Self { - Self::Id(v) - } - } - pub fn increment>(value: Int) -> T { - UpdateOperation(_prisma::write_params::IntParam::Increment(value)).into() - } - pub fn decrement>(value: Int) -> T { - UpdateOperation(_prisma::write_params::IntParam::Decrement(value)).into() - } - pub fn multiply>(value: Int) -> T { - UpdateOperation(_prisma::write_params::IntParam::Multiply(value)).into() - } - pub fn divide>(value: Int) -> T { - UpdateOperation(_prisma::write_params::IntParam::Divide(value)).into() - } - impl From for UncheckedSetParam { - fn from(Set(v): Set) -> Self { - Self::Id(_prisma::write_params::IntParam::Set(v)) - } - } - impl From for UncheckedSetParam { - fn from(UpdateOperation(v): UpdateOperation) -> Self { - Self::Id(v) - } - } - pub struct Select; - impl Into for Select { - fn into(self) -> super::SelectParam { - super::SelectParam::Id(self) - } - } - impl Into<::prisma_client_rust::Selection> for Select { - fn into(self) -> ::prisma_client_rust::Selection { - ::prisma_client_rust::sel(NAME) - } - } - pub struct Include; - impl Into for Include { - fn into(self) -> super::IncludeParam { - super::IncludeParam::Id(self) - } - } - impl Into<::prisma_client_rust::Selection> for Include { - fn into(self) -> ::prisma_client_rust::Selection { - ::prisma_client_rust::sel(NAME) - } - } - } - pub mod name { - use super::super::{_prisma::*, *}; - use super::{SetParam, UncheckedSetParam, UniqueWhereParam, WhereParam, WithParam}; - pub const NAME: &str = "name"; - pub type Type = String; - pub type RecursiveSafeType = Type; - pub struct Equals(pub String); - pub fn equals>(value: String) -> T { - Equals(value).into() - } - impl From for WhereParam { - fn from(Equals(v): Equals) -> Self { - WhereParam::Name(_prisma::read_filters::StringFilter::Equals(v)) - } - } - ::prisma_client_rust::scalar_where_param_fns!(_prisma::read_filters::StringFilter, Name, { - fn in_vec(_: Vec) -> InVec; - fn not_in_vec(_: Vec) -> NotInVec; - fn lt(_: String) -> Lt; - fn lte(_: String) -> Lte; - fn gt(_: String) -> Gt; - fn gte(_: String) -> Gte; - fn contains(_: String) -> Contains; - fn starts_with(_: String) -> StartsWith; - fn ends_with(_: String) -> EndsWith; - fn not(_: String) -> Not; - }); - pub struct Order(SortOrder); - pub fn order>(v: SortOrder) -> T { - Order(v).into() - } - impl From for super::OrderByWithRelationParam { - fn from(Order(v): Order) -> Self { - Self::Name(v) - } - } - pub struct Set(pub String); - impl From for SetParam { - fn from(Set(v): Set) -> Self { - Self::Name(_prisma::write_params::StringParam::Set(v)) - } - } - pub fn set>(value: String) -> T { - Set(value).into() - } - pub struct UpdateOperation(pub _prisma::write_params::StringParam); - impl From for SetParam { - fn from(UpdateOperation(v): UpdateOperation) -> Self { - Self::Name(v) - } - } - impl From for UncheckedSetParam { - fn from(Set(v): Set) -> Self { - Self::Name(_prisma::write_params::StringParam::Set(v)) - } - } - impl From for UncheckedSetParam { - fn from(UpdateOperation(v): UpdateOperation) -> Self { - Self::Name(v) - } - } - pub struct Select; - impl Into for Select { - fn into(self) -> super::SelectParam { - super::SelectParam::Name(self) - } - } - impl Into<::prisma_client_rust::Selection> for Select { - fn into(self) -> ::prisma_client_rust::Selection { - ::prisma_client_rust::sel(NAME) - } - } - pub struct Include; - impl Into for Include { - fn into(self) -> super::IncludeParam { - super::IncludeParam::Name(self) - } - } - impl Into<::prisma_client_rust::Selection> for Include { - fn into(self) -> ::prisma_client_rust::Selection { - ::prisma_client_rust::sel(NAME) - } - } - } - pub mod plugin { - use super::super::{_prisma::*, *}; - use super::{SetParam, UncheckedSetParam, UniqueWhereParam, WhereParam, WithParam}; - pub const NAME: &str = "plugin"; - pub type Type = String; - pub type RecursiveSafeType = Type; - pub struct Equals(pub String); - pub fn equals>(value: String) -> T { - Equals(value).into() - } - impl From for WhereParam { - fn from(Equals(v): Equals) -> Self { - WhereParam::Plugin(_prisma::read_filters::StringFilter::Equals(v)) - } - } - ::prisma_client_rust::scalar_where_param_fns!( - _prisma::read_filters::StringFilter, - Plugin, - { - fn in_vec(_: Vec) -> InVec; - fn not_in_vec(_: Vec) -> NotInVec; - fn lt(_: String) -> Lt; - fn lte(_: String) -> Lte; - fn gt(_: String) -> Gt; - fn gte(_: String) -> Gte; - fn contains(_: String) -> Contains; - fn starts_with(_: String) -> StartsWith; - fn ends_with(_: String) -> EndsWith; - fn not(_: String) -> Not; - } - ); - pub struct Order(SortOrder); - pub fn order>(v: SortOrder) -> T { - Order(v).into() - } - impl From for super::OrderByWithRelationParam { - fn from(Order(v): Order) -> Self { - Self::Plugin(v) - } - } - pub struct Set(pub String); - impl From for SetParam { - fn from(Set(v): Set) -> Self { - Self::Plugin(_prisma::write_params::StringParam::Set(v)) - } - } - pub fn set>(value: String) -> T { - Set(value).into() - } - pub struct UpdateOperation(pub _prisma::write_params::StringParam); - impl From for SetParam { - fn from(UpdateOperation(v): UpdateOperation) -> Self { - Self::Plugin(v) - } - } - impl From for UncheckedSetParam { - fn from(Set(v): Set) -> Self { - Self::Plugin(_prisma::write_params::StringParam::Set(v)) - } - } - impl From for UncheckedSetParam { - fn from(UpdateOperation(v): UpdateOperation) -> Self { - Self::Plugin(v) - } - } - pub struct Select; - impl Into for Select { - fn into(self) -> super::SelectParam { - super::SelectParam::Plugin(self) - } - } - impl Into<::prisma_client_rust::Selection> for Select { - fn into(self) -> ::prisma_client_rust::Selection { - ::prisma_client_rust::sel(NAME) - } - } - pub struct Include; - impl Into for Include { - fn into(self) -> super::IncludeParam { - super::IncludeParam::Plugin(self) - } - } - impl Into<::prisma_client_rust::Selection> for Include { - fn into(self) -> ::prisma_client_rust::Selection { - ::prisma_client_rust::sel(NAME) - } - } - } - pub mod updated { - use super::super::{_prisma::*, *}; - use super::{SetParam, UncheckedSetParam, UniqueWhereParam, WhereParam, WithParam}; - pub const NAME: &str = "updated"; - pub type Type = DateTime; - pub type RecursiveSafeType = Type; - pub struct Equals(pub DateTime); - pub fn equals>(value: DateTime) -> T { - Equals(value).into() - } - impl From for WhereParam { - fn from(Equals(v): Equals) -> Self { - WhereParam::Updated(_prisma::read_filters::DateTimeFilter::Equals(v)) - } - } - ::prisma_client_rust::scalar_where_param_fns!( - _prisma::read_filters::DateTimeFilter, - Updated, - { - fn in_vec(_: Vec) -> InVec; - fn not_in_vec(_: Vec) -> NotInVec; - fn lt(_: DateTime) -> Lt; - fn lte(_: DateTime) -> Lte; - fn gt(_: DateTime) -> Gt; - fn gte(_: DateTime) -> Gte; - fn not(_: DateTime) -> Not; - } - ); - pub struct Order(SortOrder); - pub fn order>(v: SortOrder) -> T { - Order(v).into() - } - impl From for super::OrderByWithRelationParam { - fn from(Order(v): Order) -> Self { - Self::Updated(v) - } - } - pub struct Set(pub DateTime); - impl From for SetParam { - fn from(Set(v): Set) -> Self { - Self::Updated(_prisma::write_params::DateTimeParam::Set(v)) - } - } - pub fn set>(value: DateTime) -> T { - Set(value).into() - } - pub struct UpdateOperation(pub _prisma::write_params::DateTimeParam); - impl From for SetParam { - fn from(UpdateOperation(v): UpdateOperation) -> Self { - Self::Updated(v) - } - } - impl From for UncheckedSetParam { - fn from(Set(v): Set) -> Self { - Self::Updated(_prisma::write_params::DateTimeParam::Set(v)) - } - } - impl From for UncheckedSetParam { - fn from(UpdateOperation(v): UpdateOperation) -> Self { - Self::Updated(v) - } - } - pub struct Select; - impl Into for Select { - fn into(self) -> super::SelectParam { - super::SelectParam::Updated(self) - } - } - impl Into<::prisma_client_rust::Selection> for Select { - fn into(self) -> ::prisma_client_rust::Selection { - ::prisma_client_rust::sel(NAME) - } - } - pub struct Include; - impl Into for Include { - fn into(self) -> super::IncludeParam { - super::IncludeParam::Updated(self) - } - } - impl Into<::prisma_client_rust::Selection> for Include { - fn into(self) -> ::prisma_client_rust::Selection { - ::prisma_client_rust::sel(NAME) - } - } - } -} -pub mod installed_mod { - use super::{_prisma::*, *}; - pub const NAME: &str = "InstalledMod"; - #[derive(Debug, Clone)] - pub enum WhereParam { - Not(Vec), - Or(Vec), - And(Vec), - Id(super::_prisma::read_filters::IntFilter), - FileSize(super::_prisma::read_filters::IntFilter), - Updated(super::_prisma::read_filters::DateTimeFilter), - IconUrl(super::_prisma::read_filters::StringNullableFilter), - Source(super::_prisma::read_filters::StringFilter), - ProjectId(super::_prisma::read_filters::StringFilter), - ProjectName(super::_prisma::read_filters::StringFilter), - ProjectDesc(super::_prisma::read_filters::StringNullableFilter), - ProjectVersion(super::_prisma::read_filters::StringNullableFilter), - } - impl ::prisma_client_rust::WhereInput for WhereParam { - fn serialize(self) -> ::prisma_client_rust::SerializedWhereInput { - let (name, value) = match self { - Self::Not(value) => ( - "NOT", - ::prisma_client_rust::SerializedWhereValue::Object( - ::prisma_client_rust::merge_fields( - value - .into_iter() - .map(::prisma_client_rust::WhereInput::serialize) - .map(Into::into) - .collect(), - ), - ), - ), - Self::Or(value) => ( - "OR", - ::prisma_client_rust::SerializedWhereValue::List( - value - .into_iter() - .map(::prisma_client_rust::WhereInput::serialize) - .map(|p| ::prisma_client_rust::PrismaValue::Object(vec![p.into()])) - .collect(), - ), - ), - Self::And(value) => ( - "AND", - ::prisma_client_rust::SerializedWhereValue::Object( - ::prisma_client_rust::merge_fields( - value - .into_iter() - .map(::prisma_client_rust::WhereInput::serialize) - .map(Into::into) - .collect(), - ), - ), - ), - Self::Id(value) => (id::NAME, value.into()), - Self::FileSize(value) => (file_size::NAME, value.into()), - Self::Updated(value) => (updated::NAME, value.into()), - Self::IconUrl(value) => (icon_url::NAME, value.into()), - Self::Source(value) => (source::NAME, value.into()), - Self::ProjectId(value) => (project_id::NAME, value.into()), - Self::ProjectName(value) => (project_name::NAME, value.into()), - Self::ProjectDesc(value) => (project_desc::NAME, value.into()), - Self::ProjectVersion(value) => (project_version::NAME, value.into()), - }; - ::prisma_client_rust::SerializedWhereInput::new(name.to_string(), value.into()) - } - } - #[derive(Debug, Clone)] - pub enum UniqueWhereParam { - IdEquals(Int), - ProjectIdEquals(String), - } - impl ::prisma_client_rust::WhereInput for UniqueWhereParam { - fn serialize(self) -> ::prisma_client_rust::SerializedWhereInput { - let (name, value) = match self { - UniqueWhereParam::IdEquals(value) => ( - "id", - ::prisma_client_rust::SerializedWhereValue::Value( - ::prisma_client_rust::PrismaValue::Int(value), - ), - ), - UniqueWhereParam::ProjectIdEquals(value) => ( - "projectId", - ::prisma_client_rust::SerializedWhereValue::Value( - ::prisma_client_rust::PrismaValue::String(value), - ), - ), - }; - ::prisma_client_rust::SerializedWhereInput::new(name.to_string(), value.into()) - } - } - impl From<::prisma_client_rust::Operator> for WhereParam { - fn from(op: ::prisma_client_rust::Operator) -> Self { - match op { - ::prisma_client_rust::Operator::Not(value) => Self::Not(value), - ::prisma_client_rust::Operator::And(value) => Self::And(value), - ::prisma_client_rust::Operator::Or(value) => Self::Or(value), - } - } - } - #[derive(Debug, Clone)] - pub enum OrderByWithRelationParam { - Id(super::SortOrder), - FileSize(super::SortOrder), - Updated(super::SortOrder), - IconUrl(super::SortOrder), - Source(super::SortOrder), - ProjectId(super::SortOrder), - ProjectName(super::SortOrder), - ProjectDesc(super::SortOrder), - ProjectVersion(super::SortOrder), - } - impl Into<(String, ::prisma_client_rust::PrismaValue)> for OrderByWithRelationParam { - fn into(self) -> (String, ::prisma_client_rust::PrismaValue) { - let (k, v) = match self { - Self::Id(param) => ("id", param.into()), - Self::FileSize(param) => ("fileSize", param.into()), - Self::Updated(param) => ("updated", param.into()), - Self::IconUrl(param) => ("iconUrl", param.into()), - Self::Source(param) => ("source", param.into()), - Self::ProjectId(param) => ("projectId", param.into()), - Self::ProjectName(param) => ("projectName", param.into()), - Self::ProjectDesc(param) => ("projectDesc", param.into()), - Self::ProjectVersion(param) => ("projectVersion", param.into()), - }; - (k.to_string(), v) - } - } - #[derive(Debug, Clone)] - pub enum WithParam {} - impl Into<::prisma_client_rust::Selection> for WithParam { - fn into(self) -> ::prisma_client_rust::Selection { - match self {} - } - } - #[derive(Debug, Clone)] - pub enum SetParam { - Id(super::_prisma::write_params::IntParam), - FileSize(super::_prisma::write_params::IntParam), - Updated(super::_prisma::write_params::DateTimeParam), - IconUrl(super::_prisma::write_params::StringNullableParam), - Source(super::_prisma::write_params::StringParam), - ProjectId(super::_prisma::write_params::StringParam), - ProjectName(super::_prisma::write_params::StringParam), - ProjectDesc(super::_prisma::write_params::StringNullableParam), - ProjectVersion(super::_prisma::write_params::StringNullableParam), - } - impl Into<(String, ::prisma_client_rust::PrismaValue)> for SetParam { - fn into(self) -> (String, ::prisma_client_rust::PrismaValue) { - let (k, v) = match self { - Self::Id(value) => (id::NAME, value.into()), - Self::FileSize(value) => (file_size::NAME, value.into()), - Self::Updated(value) => (updated::NAME, value.into()), - Self::IconUrl(value) => (icon_url::NAME, value.into()), - Self::Source(value) => (source::NAME, value.into()), - Self::ProjectId(value) => (project_id::NAME, value.into()), - Self::ProjectName(value) => (project_name::NAME, value.into()), - Self::ProjectDesc(value) => (project_desc::NAME, value.into()), - Self::ProjectVersion(value) => (project_version::NAME, value.into()), - }; - (k.to_string(), v) - } - } - #[derive(Debug, Clone)] - pub enum UncheckedSetParam { - Id(super::_prisma::write_params::IntParam), - FileSize(super::_prisma::write_params::IntParam), - Updated(super::_prisma::write_params::DateTimeParam), - IconUrl(super::_prisma::write_params::StringNullableParam), - Source(super::_prisma::write_params::StringParam), - ProjectId(super::_prisma::write_params::StringParam), - ProjectName(super::_prisma::write_params::StringParam), - ProjectDesc(super::_prisma::write_params::StringNullableParam), - ProjectVersion(super::_prisma::write_params::StringNullableParam), - } - impl Into<(String, ::prisma_client_rust::PrismaValue)> for UncheckedSetParam { - fn into(self) -> (String, ::prisma_client_rust::PrismaValue) { - let (k, v) = match self { - Self::Id(value) => ("id", value.into()), - Self::FileSize(value) => ("fileSize", value.into()), - Self::Updated(value) => ("updated", value.into()), - Self::IconUrl(value) => ("iconUrl", value.into()), - Self::Source(value) => ("source", value.into()), - Self::ProjectId(value) => ("projectId", value.into()), - Self::ProjectName(value) => ("projectName", value.into()), - Self::ProjectDesc(value) => ("projectDesc", value.into()), - Self::ProjectVersion(value) => ("projectVersion", value.into()), - }; - (k.to_string(), v) - } - } - ::prisma_client_rust::macros::select_factory!( - _select_installed_mod, - select, - prisma::installed_mod, - struct Data { - #[serde(rename = "id")] - id: id::Type, - #[serde(rename = "fileSize")] - file_size: file_size::Type, - #[serde(rename = "updated")] - updated: updated::Type, - #[serde(rename = "iconUrl")] - icon_url: icon_url::Type, - #[serde(rename = "source")] - source: source::Type, - #[serde(rename = "projectId")] - project_id: project_id::Type, - #[serde(rename = "projectName")] - project_name: project_name::Type, - #[serde(rename = "projectDesc")] - project_desc: project_desc::Type, - #[serde(rename = "projectVersion")] - project_version: project_version::Type, - }, - [ - (id, Scalar), - (file_size, Scalar), - (updated, Scalar), - (icon_url, Scalar), - (source, Scalar), - (project_id, Scalar), - (project_name, Scalar), - (project_desc, Scalar), - (project_version, Scalar) - ] - ); - pub enum SelectParam { - Id(id::Select), - FileSize(file_size::Select), - Updated(updated::Select), - IconUrl(icon_url::Select), - Source(source::Select), - ProjectId(project_id::Select), - ProjectName(project_name::Select), - ProjectDesc(project_desc::Select), - ProjectVersion(project_version::Select), - } - impl Into<::prisma_client_rust::Selection> for SelectParam { - fn into(self) -> ::prisma_client_rust::Selection { - match self { - Self::Id(data) => data.into(), - Self::FileSize(data) => data.into(), - Self::Updated(data) => data.into(), - Self::IconUrl(data) => data.into(), - Self::Source(data) => data.into(), - Self::ProjectId(data) => data.into(), - Self::ProjectName(data) => data.into(), - Self::ProjectDesc(data) => data.into(), - Self::ProjectVersion(data) => data.into(), - } - } - } - ::prisma_client_rust::macros::include_factory!( - _include_installed_mod, - include, - prisma::installed_mod, - struct Data { - #[serde(rename = "id")] - id: id::Type, - #[serde(rename = "fileSize")] - file_size: file_size::Type, - #[serde(rename = "updated")] - updated: updated::Type, - #[serde(rename = "iconUrl")] - icon_url: icon_url::Type, - #[serde(rename = "source")] - source: source::Type, - #[serde(rename = "projectId")] - project_id: project_id::Type, - #[serde(rename = "projectName")] - project_name: project_name::Type, - #[serde(rename = "projectDesc")] - project_desc: project_desc::Type, - #[serde(rename = "projectVersion")] - project_version: project_version::Type, - }, - [] - ); - pub enum IncludeParam { - Id(id::Include), - FileSize(file_size::Include), - Updated(updated::Include), - IconUrl(icon_url::Include), - Source(source::Include), - ProjectId(project_id::Include), - ProjectName(project_name::Include), - ProjectDesc(project_desc::Include), - ProjectVersion(project_version::Include), - } - impl Into<::prisma_client_rust::Selection> for IncludeParam { - fn into(self) -> ::prisma_client_rust::Selection { - match self { - Self::Id(data) => data.into(), - Self::FileSize(data) => data.into(), - Self::Updated(data) => data.into(), - Self::IconUrl(data) => data.into(), - Self::Source(data) => data.into(), - Self::ProjectId(data) => data.into(), - Self::ProjectName(data) => data.into(), - Self::ProjectDesc(data) => data.into(), - Self::ProjectVersion(data) => data.into(), - } - } - } - #[derive(Debug, Clone)] - pub struct Create { - pub file_size: Int, - pub source: String, - pub project_id: String, - pub project_name: String, - pub _params: Vec, - } - impl Create { - pub fn to_query<'a>(self, client: &'a PrismaClient) -> CreateQuery<'a> { - client.installed_mod().create( - self.file_size, - self.source, - self.project_id, - self.project_name, - self._params, - ) - } - pub fn to_params(mut self) -> Vec { - self._params.extend([ - file_size::set(self.file_size), - source::set(self.source), - project_id::set(self.project_id), - project_name::set(self.project_name), - ]); - self._params - } - } - pub fn create( - file_size: Int, - source: String, - project_id: String, - project_name: String, - _params: Vec, - ) -> Create { - Create { - file_size, - source, - project_id, - project_name, - _params, - } - } - #[derive( - Debug, - Clone, - :: serde :: Serialize, - :: serde :: Deserialize, - :: prisma_client_rust :: specta :: Type, - )] - # [specta (rename = "InstalledModCreation" , crate = prisma_client_rust :: specta)] - pub struct CreateUnchecked { - #[serde(rename = "fileSize")] - pub file_size: Int, - #[serde(rename = "source")] - pub source: String, - #[serde(rename = "projectId")] - pub project_id: String, - #[serde(rename = "projectName")] - pub project_name: String, - #[serde(skip)] - pub _params: Vec, - } - impl CreateUnchecked { - pub fn to_query<'a>(self, client: &'a PrismaClient) -> CreateUncheckedQuery<'a> { - client.installed_mod().create_unchecked( - self.file_size, - self.source, - self.project_id, - self.project_name, - self._params, - ) - } - pub fn to_params(mut self) -> Vec { - self._params.extend([ - file_size::set(self.file_size), - source::set(self.source), - project_id::set(self.project_id), - project_name::set(self.project_name), - ]); - self._params - } - } - pub fn create_unchecked( - file_size: Int, - source: String, - project_id: String, - project_name: String, - _params: Vec, - ) -> CreateUnchecked { - CreateUnchecked { - file_size, - source, - project_id, - project_name, - _params, - } - } - #[derive( - Debug, - Clone, - :: serde :: Serialize, - :: serde :: Deserialize, - :: prisma_client_rust :: specta :: Type, - )] - # [specta (rename = "InstalledModUpdate" , crate = prisma_client_rust :: specta)] - pub struct Update { - #[serde(rename = "id")] - pub id: id::Type, - #[serde(rename = "fileSize", skip_serializing_if = "Option::is_none")] - pub file_size: Option, - #[serde(rename = "updated", skip_serializing_if = "Option::is_none")] - pub updated: Option, - #[serde(rename = "iconUrl", skip_serializing_if = "Option::is_none")] - pub icon_url: icon_url::Type, - #[serde(rename = "source", skip_serializing_if = "Option::is_none")] - pub source: Option, - #[serde(rename = "projectId", skip_serializing_if = "Option::is_none")] - pub project_id: Option, - #[serde(rename = "projectName", skip_serializing_if = "Option::is_none")] - pub project_name: Option, - #[serde(rename = "projectDesc", skip_serializing_if = "Option::is_none")] - pub project_desc: project_desc::Type, - #[serde(rename = "projectVersion", skip_serializing_if = "Option::is_none")] - pub project_version: project_version::Type, - } - impl Update { - pub fn as_params(self) -> Vec { - let mut params = Vec::new(); - if let Some(field) = self.file_size { - params.push(file_size::set(field)); - } - if let Some(field) = self.updated { - params.push(updated::set(field)); - } - if let Some(field) = self.icon_url { - params.push(icon_url::set(Some(field))); - } - if let Some(field) = self.source { - params.push(source::set(field)); - } - if let Some(field) = self.project_id { - params.push(project_id::set(field)); - } - if let Some(field) = self.project_name { - params.push(project_name::set(field)); - } - if let Some(field) = self.project_desc { - params.push(project_desc::set(Some(field))); - } - if let Some(field) = self.project_version { - params.push(project_version::set(Some(field))); - } - params - } - } - #[derive(Debug, Clone)] - pub struct Types; - impl ::prisma_client_rust::ModelTypes for Types { - type Data = Data; - type Where = WhereParam; - type WhereUnique = UniqueWhereParam; - type UncheckedSet = UncheckedSetParam; - type Set = SetParam; - type With = WithParam; - type OrderBy = OrderByWithRelationParam; - type Cursor = UniqueWhereParam; - const MODEL: &'static str = NAME; - fn scalar_selections() -> Vec<::prisma_client_rust::Selection> { - vec![ - ::prisma_client_rust::sel(id::NAME), - ::prisma_client_rust::sel(file_size::NAME), - ::prisma_client_rust::sel(updated::NAME), - ::prisma_client_rust::sel(icon_url::NAME), - ::prisma_client_rust::sel(source::NAME), - ::prisma_client_rust::sel(project_id::NAME), - ::prisma_client_rust::sel(project_name::NAME), - ::prisma_client_rust::sel(project_desc::NAME), - ::prisma_client_rust::sel(project_version::NAME), - ] - } - } - #[derive( - Debug, - Clone, - :: serde :: Serialize, - :: serde :: Deserialize, - :: prisma_client_rust :: specta :: Type, - )] - # [specta (rename = "InstalledMod" , crate = prisma_client_rust :: specta)] - pub struct Data { - #[serde(rename = "id")] - pub id: id::Type, - #[serde(rename = "fileSize")] - pub file_size: file_size::Type, - #[serde(rename = "updated")] - pub updated: updated::Type, - #[serde(rename = "iconUrl")] - pub icon_url: icon_url::Type, - #[serde(rename = "source")] - pub source: source::Type, - #[serde(rename = "projectId")] - pub project_id: project_id::Type, - #[serde(rename = "projectName")] - pub project_name: project_name::Type, - #[serde(rename = "projectDesc")] - pub project_desc: project_desc::Type, - #[serde(rename = "projectVersion")] - pub project_version: project_version::Type, - } - impl Data {} - ::prisma_client_rust::macros::partial_unchecked_factory!( - _partial_unchecked_installed_mod, - prisma::installed_mod, - struct Data { - #[serde(rename = "id")] - pub id: prisma::installed_mod::id::Type, - #[serde(rename = "fileSize")] - pub file_size: prisma::installed_mod::file_size::Type, - #[serde(rename = "updated")] - pub updated: prisma::installed_mod::updated::Type, - #[serde(rename = "iconUrl")] - #[serde(default, with = "::prisma_client_rust::serde::double_option")] - pub icon_url: prisma::installed_mod::icon_url::Type, - #[serde(rename = "source")] - pub source: prisma::installed_mod::source::Type, - #[serde(rename = "projectId")] - pub project_id: prisma::installed_mod::project_id::Type, - #[serde(rename = "projectName")] - pub project_name: prisma::installed_mod::project_name::Type, - #[serde(rename = "projectDesc")] - #[serde(default, with = "::prisma_client_rust::serde::double_option")] - pub project_desc: prisma::installed_mod::project_desc::Type, - #[serde(rename = "projectVersion")] - #[serde(default, with = "::prisma_client_rust::serde::double_option")] - pub project_version: prisma::installed_mod::project_version::Type, - } - ); - ::prisma_client_rust::macros::filter_factory!( - _installed_mod_filter, - prisma::installed_mod, - [ - (id, Scalar), - (file_size, Scalar), - (updated, Scalar), - (icon_url, Scalar), - (source, Scalar), - (project_id, Scalar), - (project_name, Scalar), - (project_desc, Scalar), - (project_version, Scalar) - ] - ); - pub type UniqueArgs = ::prisma_client_rust::UniqueArgs; - pub type ManyArgs = ::prisma_client_rust::ManyArgs; - pub type CountQuery<'a> = ::prisma_client_rust::Count<'a, Types>; - pub type CreateQuery<'a> = ::prisma_client_rust::Create<'a, Types>; - pub type CreateUncheckedQuery<'a> = ::prisma_client_rust::CreateUnchecked<'a, Types>; - pub type CreateManyQuery<'a> = ::prisma_client_rust::CreateMany<'a, Types>; - pub type FindUniqueQuery<'a> = ::prisma_client_rust::FindUnique<'a, Types>; - pub type FindManyQuery<'a> = ::prisma_client_rust::FindMany<'a, Types>; - pub type FindFirstQuery<'a> = ::prisma_client_rust::FindFirst<'a, Types>; - pub type UpdateQuery<'a> = ::prisma_client_rust::Update<'a, Types>; - pub type UpdateUncheckedQuery<'a> = ::prisma_client_rust::UpdateUnchecked<'a, Types>; - pub type UpdateManyQuery<'a> = ::prisma_client_rust::UpdateMany<'a, Types>; - pub type UpsertQuery<'a> = ::prisma_client_rust::Upsert<'a, Types>; - pub type DeleteQuery<'a> = ::prisma_client_rust::Delete<'a, Types>; - pub type DeleteManyQuery<'a> = ::prisma_client_rust::DeleteMany<'a, Types>; - #[derive(Clone)] - pub struct Actions<'a> { - pub client: &'a ::prisma_client_rust::PrismaClientInternals, - } - impl<'a> Actions<'a> { - pub fn find_unique(self, _where: UniqueWhereParam) -> FindUniqueQuery<'a> { - FindUniqueQuery::new(self.client, _where) - } - pub fn find_first(self, _where: Vec) -> FindFirstQuery<'a> { - FindFirstQuery::new(self.client, _where) - } - pub fn find_many(self, _where: Vec) -> FindManyQuery<'a> { - FindManyQuery::new(self.client, _where) - } - pub fn create( - self, - file_size: Int, - source: String, - project_id: String, - project_name: String, - mut _params: Vec, - ) -> CreateQuery<'a> { - _params.extend([ - file_size::set(file_size), - source::set(source), - project_id::set(project_id), - project_name::set(project_name), - ]); - CreateQuery::new(self.client, _params) - } - pub fn create_unchecked( - self, - file_size: Int, - source: String, - project_id: String, - project_name: String, - mut _params: Vec, - ) -> CreateUncheckedQuery<'a> { - _params.extend([ - file_size::set(file_size), - source::set(source), - project_id::set(project_id), - project_name::set(project_name), - ]); - CreateUncheckedQuery::new(self.client, _params.into_iter().map(Into::into).collect()) - } - pub fn create_many(self, data: Vec) -> CreateManyQuery<'a> { - let data = data.into_iter().map(CreateUnchecked::to_params).collect(); - CreateManyQuery::new(self.client, data) - } - pub fn update(self, _where: UniqueWhereParam, _params: Vec) -> UpdateQuery<'a> { - UpdateQuery::new(self.client, _where, _params, vec![]) - } - pub fn update_unchecked( - self, - _where: UniqueWhereParam, - _params: Vec, - ) -> UpdateUncheckedQuery<'a> { - UpdateUncheckedQuery::new( - self.client, - _where, - _params.into_iter().map(Into::into).collect(), - vec![], - ) - } - pub fn update_many( - self, - _where: Vec, - _params: Vec, - ) -> UpdateManyQuery<'a> { - UpdateManyQuery::new(self.client, _where, _params) - } - pub fn upsert( - self, - _where: UniqueWhereParam, - _create: Create, - _update: Vec, - ) -> UpsertQuery<'a> { - UpsertQuery::new(self.client, _where, _create.to_params(), _update) - } - pub fn delete(self, _where: UniqueWhereParam) -> DeleteQuery<'a> { - DeleteQuery::new(self.client, _where, vec![]) - } - pub fn delete_many(self, _where: Vec) -> DeleteManyQuery<'a> { - DeleteManyQuery::new(self.client, _where) - } - pub fn count(self, _where: Vec) -> CountQuery<'a> { - CountQuery::new(self.client, _where) - } - } - pub mod file_size { - use super::super::{_prisma::*, *}; - use super::{SetParam, UncheckedSetParam, UniqueWhereParam, WhereParam, WithParam}; - pub const NAME: &str = "fileSize"; - pub type Type = Int; - pub type RecursiveSafeType = Type; - pub struct Equals(pub Int); - pub fn equals>(value: Int) -> T { - Equals(value).into() - } - impl From for WhereParam { - fn from(Equals(v): Equals) -> Self { - WhereParam::FileSize(_prisma::read_filters::IntFilter::Equals(v)) - } - } - ::prisma_client_rust::scalar_where_param_fns!( - _prisma::read_filters::IntFilter, - FileSize, - { - fn in_vec(_: Vec) -> InVec; - fn not_in_vec(_: Vec) -> NotInVec; - fn lt(_: Int) -> Lt; - fn lte(_: Int) -> Lte; - fn gt(_: Int) -> Gt; - fn gte(_: Int) -> Gte; - fn not(_: Int) -> Not; - } - ); - pub struct Order(SortOrder); - pub fn order>(v: SortOrder) -> T { - Order(v).into() - } - impl From for super::OrderByWithRelationParam { - fn from(Order(v): Order) -> Self { - Self::FileSize(v) - } - } - pub struct Set(pub Int); - impl From for SetParam { - fn from(Set(v): Set) -> Self { - Self::FileSize(_prisma::write_params::IntParam::Set(v)) - } - } - pub fn set>(value: Int) -> T { - Set(value).into() - } - pub struct UpdateOperation(pub _prisma::write_params::IntParam); - impl From for SetParam { - fn from(UpdateOperation(v): UpdateOperation) -> Self { - Self::FileSize(v) - } - } - pub fn increment>(value: Int) -> T { - UpdateOperation(_prisma::write_params::IntParam::Increment(value)).into() - } - pub fn decrement>(value: Int) -> T { - UpdateOperation(_prisma::write_params::IntParam::Decrement(value)).into() - } - pub fn multiply>(value: Int) -> T { - UpdateOperation(_prisma::write_params::IntParam::Multiply(value)).into() - } - pub fn divide>(value: Int) -> T { - UpdateOperation(_prisma::write_params::IntParam::Divide(value)).into() - } - impl From for UncheckedSetParam { - fn from(Set(v): Set) -> Self { - Self::FileSize(_prisma::write_params::IntParam::Set(v)) - } - } - impl From for UncheckedSetParam { - fn from(UpdateOperation(v): UpdateOperation) -> Self { - Self::FileSize(v) - } - } - pub struct Select; - impl Into for Select { - fn into(self) -> super::SelectParam { - super::SelectParam::FileSize(self) - } - } - impl Into<::prisma_client_rust::Selection> for Select { - fn into(self) -> ::prisma_client_rust::Selection { - ::prisma_client_rust::sel(NAME) - } - } - pub struct Include; - impl Into for Include { - fn into(self) -> super::IncludeParam { - super::IncludeParam::FileSize(self) - } - } - impl Into<::prisma_client_rust::Selection> for Include { - fn into(self) -> ::prisma_client_rust::Selection { - ::prisma_client_rust::sel(NAME) - } - } - } - pub mod icon_url { - use super::super::{_prisma::*, *}; - use super::{SetParam, UncheckedSetParam, UniqueWhereParam, WhereParam, WithParam}; - pub const NAME: &str = "iconUrl"; - pub type Type = Option; - pub type RecursiveSafeType = Type; - pub struct Equals(pub Option); - pub fn equals>(value: Option) -> T { - Equals(value).into() - } - impl From for WhereParam { - fn from(Equals(v): Equals) -> Self { - WhereParam::IconUrl(_prisma::read_filters::StringNullableFilter::Equals(v)) - } - } - ::prisma_client_rust::scalar_where_param_fns!( - _prisma::read_filters::StringNullableFilter, - IconUrl, - { - fn in_vec(_: Vec) -> InVec; - fn not_in_vec(_: Vec) -> NotInVec; - fn lt(_: String) -> Lt; - fn lte(_: String) -> Lte; - fn gt(_: String) -> Gt; - fn gte(_: String) -> Gte; - fn contains(_: String) -> Contains; - fn starts_with(_: String) -> StartsWith; - fn ends_with(_: String) -> EndsWith; - fn not(_: Option) -> Not; - } - ); - pub struct Order(SortOrder); - pub fn order>(v: SortOrder) -> T { - Order(v).into() - } - impl From for super::OrderByWithRelationParam { - fn from(Order(v): Order) -> Self { - Self::IconUrl(v) - } - } - pub struct Set(pub Option); - impl From for SetParam { - fn from(Set(v): Set) -> Self { - Self::IconUrl(_prisma::write_params::StringNullableParam::Set(v)) - } - } - pub fn set>(value: Option) -> T { - Set(value).into() - } - pub struct UpdateOperation(pub _prisma::write_params::StringNullableParam); - impl From for SetParam { - fn from(UpdateOperation(v): UpdateOperation) -> Self { - Self::IconUrl(v) - } - } - impl From for UncheckedSetParam { - fn from(Set(v): Set) -> Self { - Self::IconUrl(_prisma::write_params::StringNullableParam::Set(v)) - } - } - impl From for UncheckedSetParam { - fn from(UpdateOperation(v): UpdateOperation) -> Self { - Self::IconUrl(v) - } - } - pub struct Select; - impl Into for Select { - fn into(self) -> super::SelectParam { - super::SelectParam::IconUrl(self) - } - } - impl Into<::prisma_client_rust::Selection> for Select { - fn into(self) -> ::prisma_client_rust::Selection { - ::prisma_client_rust::sel(NAME) - } - } - pub struct Include; - impl Into for Include { - fn into(self) -> super::IncludeParam { - super::IncludeParam::IconUrl(self) - } - } - impl Into<::prisma_client_rust::Selection> for Include { - fn into(self) -> ::prisma_client_rust::Selection { - ::prisma_client_rust::sel(NAME) - } - } - } - pub mod id { - use super::super::{_prisma::*, *}; - use super::{SetParam, UncheckedSetParam, UniqueWhereParam, WhereParam, WithParam}; - pub const NAME: &str = "id"; - pub type Type = Int; - pub type RecursiveSafeType = Type; - pub struct Equals(pub Int); - pub fn equals>(value: Int) -> T { - Equals(value).into() - } - impl From for UniqueWhereParam { - fn from(Equals(v): Equals) -> Self { - UniqueWhereParam::IdEquals(v) - } - } - impl From for WhereParam { - fn from(Equals(v): Equals) -> Self { - WhereParam::Id(_prisma::read_filters::IntFilter::Equals(v)) - } - } - ::prisma_client_rust::scalar_where_param_fns!(_prisma::read_filters::IntFilter, Id, { - fn in_vec(_: Vec) -> InVec; - fn not_in_vec(_: Vec) -> NotInVec; - fn lt(_: Int) -> Lt; - fn lte(_: Int) -> Lte; - fn gt(_: Int) -> Gt; - fn gte(_: Int) -> Gte; - fn not(_: Int) -> Not; - }); - pub struct Order(SortOrder); - pub fn order>(v: SortOrder) -> T { - Order(v).into() - } - impl From for super::OrderByWithRelationParam { - fn from(Order(v): Order) -> Self { - Self::Id(v) - } - } - pub struct Set(pub Int); - impl From for SetParam { - fn from(Set(v): Set) -> Self { - Self::Id(_prisma::write_params::IntParam::Set(v)) - } - } - pub fn set>(value: Int) -> T { - Set(value).into() - } - pub struct UpdateOperation(pub _prisma::write_params::IntParam); - impl From for SetParam { - fn from(UpdateOperation(v): UpdateOperation) -> Self { - Self::Id(v) - } - } - pub fn increment>(value: Int) -> T { - UpdateOperation(_prisma::write_params::IntParam::Increment(value)).into() - } - pub fn decrement>(value: Int) -> T { - UpdateOperation(_prisma::write_params::IntParam::Decrement(value)).into() - } - pub fn multiply>(value: Int) -> T { - UpdateOperation(_prisma::write_params::IntParam::Multiply(value)).into() - } - pub fn divide>(value: Int) -> T { - UpdateOperation(_prisma::write_params::IntParam::Divide(value)).into() - } - impl From for UncheckedSetParam { - fn from(Set(v): Set) -> Self { - Self::Id(_prisma::write_params::IntParam::Set(v)) - } - } - impl From for UncheckedSetParam { - fn from(UpdateOperation(v): UpdateOperation) -> Self { - Self::Id(v) - } - } - pub struct Select; - impl Into for Select { - fn into(self) -> super::SelectParam { - super::SelectParam::Id(self) - } - } - impl Into<::prisma_client_rust::Selection> for Select { - fn into(self) -> ::prisma_client_rust::Selection { - ::prisma_client_rust::sel(NAME) - } - } - pub struct Include; - impl Into for Include { - fn into(self) -> super::IncludeParam { - super::IncludeParam::Id(self) - } - } - impl Into<::prisma_client_rust::Selection> for Include { - fn into(self) -> ::prisma_client_rust::Selection { - ::prisma_client_rust::sel(NAME) - } - } - } - pub mod project_desc { - use super::super::{_prisma::*, *}; - use super::{SetParam, UncheckedSetParam, UniqueWhereParam, WhereParam, WithParam}; - pub const NAME: &str = "projectDesc"; - pub type Type = Option; - pub type RecursiveSafeType = Type; - pub struct Equals(pub Option); - pub fn equals>(value: Option) -> T { - Equals(value).into() - } - impl From for WhereParam { - fn from(Equals(v): Equals) -> Self { - WhereParam::ProjectDesc(_prisma::read_filters::StringNullableFilter::Equals(v)) - } - } - ::prisma_client_rust::scalar_where_param_fns!( - _prisma::read_filters::StringNullableFilter, - ProjectDesc, - { - fn in_vec(_: Vec) -> InVec; - fn not_in_vec(_: Vec) -> NotInVec; - fn lt(_: String) -> Lt; - fn lte(_: String) -> Lte; - fn gt(_: String) -> Gt; - fn gte(_: String) -> Gte; - fn contains(_: String) -> Contains; - fn starts_with(_: String) -> StartsWith; - fn ends_with(_: String) -> EndsWith; - fn not(_: Option) -> Not; - } - ); - pub struct Order(SortOrder); - pub fn order>(v: SortOrder) -> T { - Order(v).into() - } - impl From for super::OrderByWithRelationParam { - fn from(Order(v): Order) -> Self { - Self::ProjectDesc(v) - } - } - pub struct Set(pub Option); - impl From for SetParam { - fn from(Set(v): Set) -> Self { - Self::ProjectDesc(_prisma::write_params::StringNullableParam::Set(v)) - } - } - pub fn set>(value: Option) -> T { - Set(value).into() - } - pub struct UpdateOperation(pub _prisma::write_params::StringNullableParam); - impl From for SetParam { - fn from(UpdateOperation(v): UpdateOperation) -> Self { - Self::ProjectDesc(v) - } - } - impl From for UncheckedSetParam { - fn from(Set(v): Set) -> Self { - Self::ProjectDesc(_prisma::write_params::StringNullableParam::Set(v)) - } - } - impl From for UncheckedSetParam { - fn from(UpdateOperation(v): UpdateOperation) -> Self { - Self::ProjectDesc(v) - } - } - pub struct Select; - impl Into for Select { - fn into(self) -> super::SelectParam { - super::SelectParam::ProjectDesc(self) - } - } - impl Into<::prisma_client_rust::Selection> for Select { - fn into(self) -> ::prisma_client_rust::Selection { - ::prisma_client_rust::sel(NAME) - } - } - pub struct Include; - impl Into for Include { - fn into(self) -> super::IncludeParam { - super::IncludeParam::ProjectDesc(self) - } - } - impl Into<::prisma_client_rust::Selection> for Include { - fn into(self) -> ::prisma_client_rust::Selection { - ::prisma_client_rust::sel(NAME) - } - } - } - pub mod project_id { - use super::super::{_prisma::*, *}; - use super::{SetParam, UncheckedSetParam, UniqueWhereParam, WhereParam, WithParam}; - pub const NAME: &str = "projectId"; - pub type Type = String; - pub type RecursiveSafeType = Type; - pub struct Equals(pub String); - pub fn equals>(value: String) -> T { - Equals(value).into() - } - impl From for UniqueWhereParam { - fn from(Equals(v): Equals) -> Self { - UniqueWhereParam::ProjectIdEquals(v) - } - } - impl From for WhereParam { - fn from(Equals(v): Equals) -> Self { - WhereParam::ProjectId(_prisma::read_filters::StringFilter::Equals(v)) - } - } - ::prisma_client_rust::scalar_where_param_fns!( - _prisma::read_filters::StringFilter, - ProjectId, - { - fn in_vec(_: Vec) -> InVec; - fn not_in_vec(_: Vec) -> NotInVec; - fn lt(_: String) -> Lt; - fn lte(_: String) -> Lte; - fn gt(_: String) -> Gt; - fn gte(_: String) -> Gte; - fn contains(_: String) -> Contains; - fn starts_with(_: String) -> StartsWith; - fn ends_with(_: String) -> EndsWith; - fn not(_: String) -> Not; - } - ); - pub struct Order(SortOrder); - pub fn order>(v: SortOrder) -> T { - Order(v).into() - } - impl From for super::OrderByWithRelationParam { - fn from(Order(v): Order) -> Self { - Self::ProjectId(v) - } - } - pub struct Set(pub String); - impl From for SetParam { - fn from(Set(v): Set) -> Self { - Self::ProjectId(_prisma::write_params::StringParam::Set(v)) - } - } - pub fn set>(value: String) -> T { - Set(value).into() - } - pub struct UpdateOperation(pub _prisma::write_params::StringParam); - impl From for SetParam { - fn from(UpdateOperation(v): UpdateOperation) -> Self { - Self::ProjectId(v) - } - } - impl From for UncheckedSetParam { - fn from(Set(v): Set) -> Self { - Self::ProjectId(_prisma::write_params::StringParam::Set(v)) - } - } - impl From for UncheckedSetParam { - fn from(UpdateOperation(v): UpdateOperation) -> Self { - Self::ProjectId(v) - } - } - pub struct Select; - impl Into for Select { - fn into(self) -> super::SelectParam { - super::SelectParam::ProjectId(self) - } - } - impl Into<::prisma_client_rust::Selection> for Select { - fn into(self) -> ::prisma_client_rust::Selection { - ::prisma_client_rust::sel(NAME) - } - } - pub struct Include; - impl Into for Include { - fn into(self) -> super::IncludeParam { - super::IncludeParam::ProjectId(self) - } - } - impl Into<::prisma_client_rust::Selection> for Include { - fn into(self) -> ::prisma_client_rust::Selection { - ::prisma_client_rust::sel(NAME) - } - } - } - pub mod project_name { - use super::super::{_prisma::*, *}; - use super::{SetParam, UncheckedSetParam, UniqueWhereParam, WhereParam, WithParam}; - pub const NAME: &str = "projectName"; - pub type Type = String; - pub type RecursiveSafeType = Type; - pub struct Equals(pub String); - pub fn equals>(value: String) -> T { - Equals(value).into() - } - impl From for WhereParam { - fn from(Equals(v): Equals) -> Self { - WhereParam::ProjectName(_prisma::read_filters::StringFilter::Equals(v)) - } - } - ::prisma_client_rust::scalar_where_param_fns!( - _prisma::read_filters::StringFilter, - ProjectName, - { - fn in_vec(_: Vec) -> InVec; - fn not_in_vec(_: Vec) -> NotInVec; - fn lt(_: String) -> Lt; - fn lte(_: String) -> Lte; - fn gt(_: String) -> Gt; - fn gte(_: String) -> Gte; - fn contains(_: String) -> Contains; - fn starts_with(_: String) -> StartsWith; - fn ends_with(_: String) -> EndsWith; - fn not(_: String) -> Not; - } - ); - pub struct Order(SortOrder); - pub fn order>(v: SortOrder) -> T { - Order(v).into() - } - impl From for super::OrderByWithRelationParam { - fn from(Order(v): Order) -> Self { - Self::ProjectName(v) - } - } - pub struct Set(pub String); - impl From for SetParam { - fn from(Set(v): Set) -> Self { - Self::ProjectName(_prisma::write_params::StringParam::Set(v)) - } - } - pub fn set>(value: String) -> T { - Set(value).into() - } - pub struct UpdateOperation(pub _prisma::write_params::StringParam); - impl From for SetParam { - fn from(UpdateOperation(v): UpdateOperation) -> Self { - Self::ProjectName(v) - } - } - impl From for UncheckedSetParam { - fn from(Set(v): Set) -> Self { - Self::ProjectName(_prisma::write_params::StringParam::Set(v)) - } - } - impl From for UncheckedSetParam { - fn from(UpdateOperation(v): UpdateOperation) -> Self { - Self::ProjectName(v) - } - } - pub struct Select; - impl Into for Select { - fn into(self) -> super::SelectParam { - super::SelectParam::ProjectName(self) - } - } - impl Into<::prisma_client_rust::Selection> for Select { - fn into(self) -> ::prisma_client_rust::Selection { - ::prisma_client_rust::sel(NAME) - } - } - pub struct Include; - impl Into for Include { - fn into(self) -> super::IncludeParam { - super::IncludeParam::ProjectName(self) - } - } - impl Into<::prisma_client_rust::Selection> for Include { - fn into(self) -> ::prisma_client_rust::Selection { - ::prisma_client_rust::sel(NAME) - } - } - } - pub mod project_version { - use super::super::{_prisma::*, *}; - use super::{SetParam, UncheckedSetParam, UniqueWhereParam, WhereParam, WithParam}; - pub const NAME: &str = "projectVersion"; - pub type Type = Option; - pub type RecursiveSafeType = Type; - pub struct Equals(pub Option); - pub fn equals>(value: Option) -> T { - Equals(value).into() - } - impl From for WhereParam { - fn from(Equals(v): Equals) -> Self { - WhereParam::ProjectVersion(_prisma::read_filters::StringNullableFilter::Equals(v)) - } - } - ::prisma_client_rust::scalar_where_param_fns!( - _prisma::read_filters::StringNullableFilter, - ProjectVersion, - { - fn in_vec(_: Vec) -> InVec; - fn not_in_vec(_: Vec) -> NotInVec; - fn lt(_: String) -> Lt; - fn lte(_: String) -> Lte; - fn gt(_: String) -> Gt; - fn gte(_: String) -> Gte; - fn contains(_: String) -> Contains; - fn starts_with(_: String) -> StartsWith; - fn ends_with(_: String) -> EndsWith; - fn not(_: Option) -> Not; - } - ); - pub struct Order(SortOrder); - pub fn order>(v: SortOrder) -> T { - Order(v).into() - } - impl From for super::OrderByWithRelationParam { - fn from(Order(v): Order) -> Self { - Self::ProjectVersion(v) - } - } - pub struct Set(pub Option); - impl From for SetParam { - fn from(Set(v): Set) -> Self { - Self::ProjectVersion(_prisma::write_params::StringNullableParam::Set(v)) - } - } - pub fn set>(value: Option) -> T { - Set(value).into() - } - pub struct UpdateOperation(pub _prisma::write_params::StringNullableParam); - impl From for SetParam { - fn from(UpdateOperation(v): UpdateOperation) -> Self { - Self::ProjectVersion(v) - } - } - impl From for UncheckedSetParam { - fn from(Set(v): Set) -> Self { - Self::ProjectVersion(_prisma::write_params::StringNullableParam::Set(v)) - } - } - impl From for UncheckedSetParam { - fn from(UpdateOperation(v): UpdateOperation) -> Self { - Self::ProjectVersion(v) - } - } - pub struct Select; - impl Into for Select { - fn into(self) -> super::SelectParam { - super::SelectParam::ProjectVersion(self) - } - } - impl Into<::prisma_client_rust::Selection> for Select { - fn into(self) -> ::prisma_client_rust::Selection { - ::prisma_client_rust::sel(NAME) - } - } - pub struct Include; - impl Into for Include { - fn into(self) -> super::IncludeParam { - super::IncludeParam::ProjectVersion(self) - } - } - impl Into<::prisma_client_rust::Selection> for Include { - fn into(self) -> ::prisma_client_rust::Selection { - ::prisma_client_rust::sel(NAME) - } - } - } - pub mod source { - use super::super::{_prisma::*, *}; - use super::{SetParam, UncheckedSetParam, UniqueWhereParam, WhereParam, WithParam}; - pub const NAME: &str = "source"; - pub type Type = String; - pub type RecursiveSafeType = Type; - pub struct Equals(pub String); - pub fn equals>(value: String) -> T { - Equals(value).into() - } - impl From for WhereParam { - fn from(Equals(v): Equals) -> Self { - WhereParam::Source(_prisma::read_filters::StringFilter::Equals(v)) - } - } - ::prisma_client_rust::scalar_where_param_fns!( - _prisma::read_filters::StringFilter, - Source, - { - fn in_vec(_: Vec) -> InVec; - fn not_in_vec(_: Vec) -> NotInVec; - fn lt(_: String) -> Lt; - fn lte(_: String) -> Lte; - fn gt(_: String) -> Gt; - fn gte(_: String) -> Gte; - fn contains(_: String) -> Contains; - fn starts_with(_: String) -> StartsWith; - fn ends_with(_: String) -> EndsWith; - fn not(_: String) -> Not; - } - ); - pub struct Order(SortOrder); - pub fn order>(v: SortOrder) -> T { - Order(v).into() - } - impl From for super::OrderByWithRelationParam { - fn from(Order(v): Order) -> Self { - Self::Source(v) - } - } - pub struct Set(pub String); - impl From for SetParam { - fn from(Set(v): Set) -> Self { - Self::Source(_prisma::write_params::StringParam::Set(v)) - } - } - pub fn set>(value: String) -> T { - Set(value).into() - } - pub struct UpdateOperation(pub _prisma::write_params::StringParam); - impl From for SetParam { - fn from(UpdateOperation(v): UpdateOperation) -> Self { - Self::Source(v) - } - } - impl From for UncheckedSetParam { - fn from(Set(v): Set) -> Self { - Self::Source(_prisma::write_params::StringParam::Set(v)) - } - } - impl From for UncheckedSetParam { - fn from(UpdateOperation(v): UpdateOperation) -> Self { - Self::Source(v) - } - } - pub struct Select; - impl Into for Select { - fn into(self) -> super::SelectParam { - super::SelectParam::Source(self) - } - } - impl Into<::prisma_client_rust::Selection> for Select { - fn into(self) -> ::prisma_client_rust::Selection { - ::prisma_client_rust::sel(NAME) - } - } - pub struct Include; - impl Into for Include { - fn into(self) -> super::IncludeParam { - super::IncludeParam::Source(self) - } - } - impl Into<::prisma_client_rust::Selection> for Include { - fn into(self) -> ::prisma_client_rust::Selection { - ::prisma_client_rust::sel(NAME) - } - } - } - pub mod updated { - use super::super::{_prisma::*, *}; - use super::{SetParam, UncheckedSetParam, UniqueWhereParam, WhereParam, WithParam}; - pub const NAME: &str = "updated"; - pub type Type = DateTime; - pub type RecursiveSafeType = Type; - pub struct Equals(pub DateTime); - pub fn equals>(value: DateTime) -> T { - Equals(value).into() - } - impl From for WhereParam { - fn from(Equals(v): Equals) -> Self { - WhereParam::Updated(_prisma::read_filters::DateTimeFilter::Equals(v)) - } - } - ::prisma_client_rust::scalar_where_param_fns!( - _prisma::read_filters::DateTimeFilter, - Updated, - { - fn in_vec(_: Vec) -> InVec; - fn not_in_vec(_: Vec) -> NotInVec; - fn lt(_: DateTime) -> Lt; - fn lte(_: DateTime) -> Lte; - fn gt(_: DateTime) -> Gt; - fn gte(_: DateTime) -> Gte; - fn not(_: DateTime) -> Not; - } - ); - pub struct Order(SortOrder); - pub fn order>(v: SortOrder) -> T { - Order(v).into() - } - impl From for super::OrderByWithRelationParam { - fn from(Order(v): Order) -> Self { - Self::Updated(v) - } - } - pub struct Set(pub DateTime); - impl From for SetParam { - fn from(Set(v): Set) -> Self { - Self::Updated(_prisma::write_params::DateTimeParam::Set(v)) - } - } - pub fn set>(value: DateTime) -> T { - Set(value).into() - } - pub struct UpdateOperation(pub _prisma::write_params::DateTimeParam); - impl From for SetParam { - fn from(UpdateOperation(v): UpdateOperation) -> Self { - Self::Updated(v) - } - } - impl From for UncheckedSetParam { - fn from(Set(v): Set) -> Self { - Self::Updated(_prisma::write_params::DateTimeParam::Set(v)) - } - } - impl From for UncheckedSetParam { - fn from(UpdateOperation(v): UpdateOperation) -> Self { - Self::Updated(v) - } - } - pub struct Select; - impl Into for Select { - fn into(self) -> super::SelectParam { - super::SelectParam::Updated(self) - } - } - impl Into<::prisma_client_rust::Selection> for Select { - fn into(self) -> ::prisma_client_rust::Selection { - ::prisma_client_rust::sel(NAME) - } - } - pub struct Include; - impl Into for Include { - fn into(self) -> super::IncludeParam { - super::IncludeParam::Updated(self) - } - } - impl Into<::prisma_client_rust::Selection> for Include { - fn into(self) -> ::prisma_client_rust::Selection { - ::prisma_client_rust::sel(NAME) - } - } - } -} +pub static DATAMODEL_STR : & 'static str = include_str ! ("/mnt/vol/Wormhole/prisma/schema.prisma") ; static DATABASE_STR : & 'static str = "sqlite" ; pub use _prisma :: * ; use prisma_client_rust :: scalar_types :: * ; pub mod _prisma { use super :: * ; pub struct PrismaClientBuilder { url : Option < String > , action_notifier : :: prisma_client_rust :: ActionNotifier , } impl PrismaClientBuilder { fn new () -> Self { Self { url : None , action_notifier : :: prisma_client_rust :: ActionNotifier :: new () } } pub fn with_url (mut self , url : String) -> Self { self . url = Some (url) ; self } pub async fn build (self) -> Result < PrismaClient , :: prisma_client_rust :: NewClientError > { let internals = :: prisma_client_rust :: PrismaClientInternals :: new (self . url , self . action_notifier , super :: DATAMODEL_STR) . await ? ; Ok (PrismaClient (internals)) } } pub struct PrismaClient (:: prisma_client_rust :: PrismaClientInternals) ; impl :: std :: fmt :: Debug for PrismaClient { fn fmt (& self , f : & mut :: std :: fmt :: Formatter < '_ >) -> :: std :: fmt :: Result { f . debug_struct ("PrismaClient") . finish () } } impl PrismaClient { pub fn _builder () -> PrismaClientBuilder { PrismaClientBuilder :: new () } pub fn _query_raw < T : :: prisma_client_rust :: Data > (& self , query : :: prisma_client_rust :: Raw) -> :: prisma_client_rust :: QueryRaw < T > { :: prisma_client_rust :: QueryRaw :: new (& self . 0 , query , super :: DATABASE_STR ,) } pub fn _execute_raw (& self , query : :: prisma_client_rust :: Raw) -> :: prisma_client_rust :: ExecuteRaw { :: prisma_client_rust :: ExecuteRaw :: new (& self . 0 , query , super :: DATABASE_STR ,) } pub async fn _batch < 'batch , T : :: prisma_client_rust :: BatchContainer < 'batch , Marker > , Marker > (& self , queries : T) -> :: prisma_client_rust :: Result << T as :: prisma_client_rust :: BatchContainer < 'batch , Marker >> :: ReturnType > { :: prisma_client_rust :: batch (queries , & self . 0) . await } pub fn _transaction (& self) -> :: prisma_client_rust :: TransactionBuilder < Self > { :: prisma_client_rust :: TransactionBuilder :: _new (self , & self . 0) } pub fn instance (& self) -> super :: instance :: Actions { super :: instance :: Actions { client : & self . 0 , } } pub fn installed_mod (& self) -> super :: installed_mod :: Actions { super :: installed_mod :: Actions { client : & self . 0 , } } } impl :: prisma_client_rust :: PrismaClient for PrismaClient { fn internals (& self) -> & :: prisma_client_rust :: PrismaClientInternals { & self . 0 } fn internals_mut (& mut self) -> & mut :: prisma_client_rust :: PrismaClientInternals { & mut self . 0 } fn with_tx_id (& self , tx_id : Option < :: prisma_client_rust :: query_core :: TxId >) -> Self { Self (self . 0 . with_tx_id (tx_id)) } } # [derive (Debug , Clone , Copy , :: serde :: Serialize , :: serde :: Deserialize , PartialEq , Eq)] pub enum TransactionIsolationLevel { # [serde (rename = "Serializable")] Serializable } impl ToString for TransactionIsolationLevel { fn to_string (& self) -> String { match self { Self :: Serializable => "Serializable" . to_string () } } } impl :: prisma_client_rust :: TransactionIsolationLevel for TransactionIsolationLevel { } # [derive (Debug , Clone , Copy , :: serde :: Serialize , :: serde :: Deserialize , PartialEq , Eq)] pub enum InstanceScalarFieldEnum { # [serde (rename = "id")] Id , # [serde (rename = "name")] Name , # [serde (rename = "plugin")] Plugin , # [serde (rename = "description")] Description , # [serde (rename = "updated")] Updated , # [serde (rename = "iconUrl")] IconUrl , # [serde (rename = "bannerUrl")] BannerUrl , # [serde (rename = "extraData")] ExtraData } impl ToString for InstanceScalarFieldEnum { fn to_string (& self) -> String { match self { Self :: Id => "id" . to_string () , Self :: Name => "name" . to_string () , Self :: Plugin => "plugin" . to_string () , Self :: Description => "description" . to_string () , Self :: Updated => "updated" . to_string () , Self :: IconUrl => "iconUrl" . to_string () , Self :: BannerUrl => "bannerUrl" . to_string () , Self :: ExtraData => "extraData" . to_string () } } } # [derive (Debug , Clone , Copy , :: serde :: Serialize , :: serde :: Deserialize , PartialEq , Eq)] pub enum InstalledModScalarFieldEnum { # [serde (rename = "id")] Id , # [serde (rename = "fileSize")] FileSize , # [serde (rename = "updated")] Updated , # [serde (rename = "iconUrl")] IconUrl , # [serde (rename = "instanceId")] InstanceId , # [serde (rename = "source")] Source , # [serde (rename = "projectId")] ProjectId , # [serde (rename = "projectName")] ProjectName , # [serde (rename = "projectDesc")] ProjectDesc , # [serde (rename = "projectVersion")] ProjectVersion } impl ToString for InstalledModScalarFieldEnum { fn to_string (& self) -> String { match self { Self :: Id => "id" . to_string () , Self :: FileSize => "fileSize" . to_string () , Self :: Updated => "updated" . to_string () , Self :: IconUrl => "iconUrl" . to_string () , Self :: InstanceId => "instanceId" . to_string () , Self :: Source => "source" . to_string () , Self :: ProjectId => "projectId" . to_string () , Self :: ProjectName => "projectName" . to_string () , Self :: ProjectDesc => "projectDesc" . to_string () , Self :: ProjectVersion => "projectVersion" . to_string () } } } # [derive (Debug , Clone , Copy , :: serde :: Serialize , :: serde :: Deserialize , PartialEq , Eq)] pub enum SortOrder { # [serde (rename = "asc")] Asc , # [serde (rename = "desc")] Desc } impl ToString for SortOrder { fn to_string (& self) -> String { match self { Self :: Asc => "asc" . to_string () , Self :: Desc => "desc" . to_string () } } } # [derive (Debug , Clone , Copy , :: serde :: Serialize , :: serde :: Deserialize , PartialEq , Eq)] pub enum NullsOrder { # [serde (rename = "first")] First , # [serde (rename = "last")] Last } impl ToString for NullsOrder { fn to_string (& self) -> String { match self { Self :: First => "first" . to_string () , Self :: Last => "last" . to_string () } } } impl Into < :: prisma_client_rust :: PrismaValue > for SortOrder { fn into (self) -> :: prisma_client_rust :: PrismaValue { match self { SortOrder :: Asc => :: prisma_client_rust :: PrismaValue :: String ("asc" . to_string ()) , SortOrder :: Desc => :: prisma_client_rust :: PrismaValue :: String ("desc" . to_string ()) , } } } pub mod read_filters { use super :: * ; # [derive (Debug , Clone)] pub enum StringFilter { Equals (String) , InVec (Vec < String >) , NotInVec (Vec < String >) , Lt (String) , Lte (String) , Gt (String) , Gte (String) , Contains (String) , StartsWith (String) , EndsWith (String) , Not (String) } impl Into < :: prisma_client_rust :: SerializedWhereValue > for StringFilter { fn into (self) -> :: prisma_client_rust :: SerializedWhereValue { match self { Self :: Equals (value) => :: prisma_client_rust :: SerializedWhereValue :: Object (vec ! [("equals" . to_string () , :: prisma_client_rust :: PrismaValue :: String (value))]) , Self :: InVec (value) => :: prisma_client_rust :: SerializedWhereValue :: Object (vec ! [("in" . to_string () , :: prisma_client_rust :: PrismaValue :: List (value . into_iter () . map (| value | :: prisma_client_rust :: PrismaValue :: String (value)) . collect ()))]) , Self :: NotInVec (value) => :: prisma_client_rust :: SerializedWhereValue :: Object (vec ! [("notIn" . to_string () , :: prisma_client_rust :: PrismaValue :: List (value . into_iter () . map (| value | :: prisma_client_rust :: PrismaValue :: String (value)) . collect ()))]) , Self :: Lt (value) => :: prisma_client_rust :: SerializedWhereValue :: Object (vec ! [("lt" . to_string () , :: prisma_client_rust :: PrismaValue :: String (value))]) , Self :: Lte (value) => :: prisma_client_rust :: SerializedWhereValue :: Object (vec ! [("lte" . to_string () , :: prisma_client_rust :: PrismaValue :: String (value))]) , Self :: Gt (value) => :: prisma_client_rust :: SerializedWhereValue :: Object (vec ! [("gt" . to_string () , :: prisma_client_rust :: PrismaValue :: String (value))]) , Self :: Gte (value) => :: prisma_client_rust :: SerializedWhereValue :: Object (vec ! [("gte" . to_string () , :: prisma_client_rust :: PrismaValue :: String (value))]) , Self :: Contains (value) => :: prisma_client_rust :: SerializedWhereValue :: Object (vec ! [("contains" . to_string () , :: prisma_client_rust :: PrismaValue :: String (value))]) , Self :: StartsWith (value) => :: prisma_client_rust :: SerializedWhereValue :: Object (vec ! [("startsWith" . to_string () , :: prisma_client_rust :: PrismaValue :: String (value))]) , Self :: EndsWith (value) => :: prisma_client_rust :: SerializedWhereValue :: Object (vec ! [("endsWith" . to_string () , :: prisma_client_rust :: PrismaValue :: String (value))]) , Self :: Not (value) => :: prisma_client_rust :: SerializedWhereValue :: Object (vec ! [("not" . to_string () , :: prisma_client_rust :: PrismaValue :: String (value))]) } } } # [derive (Debug , Clone)] pub enum StringNullableFilter { Equals (Option < String >) , InVec (Vec < String >) , NotInVec (Vec < String >) , Lt (String) , Lte (String) , Gt (String) , Gte (String) , Contains (String) , StartsWith (String) , EndsWith (String) , Not (Option < String >) } impl Into < :: prisma_client_rust :: SerializedWhereValue > for StringNullableFilter { fn into (self) -> :: prisma_client_rust :: SerializedWhereValue { match self { Self :: Equals (value) => :: prisma_client_rust :: SerializedWhereValue :: Object (vec ! [("equals" . to_string () , value . map (| value | :: prisma_client_rust :: PrismaValue :: String (value)) . unwrap_or_else (|| :: prisma_client_rust :: PrismaValue :: Null))]) , Self :: InVec (value) => :: prisma_client_rust :: SerializedWhereValue :: Object (vec ! [("in" . to_string () , :: prisma_client_rust :: PrismaValue :: List (value . into_iter () . map (| value | :: prisma_client_rust :: PrismaValue :: String (value)) . collect ()))]) , Self :: NotInVec (value) => :: prisma_client_rust :: SerializedWhereValue :: Object (vec ! [("notIn" . to_string () , :: prisma_client_rust :: PrismaValue :: List (value . into_iter () . map (| value | :: prisma_client_rust :: PrismaValue :: String (value)) . collect ()))]) , Self :: Lt (value) => :: prisma_client_rust :: SerializedWhereValue :: Object (vec ! [("lt" . to_string () , :: prisma_client_rust :: PrismaValue :: String (value))]) , Self :: Lte (value) => :: prisma_client_rust :: SerializedWhereValue :: Object (vec ! [("lte" . to_string () , :: prisma_client_rust :: PrismaValue :: String (value))]) , Self :: Gt (value) => :: prisma_client_rust :: SerializedWhereValue :: Object (vec ! [("gt" . to_string () , :: prisma_client_rust :: PrismaValue :: String (value))]) , Self :: Gte (value) => :: prisma_client_rust :: SerializedWhereValue :: Object (vec ! [("gte" . to_string () , :: prisma_client_rust :: PrismaValue :: String (value))]) , Self :: Contains (value) => :: prisma_client_rust :: SerializedWhereValue :: Object (vec ! [("contains" . to_string () , :: prisma_client_rust :: PrismaValue :: String (value))]) , Self :: StartsWith (value) => :: prisma_client_rust :: SerializedWhereValue :: Object (vec ! [("startsWith" . to_string () , :: prisma_client_rust :: PrismaValue :: String (value))]) , Self :: EndsWith (value) => :: prisma_client_rust :: SerializedWhereValue :: Object (vec ! [("endsWith" . to_string () , :: prisma_client_rust :: PrismaValue :: String (value))]) , Self :: Not (value) => :: prisma_client_rust :: SerializedWhereValue :: Object (vec ! [("not" . to_string () , value . map (| value | :: prisma_client_rust :: PrismaValue :: String (value)) . unwrap_or_else (|| :: prisma_client_rust :: PrismaValue :: Null))]) } } } # [derive (Debug , Clone)] pub enum DateTimeFilter { Equals (DateTime) , InVec (Vec < DateTime >) , NotInVec (Vec < DateTime >) , Lt (DateTime) , Lte (DateTime) , Gt (DateTime) , Gte (DateTime) , Not (DateTime) } impl Into < :: prisma_client_rust :: SerializedWhereValue > for DateTimeFilter { fn into (self) -> :: prisma_client_rust :: SerializedWhereValue { match self { Self :: Equals (value) => :: prisma_client_rust :: SerializedWhereValue :: Object (vec ! [("equals" . to_string () , :: prisma_client_rust :: PrismaValue :: DateTime (value))]) , Self :: InVec (value) => :: prisma_client_rust :: SerializedWhereValue :: Object (vec ! [("in" . to_string () , :: prisma_client_rust :: PrismaValue :: List (value . into_iter () . map (| value | :: prisma_client_rust :: PrismaValue :: DateTime (value)) . collect ()))]) , Self :: NotInVec (value) => :: prisma_client_rust :: SerializedWhereValue :: Object (vec ! [("notIn" . to_string () , :: prisma_client_rust :: PrismaValue :: List (value . into_iter () . map (| value | :: prisma_client_rust :: PrismaValue :: DateTime (value)) . collect ()))]) , Self :: Lt (value) => :: prisma_client_rust :: SerializedWhereValue :: Object (vec ! [("lt" . to_string () , :: prisma_client_rust :: PrismaValue :: DateTime (value))]) , Self :: Lte (value) => :: prisma_client_rust :: SerializedWhereValue :: Object (vec ! [("lte" . to_string () , :: prisma_client_rust :: PrismaValue :: DateTime (value))]) , Self :: Gt (value) => :: prisma_client_rust :: SerializedWhereValue :: Object (vec ! [("gt" . to_string () , :: prisma_client_rust :: PrismaValue :: DateTime (value))]) , Self :: Gte (value) => :: prisma_client_rust :: SerializedWhereValue :: Object (vec ! [("gte" . to_string () , :: prisma_client_rust :: PrismaValue :: DateTime (value))]) , Self :: Not (value) => :: prisma_client_rust :: SerializedWhereValue :: Object (vec ! [("not" . to_string () , :: prisma_client_rust :: PrismaValue :: DateTime (value))]) } } } # [derive (Debug , Clone)] pub enum IntFilter { Equals (Int) , InVec (Vec < Int >) , NotInVec (Vec < Int >) , Lt (Int) , Lte (Int) , Gt (Int) , Gte (Int) , Not (Int) } impl Into < :: prisma_client_rust :: SerializedWhereValue > for IntFilter { fn into (self) -> :: prisma_client_rust :: SerializedWhereValue { match self { Self :: Equals (value) => :: prisma_client_rust :: SerializedWhereValue :: Object (vec ! [("equals" . to_string () , :: prisma_client_rust :: PrismaValue :: Int (value))]) , Self :: InVec (value) => :: prisma_client_rust :: SerializedWhereValue :: Object (vec ! [("in" . to_string () , :: prisma_client_rust :: PrismaValue :: List (value . into_iter () . map (| value | :: prisma_client_rust :: PrismaValue :: Int (value)) . collect ()))]) , Self :: NotInVec (value) => :: prisma_client_rust :: SerializedWhereValue :: Object (vec ! [("notIn" . to_string () , :: prisma_client_rust :: PrismaValue :: List (value . into_iter () . map (| value | :: prisma_client_rust :: PrismaValue :: Int (value)) . collect ()))]) , Self :: Lt (value) => :: prisma_client_rust :: SerializedWhereValue :: Object (vec ! [("lt" . to_string () , :: prisma_client_rust :: PrismaValue :: Int (value))]) , Self :: Lte (value) => :: prisma_client_rust :: SerializedWhereValue :: Object (vec ! [("lte" . to_string () , :: prisma_client_rust :: PrismaValue :: Int (value))]) , Self :: Gt (value) => :: prisma_client_rust :: SerializedWhereValue :: Object (vec ! [("gt" . to_string () , :: prisma_client_rust :: PrismaValue :: Int (value))]) , Self :: Gte (value) => :: prisma_client_rust :: SerializedWhereValue :: Object (vec ! [("gte" . to_string () , :: prisma_client_rust :: PrismaValue :: Int (value))]) , Self :: Not (value) => :: prisma_client_rust :: SerializedWhereValue :: Object (vec ! [("not" . to_string () , :: prisma_client_rust :: PrismaValue :: Int (value))]) } } } } pub mod write_params { use super :: * ; # [derive (Debug , Clone)] pub enum DateTimeParam { Set (DateTime) } impl Into < :: prisma_client_rust :: PrismaValue > for DateTimeParam { fn into (self) -> :: prisma_client_rust :: PrismaValue { match self { Self :: Set (value) => :: prisma_client_rust :: PrismaValue :: DateTime (value) } } } # [derive (Debug , Clone)] pub enum IntParam { Set (Int) , Increment (Int) , Decrement (Int) , Multiply (Int) , Divide (Int) } impl Into < :: prisma_client_rust :: PrismaValue > for IntParam { fn into (self) -> :: prisma_client_rust :: PrismaValue { match self { Self :: Set (value) => :: prisma_client_rust :: PrismaValue :: Int (value) , Self :: Increment (value) => :: prisma_client_rust :: PrismaValue :: Object (vec ! [("increment" . to_string () , :: prisma_client_rust :: PrismaValue :: Int (value))]) , Self :: Decrement (value) => :: prisma_client_rust :: PrismaValue :: Object (vec ! [("decrement" . to_string () , :: prisma_client_rust :: PrismaValue :: Int (value))]) , Self :: Multiply (value) => :: prisma_client_rust :: PrismaValue :: Object (vec ! [("multiply" . to_string () , :: prisma_client_rust :: PrismaValue :: Int (value))]) , Self :: Divide (value) => :: prisma_client_rust :: PrismaValue :: Object (vec ! [("divide" . to_string () , :: prisma_client_rust :: PrismaValue :: Int (value))]) } } } # [derive (Debug , Clone)] pub enum StringParam { Set (String) } impl Into < :: prisma_client_rust :: PrismaValue > for StringParam { fn into (self) -> :: prisma_client_rust :: PrismaValue { match self { Self :: Set (value) => :: prisma_client_rust :: PrismaValue :: String (value) } } } # [derive (Debug , Clone)] pub enum StringNullableParam { Set (Option < String >) } impl Into < :: prisma_client_rust :: PrismaValue > for StringNullableParam { fn into (self) -> :: prisma_client_rust :: PrismaValue { match self { Self :: Set (value) => value . map (| value | :: prisma_client_rust :: PrismaValue :: String (value)) . unwrap_or_else (|| :: prisma_client_rust :: PrismaValue :: Null) } } } } } pub mod instance { use super :: { _prisma :: * , * } ; pub const NAME : & str = "Instance" ; # [derive (Debug , Clone)] pub enum WhereParam { Not (Vec < WhereParam >) , Or (Vec < WhereParam >) , And (Vec < WhereParam >) , Id (super :: _prisma :: read_filters :: IntFilter) , Name (super :: _prisma :: read_filters :: StringFilter) , Plugin (super :: _prisma :: read_filters :: StringFilter) , Description (super :: _prisma :: read_filters :: StringFilter) , Updated (super :: _prisma :: read_filters :: DateTimeFilter) , IconUrl (super :: _prisma :: read_filters :: StringNullableFilter) , BannerUrl (super :: _prisma :: read_filters :: StringNullableFilter) , ExtraData (super :: _prisma :: read_filters :: StringFilter) } impl :: prisma_client_rust :: WhereInput for WhereParam { fn serialize (self) -> :: prisma_client_rust :: SerializedWhereInput { let (name , value) = match self { Self :: Not (value) => ("NOT" , :: prisma_client_rust :: SerializedWhereValue :: Object (:: prisma_client_rust :: merge_fields (value . into_iter () . map (:: prisma_client_rust :: WhereInput :: serialize) . map (Into :: into) . collect ())) ,) , Self :: Or (value) => ("OR" , :: prisma_client_rust :: SerializedWhereValue :: List (value . into_iter () . map (:: prisma_client_rust :: WhereInput :: serialize) . map (| p | :: prisma_client_rust :: PrismaValue :: Object (vec ! [p . into ()])) . collect ()) ,) , Self :: And (value) => ("AND" , :: prisma_client_rust :: SerializedWhereValue :: Object (:: prisma_client_rust :: merge_fields (value . into_iter () . map (:: prisma_client_rust :: WhereInput :: serialize) . map (Into :: into) . collect ())) ,) , Self :: Id (value) => (id :: NAME , value . into ()) , Self :: Name (value) => (name :: NAME , value . into ()) , Self :: Plugin (value) => (plugin :: NAME , value . into ()) , Self :: Description (value) => (description :: NAME , value . into ()) , Self :: Updated (value) => (updated :: NAME , value . into ()) , Self :: IconUrl (value) => (icon_url :: NAME , value . into ()) , Self :: BannerUrl (value) => (banner_url :: NAME , value . into ()) , Self :: ExtraData (value) => (extra_data :: NAME , value . into ()) } ; :: prisma_client_rust :: SerializedWhereInput :: new (name . to_string () , value . into ()) } } # [derive (Debug , Clone)] pub enum UniqueWhereParam { IdEquals (Int) } impl :: prisma_client_rust :: WhereInput for UniqueWhereParam { fn serialize (self) -> :: prisma_client_rust :: SerializedWhereInput { let (name , value) = match self { UniqueWhereParam :: IdEquals (value) => ("id" , :: prisma_client_rust :: SerializedWhereValue :: Value (:: prisma_client_rust :: PrismaValue :: Int (value))) } ; :: prisma_client_rust :: SerializedWhereInput :: new (name . to_string () , value . into ()) } } impl From < :: prisma_client_rust :: Operator < Self >> for WhereParam { fn from (op : :: prisma_client_rust :: Operator < Self >) -> Self { match op { :: prisma_client_rust :: Operator :: Not (value) => Self :: Not (value) , :: prisma_client_rust :: Operator :: And (value) => Self :: And (value) , :: prisma_client_rust :: Operator :: Or (value) => Self :: Or (value) , } } } # [derive (Debug , Clone)] pub enum OrderByWithRelationParam { Id (super :: SortOrder) , Name (super :: SortOrder) , Plugin (super :: SortOrder) , Description (super :: SortOrder) , Updated (super :: SortOrder) , IconUrl (super :: SortOrder) , BannerUrl (super :: SortOrder) , ExtraData (super :: SortOrder) } impl Into < (String , :: prisma_client_rust :: PrismaValue) > for OrderByWithRelationParam { fn into (self) -> (String , :: prisma_client_rust :: PrismaValue) { let (k , v) = match self { Self :: Id (param) => ("id" , param . into ()) , Self :: Name (param) => ("name" , param . into ()) , Self :: Plugin (param) => ("plugin" , param . into ()) , Self :: Description (param) => ("description" , param . into ()) , Self :: Updated (param) => ("updated" , param . into ()) , Self :: IconUrl (param) => ("iconUrl" , param . into ()) , Self :: BannerUrl (param) => ("bannerUrl" , param . into ()) , Self :: ExtraData (param) => ("extraData" , param . into ()) } ; (k . to_string () , v) } } # [derive (Debug , Clone)] pub enum WithParam { } impl Into < :: prisma_client_rust :: Selection > for WithParam { fn into (self) -> :: prisma_client_rust :: Selection { match self { } } } # [derive (Debug , Clone)] pub enum SetParam { Id (super :: _prisma :: write_params :: IntParam) , Name (super :: _prisma :: write_params :: StringParam) , Plugin (super :: _prisma :: write_params :: StringParam) , Description (super :: _prisma :: write_params :: StringParam) , Updated (super :: _prisma :: write_params :: DateTimeParam) , IconUrl (super :: _prisma :: write_params :: StringNullableParam) , BannerUrl (super :: _prisma :: write_params :: StringNullableParam) , ExtraData (super :: _prisma :: write_params :: StringParam) } impl Into < (String , :: prisma_client_rust :: PrismaValue) > for SetParam { fn into (self) -> (String , :: prisma_client_rust :: PrismaValue) { let (k , v) = match self { Self :: Id (value) => (id :: NAME , value . into ()) , Self :: Name (value) => (name :: NAME , value . into ()) , Self :: Plugin (value) => (plugin :: NAME , value . into ()) , Self :: Description (value) => (description :: NAME , value . into ()) , Self :: Updated (value) => (updated :: NAME , value . into ()) , Self :: IconUrl (value) => (icon_url :: NAME , value . into ()) , Self :: BannerUrl (value) => (banner_url :: NAME , value . into ()) , Self :: ExtraData (value) => (extra_data :: NAME , value . into ()) } ; (k . to_string () , v) } } # [derive (Debug , Clone)] pub enum UncheckedSetParam { Id (super :: _prisma :: write_params :: IntParam) , Name (super :: _prisma :: write_params :: StringParam) , Plugin (super :: _prisma :: write_params :: StringParam) , Description (super :: _prisma :: write_params :: StringParam) , Updated (super :: _prisma :: write_params :: DateTimeParam) , IconUrl (super :: _prisma :: write_params :: StringNullableParam) , BannerUrl (super :: _prisma :: write_params :: StringNullableParam) , ExtraData (super :: _prisma :: write_params :: StringParam) } impl Into < (String , :: prisma_client_rust :: PrismaValue) > for UncheckedSetParam { fn into (self) -> (String , :: prisma_client_rust :: PrismaValue) { let (k , v) = match self { Self :: Id (value) => ("id" , value . into ()) , Self :: Name (value) => ("name" , value . into ()) , Self :: Plugin (value) => ("plugin" , value . into ()) , Self :: Description (value) => ("description" , value . into ()) , Self :: Updated (value) => ("updated" , value . into ()) , Self :: IconUrl (value) => ("iconUrl" , value . into ()) , Self :: BannerUrl (value) => ("bannerUrl" , value . into ()) , Self :: ExtraData (value) => ("extraData" , value . into ()) } ; (k . to_string () , v) } } :: prisma_client_rust :: macros :: select_factory ! (_select_instance , select , prisma :: instance , struct Data { # [serde (rename = "id")] id : id :: Type , # [serde (rename = "name")] name : name :: Type , # [serde (rename = "plugin")] plugin : plugin :: Type , # [serde (rename = "description")] description : description :: Type , # [serde (rename = "updated")] updated : updated :: Type , # [serde (rename = "iconUrl")] icon_url : icon_url :: Type , # [serde (rename = "bannerUrl")] banner_url : banner_url :: Type , # [serde (rename = "extraData")] extra_data : extra_data :: Type } , [(id , Scalar) , (name , Scalar) , (plugin , Scalar) , (description , Scalar) , (updated , Scalar) , (icon_url , Scalar) , (banner_url , Scalar) , (extra_data , Scalar)]) ; pub enum SelectParam { Id (id :: Select) , Name (name :: Select) , Plugin (plugin :: Select) , Description (description :: Select) , Updated (updated :: Select) , IconUrl (icon_url :: Select) , BannerUrl (banner_url :: Select) , ExtraData (extra_data :: Select) } impl Into < :: prisma_client_rust :: Selection > for SelectParam { fn into (self) -> :: prisma_client_rust :: Selection { match self { Self :: Id (data) => data . into () , Self :: Name (data) => data . into () , Self :: Plugin (data) => data . into () , Self :: Description (data) => data . into () , Self :: Updated (data) => data . into () , Self :: IconUrl (data) => data . into () , Self :: BannerUrl (data) => data . into () , Self :: ExtraData (data) => data . into () } } } :: prisma_client_rust :: macros :: include_factory ! (_include_instance , include , prisma :: instance , struct Data { # [serde (rename = "id")] id : id :: Type , # [serde (rename = "name")] name : name :: Type , # [serde (rename = "plugin")] plugin : plugin :: Type , # [serde (rename = "description")] description : description :: Type , # [serde (rename = "updated")] updated : updated :: Type , # [serde (rename = "iconUrl")] icon_url : icon_url :: Type , # [serde (rename = "bannerUrl")] banner_url : banner_url :: Type , # [serde (rename = "extraData")] extra_data : extra_data :: Type } , []) ; pub enum IncludeParam { Id (id :: Include) , Name (name :: Include) , Plugin (plugin :: Include) , Description (description :: Include) , Updated (updated :: Include) , IconUrl (icon_url :: Include) , BannerUrl (banner_url :: Include) , ExtraData (extra_data :: Include) } impl Into < :: prisma_client_rust :: Selection > for IncludeParam { fn into (self) -> :: prisma_client_rust :: Selection { match self { Self :: Id (data) => data . into () , Self :: Name (data) => data . into () , Self :: Plugin (data) => data . into () , Self :: Description (data) => data . into () , Self :: Updated (data) => data . into () , Self :: IconUrl (data) => data . into () , Self :: BannerUrl (data) => data . into () , Self :: ExtraData (data) => data . into () } } } # [derive (Debug , Clone)] pub struct Create { pub name : String , pub plugin : String , pub description : String , pub extra_data : String , pub _params : Vec < SetParam > } impl Create { pub fn to_query < 'a > (self , client : & 'a PrismaClient) -> CreateQuery < 'a > { client . instance () . create (self . name , self . plugin , self . description , self . extra_data , self . _params) } pub fn to_params (mut self) -> Vec < SetParam > { self . _params . extend ([name :: set (self . name) , plugin :: set (self . plugin) , description :: set (self . description) , extra_data :: set (self . extra_data)]) ; self . _params } } pub fn create (name : String , plugin : String , description : String , extra_data : String , _params : Vec < SetParam >) -> Create { Create { name , plugin , description , extra_data , _params } } # [derive (Debug , Clone , :: serde :: Serialize , :: serde :: Deserialize)] # [derive (:: prisma_client_rust :: specta :: Type)] # [specta (rename = "InstanceCreation" , crate = prisma_client_rust :: specta)] pub struct CreateUnchecked { # [serde (rename = "name")] pub name : String , # [serde (rename = "plugin")] pub plugin : String , # [serde (rename = "description")] pub description : String , # [serde (rename = "extraData")] pub extra_data : String , # [serde (skip)] pub _params : Vec < UncheckedSetParam > } impl CreateUnchecked { pub fn to_query < 'a > (self , client : & 'a PrismaClient) -> CreateUncheckedQuery < 'a > { client . instance () . create_unchecked (self . name , self . plugin , self . description , self . extra_data , self . _params) } pub fn to_params (mut self) -> Vec < UncheckedSetParam > { self . _params . extend ([name :: set (self . name) , plugin :: set (self . plugin) , description :: set (self . description) , extra_data :: set (self . extra_data)]) ; self . _params } } pub fn create_unchecked (name : String , plugin : String , description : String , extra_data : String , _params : Vec < UncheckedSetParam >) -> CreateUnchecked { CreateUnchecked { name , plugin , description , extra_data , _params } } # [derive (Debug , Clone , :: serde :: Serialize , :: serde :: Deserialize)] # [derive (:: prisma_client_rust :: specta :: Type)] # [specta (rename = "InstanceUpdate" , crate = prisma_client_rust :: specta)] pub struct Update { # [serde (rename = "id")] pub id : id :: Type , # [serde (rename = "name" , skip_serializing_if = "Option::is_none")] pub name : Option < name :: Type > , # [serde (rename = "plugin" , skip_serializing_if = "Option::is_none")] pub plugin : Option < plugin :: Type > , # [serde (rename = "description" , skip_serializing_if = "Option::is_none")] pub description : Option < description :: Type > , # [serde (rename = "updated" , skip_serializing_if = "Option::is_none")] pub updated : Option < updated :: Type > , # [serde (rename = "iconUrl" , skip_serializing_if = "Option::is_none")] pub icon_url : icon_url :: Type , # [serde (rename = "bannerUrl" , skip_serializing_if = "Option::is_none")] pub banner_url : banner_url :: Type , # [serde (rename = "extraData" , skip_serializing_if = "Option::is_none")] pub extra_data : Option < extra_data :: Type > } impl Update { pub fn as_params (self) -> Vec < SetParam > { let mut params = Vec :: new () ; if let Some (field) = self . name { params . push (name :: set (field)) ; } if let Some (field) = self . plugin { params . push (plugin :: set (field)) ; } if let Some (field) = self . description { params . push (description :: set (field)) ; } if let Some (field) = self . updated { params . push (updated :: set (field)) ; } if let Some (field) = self . icon_url { params . push (icon_url :: set (Some (field))) ; } if let Some (field) = self . banner_url { params . push (banner_url :: set (Some (field))) ; } if let Some (field) = self . extra_data { params . push (extra_data :: set (field)) ; } params } } # [derive (Debug , Clone)] pub struct Types ; impl :: prisma_client_rust :: ModelTypes for Types { type Data = Data ; type Where = WhereParam ; type WhereUnique = UniqueWhereParam ; type UncheckedSet = UncheckedSetParam ; type Set = SetParam ; type With = WithParam ; type OrderBy = OrderByWithRelationParam ; type Cursor = UniqueWhereParam ; const MODEL : & 'static str = NAME ; fn scalar_selections () -> Vec < :: prisma_client_rust :: Selection > { vec ! [:: prisma_client_rust :: sel (id :: NAME) , :: prisma_client_rust :: sel (name :: NAME) , :: prisma_client_rust :: sel (plugin :: NAME) , :: prisma_client_rust :: sel (description :: NAME) , :: prisma_client_rust :: sel (updated :: NAME) , :: prisma_client_rust :: sel (icon_url :: NAME) , :: prisma_client_rust :: sel (banner_url :: NAME) , :: prisma_client_rust :: sel (extra_data :: NAME)] } } # [derive (Debug , Clone , :: serde :: Serialize , :: serde :: Deserialize)] # [derive (:: prisma_client_rust :: specta :: Type)] # [specta (rename = "Instance" , crate = prisma_client_rust :: specta)] pub struct Data { # [serde (rename = "id")] pub id : id :: Type , # [serde (rename = "name")] pub name : name :: Type , # [serde (rename = "plugin")] pub plugin : plugin :: Type , # [serde (rename = "description")] pub description : description :: Type , # [serde (rename = "updated")] pub updated : updated :: Type , # [serde (rename = "iconUrl")] pub icon_url : icon_url :: Type , # [serde (rename = "bannerUrl")] pub banner_url : banner_url :: Type , # [serde (rename = "extraData")] pub extra_data : extra_data :: Type } impl Data { } :: prisma_client_rust :: macros :: partial_unchecked_factory ! (_partial_unchecked_instance , prisma :: instance , struct Data { # [serde (rename = "id")] pub id : prisma :: instance :: id :: Type , # [serde (rename = "name")] pub name : prisma :: instance :: name :: Type , # [serde (rename = "plugin")] pub plugin : prisma :: instance :: plugin :: Type , # [serde (rename = "description")] pub description : prisma :: instance :: description :: Type , # [serde (rename = "updated")] pub updated : prisma :: instance :: updated :: Type , # [serde (rename = "iconUrl")] # [serde (default , with = "::prisma_client_rust::serde::double_option")] pub icon_url : prisma :: instance :: icon_url :: Type , # [serde (rename = "bannerUrl")] # [serde (default , with = "::prisma_client_rust::serde::double_option")] pub banner_url : prisma :: instance :: banner_url :: Type , # [serde (rename = "extraData")] pub extra_data : prisma :: instance :: extra_data :: Type }) ; :: prisma_client_rust :: macros :: filter_factory ! (_instance_filter , prisma :: instance , [(id , Scalar) , (name , Scalar) , (plugin , Scalar) , (description , Scalar) , (updated , Scalar) , (icon_url , Scalar) , (banner_url , Scalar) , (extra_data , Scalar)]) ; pub type UniqueArgs = :: prisma_client_rust :: UniqueArgs < Types > ; pub type ManyArgs = :: prisma_client_rust :: ManyArgs < Types > ; pub type CountQuery < 'a > = :: prisma_client_rust :: Count < 'a , Types > ; pub type CreateQuery < 'a > = :: prisma_client_rust :: Create < 'a , Types > ; pub type CreateUncheckedQuery < 'a > = :: prisma_client_rust :: CreateUnchecked < 'a , Types > ; pub type CreateManyQuery < 'a > = :: prisma_client_rust :: CreateMany < 'a , Types > ; pub type FindUniqueQuery < 'a > = :: prisma_client_rust :: FindUnique < 'a , Types > ; pub type FindManyQuery < 'a > = :: prisma_client_rust :: FindMany < 'a , Types > ; pub type FindFirstQuery < 'a > = :: prisma_client_rust :: FindFirst < 'a , Types > ; pub type UpdateQuery < 'a > = :: prisma_client_rust :: Update < 'a , Types > ; pub type UpdateUncheckedQuery < 'a > = :: prisma_client_rust :: UpdateUnchecked < 'a , Types > ; pub type UpdateManyQuery < 'a > = :: prisma_client_rust :: UpdateMany < 'a , Types > ; pub type UpsertQuery < 'a > = :: prisma_client_rust :: Upsert < 'a , Types > ; pub type DeleteQuery < 'a > = :: prisma_client_rust :: Delete < 'a , Types > ; pub type DeleteManyQuery < 'a > = :: prisma_client_rust :: DeleteMany < 'a , Types > ; # [derive (Clone)] pub struct Actions < 'a > { pub client : & 'a :: prisma_client_rust :: PrismaClientInternals , } impl < 'a > Actions < 'a > { pub fn find_unique (self , _where : UniqueWhereParam) -> FindUniqueQuery < 'a > { FindUniqueQuery :: new (self . client , _where) } pub fn find_first (self , _where : Vec < WhereParam >) -> FindFirstQuery < 'a > { FindFirstQuery :: new (self . client , _where) } pub fn find_many (self , _where : Vec < WhereParam >) -> FindManyQuery < 'a > { FindManyQuery :: new (self . client , _where) } pub fn create (self , name : String , plugin : String , description : String , extra_data : String , mut _params : Vec < SetParam >) -> CreateQuery < 'a > { _params . extend ([name :: set (name) , plugin :: set (plugin) , description :: set (description) , extra_data :: set (extra_data)]) ; CreateQuery :: new (self . client , _params) } pub fn create_unchecked (self , name : String , plugin : String , description : String , extra_data : String , mut _params : Vec < UncheckedSetParam >) -> CreateUncheckedQuery < 'a > { _params . extend ([name :: set (name) , plugin :: set (plugin) , description :: set (description) , extra_data :: set (extra_data)]) ; CreateUncheckedQuery :: new (self . client , _params . into_iter () . map (Into :: into) . collect ()) } pub fn create_many (self , data : Vec < CreateUnchecked >) -> CreateManyQuery < 'a > { let data = data . into_iter () . map (CreateUnchecked :: to_params) . collect () ; CreateManyQuery :: new (self . client , data) } pub fn update (self , _where : UniqueWhereParam , _params : Vec < SetParam >) -> UpdateQuery < 'a > { UpdateQuery :: new (self . client , _where , _params , vec ! []) } pub fn update_unchecked (self , _where : UniqueWhereParam , _params : Vec < UncheckedSetParam >) -> UpdateUncheckedQuery < 'a > { UpdateUncheckedQuery :: new (self . client , _where , _params . into_iter () . map (Into :: into) . collect () , vec ! []) } pub fn update_many (self , _where : Vec < WhereParam > , _params : Vec < SetParam >) -> UpdateManyQuery < 'a > { UpdateManyQuery :: new (self . client , _where , _params ,) } pub fn upsert (self , _where : UniqueWhereParam , _create : Create , _update : Vec < SetParam >) -> UpsertQuery < 'a > { UpsertQuery :: new (self . client , _where , _create . to_params () , _update) } pub fn delete (self , _where : UniqueWhereParam) -> DeleteQuery < 'a > { DeleteQuery :: new (self . client , _where , vec ! []) } pub fn delete_many (self , _where : Vec < WhereParam >) -> DeleteManyQuery < 'a > { DeleteManyQuery :: new (self . client , _where) } pub fn count (self , _where : Vec < WhereParam >) -> CountQuery < 'a > { CountQuery :: new (self . client , _where) } } pub mod banner_url { use super :: super :: { _prisma :: * , * } ; use super :: { WhereParam , UniqueWhereParam , WithParam , SetParam , UncheckedSetParam } ; pub const NAME : & str = "bannerUrl" ; pub type Type = Option < String > ; pub type RecursiveSafeType = Type ; pub struct Equals (pub Option < String >) ; pub fn equals < T : From < Equals >> (value : Option < String >) -> T { Equals (value) . into () } impl From < Equals > for WhereParam { fn from (Equals (v) : Equals) -> Self { WhereParam :: BannerUrl (_prisma :: read_filters :: StringNullableFilter :: Equals (v)) } } :: prisma_client_rust :: scalar_where_param_fns ! (_prisma :: read_filters :: StringNullableFilter , BannerUrl , { fn in_vec (_ : Vec < String >) -> InVec ; fn not_in_vec (_ : Vec < String >) -> NotInVec ; fn lt (_ : String) -> Lt ; fn lte (_ : String) -> Lte ; fn gt (_ : String) -> Gt ; fn gte (_ : String) -> Gte ; fn contains (_ : String) -> Contains ; fn starts_with (_ : String) -> StartsWith ; fn ends_with (_ : String) -> EndsWith ; fn not (_ : Option < String >) -> Not ; }) ; pub struct Order (SortOrder) ; pub fn order < T : From < Order >> (v : SortOrder) -> T { Order (v) . into () } impl From < Order > for super :: OrderByWithRelationParam { fn from (Order (v) : Order) -> Self { Self :: BannerUrl (v) } } pub struct Set (pub Option < String >) ; impl From < Set > for SetParam { fn from (Set (v) : Set) -> Self { Self :: BannerUrl (_prisma :: write_params :: StringNullableParam :: Set (v)) } } pub fn set < T : From < Set >> (value : Option < String >) -> T { Set (value) . into () } pub struct UpdateOperation (pub _prisma :: write_params :: StringNullableParam) ; impl From < UpdateOperation > for SetParam { fn from (UpdateOperation (v) : UpdateOperation) -> Self { Self :: BannerUrl (v) } } impl From < Set > for UncheckedSetParam { fn from (Set (v) : Set) -> Self { Self :: BannerUrl (_prisma :: write_params :: StringNullableParam :: Set (v)) } } impl From < UpdateOperation > for UncheckedSetParam { fn from (UpdateOperation (v) : UpdateOperation) -> Self { Self :: BannerUrl (v) } } pub struct Select ; impl Into < super :: SelectParam > for Select { fn into (self) -> super :: SelectParam { super :: SelectParam :: BannerUrl (self) } } impl Into < :: prisma_client_rust :: Selection > for Select { fn into (self) -> :: prisma_client_rust :: Selection { :: prisma_client_rust :: sel (NAME) } } pub struct Include ; impl Into < super :: IncludeParam > for Include { fn into (self) -> super :: IncludeParam { super :: IncludeParam :: BannerUrl (self) } } impl Into < :: prisma_client_rust :: Selection > for Include { fn into (self) -> :: prisma_client_rust :: Selection { :: prisma_client_rust :: sel (NAME) } } } pub mod description { use super :: super :: { _prisma :: * , * } ; use super :: { WhereParam , UniqueWhereParam , WithParam , SetParam , UncheckedSetParam } ; pub const NAME : & str = "description" ; pub type Type = String ; pub type RecursiveSafeType = Type ; pub struct Equals (pub String) ; pub fn equals < T : From < Equals >> (value : String) -> T { Equals (value) . into () } impl From < Equals > for WhereParam { fn from (Equals (v) : Equals) -> Self { WhereParam :: Description (_prisma :: read_filters :: StringFilter :: Equals (v)) } } :: prisma_client_rust :: scalar_where_param_fns ! (_prisma :: read_filters :: StringFilter , Description , { fn in_vec (_ : Vec < String >) -> InVec ; fn not_in_vec (_ : Vec < String >) -> NotInVec ; fn lt (_ : String) -> Lt ; fn lte (_ : String) -> Lte ; fn gt (_ : String) -> Gt ; fn gte (_ : String) -> Gte ; fn contains (_ : String) -> Contains ; fn starts_with (_ : String) -> StartsWith ; fn ends_with (_ : String) -> EndsWith ; fn not (_ : String) -> Not ; }) ; pub struct Order (SortOrder) ; pub fn order < T : From < Order >> (v : SortOrder) -> T { Order (v) . into () } impl From < Order > for super :: OrderByWithRelationParam { fn from (Order (v) : Order) -> Self { Self :: Description (v) } } pub struct Set (pub String) ; impl From < Set > for SetParam { fn from (Set (v) : Set) -> Self { Self :: Description (_prisma :: write_params :: StringParam :: Set (v)) } } pub fn set < T : From < Set >> (value : String) -> T { Set (value) . into () } pub struct UpdateOperation (pub _prisma :: write_params :: StringParam) ; impl From < UpdateOperation > for SetParam { fn from (UpdateOperation (v) : UpdateOperation) -> Self { Self :: Description (v) } } impl From < Set > for UncheckedSetParam { fn from (Set (v) : Set) -> Self { Self :: Description (_prisma :: write_params :: StringParam :: Set (v)) } } impl From < UpdateOperation > for UncheckedSetParam { fn from (UpdateOperation (v) : UpdateOperation) -> Self { Self :: Description (v) } } pub struct Select ; impl Into < super :: SelectParam > for Select { fn into (self) -> super :: SelectParam { super :: SelectParam :: Description (self) } } impl Into < :: prisma_client_rust :: Selection > for Select { fn into (self) -> :: prisma_client_rust :: Selection { :: prisma_client_rust :: sel (NAME) } } pub struct Include ; impl Into < super :: IncludeParam > for Include { fn into (self) -> super :: IncludeParam { super :: IncludeParam :: Description (self) } } impl Into < :: prisma_client_rust :: Selection > for Include { fn into (self) -> :: prisma_client_rust :: Selection { :: prisma_client_rust :: sel (NAME) } } } pub mod extra_data { use super :: super :: { _prisma :: * , * } ; use super :: { WhereParam , UniqueWhereParam , WithParam , SetParam , UncheckedSetParam } ; pub const NAME : & str = "extraData" ; pub type Type = String ; pub type RecursiveSafeType = Type ; pub struct Equals (pub String) ; pub fn equals < T : From < Equals >> (value : String) -> T { Equals (value) . into () } impl From < Equals > for WhereParam { fn from (Equals (v) : Equals) -> Self { WhereParam :: ExtraData (_prisma :: read_filters :: StringFilter :: Equals (v)) } } :: prisma_client_rust :: scalar_where_param_fns ! (_prisma :: read_filters :: StringFilter , ExtraData , { fn in_vec (_ : Vec < String >) -> InVec ; fn not_in_vec (_ : Vec < String >) -> NotInVec ; fn lt (_ : String) -> Lt ; fn lte (_ : String) -> Lte ; fn gt (_ : String) -> Gt ; fn gte (_ : String) -> Gte ; fn contains (_ : String) -> Contains ; fn starts_with (_ : String) -> StartsWith ; fn ends_with (_ : String) -> EndsWith ; fn not (_ : String) -> Not ; }) ; pub struct Order (SortOrder) ; pub fn order < T : From < Order >> (v : SortOrder) -> T { Order (v) . into () } impl From < Order > for super :: OrderByWithRelationParam { fn from (Order (v) : Order) -> Self { Self :: ExtraData (v) } } pub struct Set (pub String) ; impl From < Set > for SetParam { fn from (Set (v) : Set) -> Self { Self :: ExtraData (_prisma :: write_params :: StringParam :: Set (v)) } } pub fn set < T : From < Set >> (value : String) -> T { Set (value) . into () } pub struct UpdateOperation (pub _prisma :: write_params :: StringParam) ; impl From < UpdateOperation > for SetParam { fn from (UpdateOperation (v) : UpdateOperation) -> Self { Self :: ExtraData (v) } } impl From < Set > for UncheckedSetParam { fn from (Set (v) : Set) -> Self { Self :: ExtraData (_prisma :: write_params :: StringParam :: Set (v)) } } impl From < UpdateOperation > for UncheckedSetParam { fn from (UpdateOperation (v) : UpdateOperation) -> Self { Self :: ExtraData (v) } } pub struct Select ; impl Into < super :: SelectParam > for Select { fn into (self) -> super :: SelectParam { super :: SelectParam :: ExtraData (self) } } impl Into < :: prisma_client_rust :: Selection > for Select { fn into (self) -> :: prisma_client_rust :: Selection { :: prisma_client_rust :: sel (NAME) } } pub struct Include ; impl Into < super :: IncludeParam > for Include { fn into (self) -> super :: IncludeParam { super :: IncludeParam :: ExtraData (self) } } impl Into < :: prisma_client_rust :: Selection > for Include { fn into (self) -> :: prisma_client_rust :: Selection { :: prisma_client_rust :: sel (NAME) } } } pub mod icon_url { use super :: super :: { _prisma :: * , * } ; use super :: { WhereParam , UniqueWhereParam , WithParam , SetParam , UncheckedSetParam } ; pub const NAME : & str = "iconUrl" ; pub type Type = Option < String > ; pub type RecursiveSafeType = Type ; pub struct Equals (pub Option < String >) ; pub fn equals < T : From < Equals >> (value : Option < String >) -> T { Equals (value) . into () } impl From < Equals > for WhereParam { fn from (Equals (v) : Equals) -> Self { WhereParam :: IconUrl (_prisma :: read_filters :: StringNullableFilter :: Equals (v)) } } :: prisma_client_rust :: scalar_where_param_fns ! (_prisma :: read_filters :: StringNullableFilter , IconUrl , { fn in_vec (_ : Vec < String >) -> InVec ; fn not_in_vec (_ : Vec < String >) -> NotInVec ; fn lt (_ : String) -> Lt ; fn lte (_ : String) -> Lte ; fn gt (_ : String) -> Gt ; fn gte (_ : String) -> Gte ; fn contains (_ : String) -> Contains ; fn starts_with (_ : String) -> StartsWith ; fn ends_with (_ : String) -> EndsWith ; fn not (_ : Option < String >) -> Not ; }) ; pub struct Order (SortOrder) ; pub fn order < T : From < Order >> (v : SortOrder) -> T { Order (v) . into () } impl From < Order > for super :: OrderByWithRelationParam { fn from (Order (v) : Order) -> Self { Self :: IconUrl (v) } } pub struct Set (pub Option < String >) ; impl From < Set > for SetParam { fn from (Set (v) : Set) -> Self { Self :: IconUrl (_prisma :: write_params :: StringNullableParam :: Set (v)) } } pub fn set < T : From < Set >> (value : Option < String >) -> T { Set (value) . into () } pub struct UpdateOperation (pub _prisma :: write_params :: StringNullableParam) ; impl From < UpdateOperation > for SetParam { fn from (UpdateOperation (v) : UpdateOperation) -> Self { Self :: IconUrl (v) } } impl From < Set > for UncheckedSetParam { fn from (Set (v) : Set) -> Self { Self :: IconUrl (_prisma :: write_params :: StringNullableParam :: Set (v)) } } impl From < UpdateOperation > for UncheckedSetParam { fn from (UpdateOperation (v) : UpdateOperation) -> Self { Self :: IconUrl (v) } } pub struct Select ; impl Into < super :: SelectParam > for Select { fn into (self) -> super :: SelectParam { super :: SelectParam :: IconUrl (self) } } impl Into < :: prisma_client_rust :: Selection > for Select { fn into (self) -> :: prisma_client_rust :: Selection { :: prisma_client_rust :: sel (NAME) } } pub struct Include ; impl Into < super :: IncludeParam > for Include { fn into (self) -> super :: IncludeParam { super :: IncludeParam :: IconUrl (self) } } impl Into < :: prisma_client_rust :: Selection > for Include { fn into (self) -> :: prisma_client_rust :: Selection { :: prisma_client_rust :: sel (NAME) } } } pub mod id { use super :: super :: { _prisma :: * , * } ; use super :: { WhereParam , UniqueWhereParam , WithParam , SetParam , UncheckedSetParam } ; pub const NAME : & str = "id" ; pub type Type = Int ; pub type RecursiveSafeType = Type ; pub struct Equals (pub Int) ; pub fn equals < T : From < Equals >> (value : Int) -> T { Equals (value) . into () } impl From < Equals > for UniqueWhereParam { fn from (Equals (v) : Equals) -> Self { UniqueWhereParam :: IdEquals (v) } } impl From < Equals > for WhereParam { fn from (Equals (v) : Equals) -> Self { WhereParam :: Id (_prisma :: read_filters :: IntFilter :: Equals (v)) } } :: prisma_client_rust :: scalar_where_param_fns ! (_prisma :: read_filters :: IntFilter , Id , { fn in_vec (_ : Vec < Int >) -> InVec ; fn not_in_vec (_ : Vec < Int >) -> NotInVec ; fn lt (_ : Int) -> Lt ; fn lte (_ : Int) -> Lte ; fn gt (_ : Int) -> Gt ; fn gte (_ : Int) -> Gte ; fn not (_ : Int) -> Not ; }) ; pub struct Order (SortOrder) ; pub fn order < T : From < Order >> (v : SortOrder) -> T { Order (v) . into () } impl From < Order > for super :: OrderByWithRelationParam { fn from (Order (v) : Order) -> Self { Self :: Id (v) } } pub struct Set (pub Int) ; impl From < Set > for SetParam { fn from (Set (v) : Set) -> Self { Self :: Id (_prisma :: write_params :: IntParam :: Set (v)) } } pub fn set < T : From < Set >> (value : Int) -> T { Set (value) . into () } pub struct UpdateOperation (pub _prisma :: write_params :: IntParam) ; impl From < UpdateOperation > for SetParam { fn from (UpdateOperation (v) : UpdateOperation) -> Self { Self :: Id (v) } } pub fn increment < T : From < UpdateOperation >> (value : Int) -> T { UpdateOperation (_prisma :: write_params :: IntParam :: Increment (value)) . into () } pub fn decrement < T : From < UpdateOperation >> (value : Int) -> T { UpdateOperation (_prisma :: write_params :: IntParam :: Decrement (value)) . into () } pub fn multiply < T : From < UpdateOperation >> (value : Int) -> T { UpdateOperation (_prisma :: write_params :: IntParam :: Multiply (value)) . into () } pub fn divide < T : From < UpdateOperation >> (value : Int) -> T { UpdateOperation (_prisma :: write_params :: IntParam :: Divide (value)) . into () } impl From < Set > for UncheckedSetParam { fn from (Set (v) : Set) -> Self { Self :: Id (_prisma :: write_params :: IntParam :: Set (v)) } } impl From < UpdateOperation > for UncheckedSetParam { fn from (UpdateOperation (v) : UpdateOperation) -> Self { Self :: Id (v) } } pub struct Select ; impl Into < super :: SelectParam > for Select { fn into (self) -> super :: SelectParam { super :: SelectParam :: Id (self) } } impl Into < :: prisma_client_rust :: Selection > for Select { fn into (self) -> :: prisma_client_rust :: Selection { :: prisma_client_rust :: sel (NAME) } } pub struct Include ; impl Into < super :: IncludeParam > for Include { fn into (self) -> super :: IncludeParam { super :: IncludeParam :: Id (self) } } impl Into < :: prisma_client_rust :: Selection > for Include { fn into (self) -> :: prisma_client_rust :: Selection { :: prisma_client_rust :: sel (NAME) } } } pub mod name { use super :: super :: { _prisma :: * , * } ; use super :: { WhereParam , UniqueWhereParam , WithParam , SetParam , UncheckedSetParam } ; pub const NAME : & str = "name" ; pub type Type = String ; pub type RecursiveSafeType = Type ; pub struct Equals (pub String) ; pub fn equals < T : From < Equals >> (value : String) -> T { Equals (value) . into () } impl From < Equals > for WhereParam { fn from (Equals (v) : Equals) -> Self { WhereParam :: Name (_prisma :: read_filters :: StringFilter :: Equals (v)) } } :: prisma_client_rust :: scalar_where_param_fns ! (_prisma :: read_filters :: StringFilter , Name , { fn in_vec (_ : Vec < String >) -> InVec ; fn not_in_vec (_ : Vec < String >) -> NotInVec ; fn lt (_ : String) -> Lt ; fn lte (_ : String) -> Lte ; fn gt (_ : String) -> Gt ; fn gte (_ : String) -> Gte ; fn contains (_ : String) -> Contains ; fn starts_with (_ : String) -> StartsWith ; fn ends_with (_ : String) -> EndsWith ; fn not (_ : String) -> Not ; }) ; pub struct Order (SortOrder) ; pub fn order < T : From < Order >> (v : SortOrder) -> T { Order (v) . into () } impl From < Order > for super :: OrderByWithRelationParam { fn from (Order (v) : Order) -> Self { Self :: Name (v) } } pub struct Set (pub String) ; impl From < Set > for SetParam { fn from (Set (v) : Set) -> Self { Self :: Name (_prisma :: write_params :: StringParam :: Set (v)) } } pub fn set < T : From < Set >> (value : String) -> T { Set (value) . into () } pub struct UpdateOperation (pub _prisma :: write_params :: StringParam) ; impl From < UpdateOperation > for SetParam { fn from (UpdateOperation (v) : UpdateOperation) -> Self { Self :: Name (v) } } impl From < Set > for UncheckedSetParam { fn from (Set (v) : Set) -> Self { Self :: Name (_prisma :: write_params :: StringParam :: Set (v)) } } impl From < UpdateOperation > for UncheckedSetParam { fn from (UpdateOperation (v) : UpdateOperation) -> Self { Self :: Name (v) } } pub struct Select ; impl Into < super :: SelectParam > for Select { fn into (self) -> super :: SelectParam { super :: SelectParam :: Name (self) } } impl Into < :: prisma_client_rust :: Selection > for Select { fn into (self) -> :: prisma_client_rust :: Selection { :: prisma_client_rust :: sel (NAME) } } pub struct Include ; impl Into < super :: IncludeParam > for Include { fn into (self) -> super :: IncludeParam { super :: IncludeParam :: Name (self) } } impl Into < :: prisma_client_rust :: Selection > for Include { fn into (self) -> :: prisma_client_rust :: Selection { :: prisma_client_rust :: sel (NAME) } } } pub mod plugin { use super :: super :: { _prisma :: * , * } ; use super :: { WhereParam , UniqueWhereParam , WithParam , SetParam , UncheckedSetParam } ; pub const NAME : & str = "plugin" ; pub type Type = String ; pub type RecursiveSafeType = Type ; pub struct Equals (pub String) ; pub fn equals < T : From < Equals >> (value : String) -> T { Equals (value) . into () } impl From < Equals > for WhereParam { fn from (Equals (v) : Equals) -> Self { WhereParam :: Plugin (_prisma :: read_filters :: StringFilter :: Equals (v)) } } :: prisma_client_rust :: scalar_where_param_fns ! (_prisma :: read_filters :: StringFilter , Plugin , { fn in_vec (_ : Vec < String >) -> InVec ; fn not_in_vec (_ : Vec < String >) -> NotInVec ; fn lt (_ : String) -> Lt ; fn lte (_ : String) -> Lte ; fn gt (_ : String) -> Gt ; fn gte (_ : String) -> Gte ; fn contains (_ : String) -> Contains ; fn starts_with (_ : String) -> StartsWith ; fn ends_with (_ : String) -> EndsWith ; fn not (_ : String) -> Not ; }) ; pub struct Order (SortOrder) ; pub fn order < T : From < Order >> (v : SortOrder) -> T { Order (v) . into () } impl From < Order > for super :: OrderByWithRelationParam { fn from (Order (v) : Order) -> Self { Self :: Plugin (v) } } pub struct Set (pub String) ; impl From < Set > for SetParam { fn from (Set (v) : Set) -> Self { Self :: Plugin (_prisma :: write_params :: StringParam :: Set (v)) } } pub fn set < T : From < Set >> (value : String) -> T { Set (value) . into () } pub struct UpdateOperation (pub _prisma :: write_params :: StringParam) ; impl From < UpdateOperation > for SetParam { fn from (UpdateOperation (v) : UpdateOperation) -> Self { Self :: Plugin (v) } } impl From < Set > for UncheckedSetParam { fn from (Set (v) : Set) -> Self { Self :: Plugin (_prisma :: write_params :: StringParam :: Set (v)) } } impl From < UpdateOperation > for UncheckedSetParam { fn from (UpdateOperation (v) : UpdateOperation) -> Self { Self :: Plugin (v) } } pub struct Select ; impl Into < super :: SelectParam > for Select { fn into (self) -> super :: SelectParam { super :: SelectParam :: Plugin (self) } } impl Into < :: prisma_client_rust :: Selection > for Select { fn into (self) -> :: prisma_client_rust :: Selection { :: prisma_client_rust :: sel (NAME) } } pub struct Include ; impl Into < super :: IncludeParam > for Include { fn into (self) -> super :: IncludeParam { super :: IncludeParam :: Plugin (self) } } impl Into < :: prisma_client_rust :: Selection > for Include { fn into (self) -> :: prisma_client_rust :: Selection { :: prisma_client_rust :: sel (NAME) } } } pub mod updated { use super :: super :: { _prisma :: * , * } ; use super :: { WhereParam , UniqueWhereParam , WithParam , SetParam , UncheckedSetParam } ; pub const NAME : & str = "updated" ; pub type Type = DateTime ; pub type RecursiveSafeType = Type ; pub struct Equals (pub DateTime) ; pub fn equals < T : From < Equals >> (value : DateTime) -> T { Equals (value) . into () } impl From < Equals > for WhereParam { fn from (Equals (v) : Equals) -> Self { WhereParam :: Updated (_prisma :: read_filters :: DateTimeFilter :: Equals (v)) } } :: prisma_client_rust :: scalar_where_param_fns ! (_prisma :: read_filters :: DateTimeFilter , Updated , { fn in_vec (_ : Vec < DateTime >) -> InVec ; fn not_in_vec (_ : Vec < DateTime >) -> NotInVec ; fn lt (_ : DateTime) -> Lt ; fn lte (_ : DateTime) -> Lte ; fn gt (_ : DateTime) -> Gt ; fn gte (_ : DateTime) -> Gte ; fn not (_ : DateTime) -> Not ; }) ; pub struct Order (SortOrder) ; pub fn order < T : From < Order >> (v : SortOrder) -> T { Order (v) . into () } impl From < Order > for super :: OrderByWithRelationParam { fn from (Order (v) : Order) -> Self { Self :: Updated (v) } } pub struct Set (pub DateTime) ; impl From < Set > for SetParam { fn from (Set (v) : Set) -> Self { Self :: Updated (_prisma :: write_params :: DateTimeParam :: Set (v)) } } pub fn set < T : From < Set >> (value : DateTime) -> T { Set (value) . into () } pub struct UpdateOperation (pub _prisma :: write_params :: DateTimeParam) ; impl From < UpdateOperation > for SetParam { fn from (UpdateOperation (v) : UpdateOperation) -> Self { Self :: Updated (v) } } impl From < Set > for UncheckedSetParam { fn from (Set (v) : Set) -> Self { Self :: Updated (_prisma :: write_params :: DateTimeParam :: Set (v)) } } impl From < UpdateOperation > for UncheckedSetParam { fn from (UpdateOperation (v) : UpdateOperation) -> Self { Self :: Updated (v) } } pub struct Select ; impl Into < super :: SelectParam > for Select { fn into (self) -> super :: SelectParam { super :: SelectParam :: Updated (self) } } impl Into < :: prisma_client_rust :: Selection > for Select { fn into (self) -> :: prisma_client_rust :: Selection { :: prisma_client_rust :: sel (NAME) } } pub struct Include ; impl Into < super :: IncludeParam > for Include { fn into (self) -> super :: IncludeParam { super :: IncludeParam :: Updated (self) } } impl Into < :: prisma_client_rust :: Selection > for Include { fn into (self) -> :: prisma_client_rust :: Selection { :: prisma_client_rust :: sel (NAME) } } } } pub mod installed_mod { use super :: { _prisma :: * , * } ; pub const NAME : & str = "InstalledMod" ; # [derive (Debug , Clone)] pub enum WhereParam { Not (Vec < WhereParam >) , Or (Vec < WhereParam >) , And (Vec < WhereParam >) , Id (super :: _prisma :: read_filters :: IntFilter) , FileSize (super :: _prisma :: read_filters :: IntFilter) , Updated (super :: _prisma :: read_filters :: DateTimeFilter) , IconUrl (super :: _prisma :: read_filters :: StringNullableFilter) , InstanceId (super :: _prisma :: read_filters :: IntFilter) , Source (super :: _prisma :: read_filters :: StringFilter) , ProjectId (super :: _prisma :: read_filters :: StringFilter) , ProjectName (super :: _prisma :: read_filters :: StringFilter) , ProjectDesc (super :: _prisma :: read_filters :: StringNullableFilter) , ProjectVersion (super :: _prisma :: read_filters :: StringNullableFilter) } impl :: prisma_client_rust :: WhereInput for WhereParam { fn serialize (self) -> :: prisma_client_rust :: SerializedWhereInput { let (name , value) = match self { Self :: Not (value) => ("NOT" , :: prisma_client_rust :: SerializedWhereValue :: Object (:: prisma_client_rust :: merge_fields (value . into_iter () . map (:: prisma_client_rust :: WhereInput :: serialize) . map (Into :: into) . collect ())) ,) , Self :: Or (value) => ("OR" , :: prisma_client_rust :: SerializedWhereValue :: List (value . into_iter () . map (:: prisma_client_rust :: WhereInput :: serialize) . map (| p | :: prisma_client_rust :: PrismaValue :: Object (vec ! [p . into ()])) . collect ()) ,) , Self :: And (value) => ("AND" , :: prisma_client_rust :: SerializedWhereValue :: Object (:: prisma_client_rust :: merge_fields (value . into_iter () . map (:: prisma_client_rust :: WhereInput :: serialize) . map (Into :: into) . collect ())) ,) , Self :: Id (value) => (id :: NAME , value . into ()) , Self :: FileSize (value) => (file_size :: NAME , value . into ()) , Self :: Updated (value) => (updated :: NAME , value . into ()) , Self :: IconUrl (value) => (icon_url :: NAME , value . into ()) , Self :: InstanceId (value) => (instance_id :: NAME , value . into ()) , Self :: Source (value) => (source :: NAME , value . into ()) , Self :: ProjectId (value) => (project_id :: NAME , value . into ()) , Self :: ProjectName (value) => (project_name :: NAME , value . into ()) , Self :: ProjectDesc (value) => (project_desc :: NAME , value . into ()) , Self :: ProjectVersion (value) => (project_version :: NAME , value . into ()) } ; :: prisma_client_rust :: SerializedWhereInput :: new (name . to_string () , value . into ()) } } # [derive (Debug , Clone)] pub enum UniqueWhereParam { IdEquals (Int) , ProjectIdEquals (String) } impl :: prisma_client_rust :: WhereInput for UniqueWhereParam { fn serialize (self) -> :: prisma_client_rust :: SerializedWhereInput { let (name , value) = match self { UniqueWhereParam :: IdEquals (value) => ("id" , :: prisma_client_rust :: SerializedWhereValue :: Value (:: prisma_client_rust :: PrismaValue :: Int (value))) , UniqueWhereParam :: ProjectIdEquals (value) => ("projectId" , :: prisma_client_rust :: SerializedWhereValue :: Value (:: prisma_client_rust :: PrismaValue :: String (value))) } ; :: prisma_client_rust :: SerializedWhereInput :: new (name . to_string () , value . into ()) } } impl From < :: prisma_client_rust :: Operator < Self >> for WhereParam { fn from (op : :: prisma_client_rust :: Operator < Self >) -> Self { match op { :: prisma_client_rust :: Operator :: Not (value) => Self :: Not (value) , :: prisma_client_rust :: Operator :: And (value) => Self :: And (value) , :: prisma_client_rust :: Operator :: Or (value) => Self :: Or (value) , } } } # [derive (Debug , Clone)] pub enum OrderByWithRelationParam { Id (super :: SortOrder) , FileSize (super :: SortOrder) , Updated (super :: SortOrder) , IconUrl (super :: SortOrder) , InstanceId (super :: SortOrder) , Source (super :: SortOrder) , ProjectId (super :: SortOrder) , ProjectName (super :: SortOrder) , ProjectDesc (super :: SortOrder) , ProjectVersion (super :: SortOrder) } impl Into < (String , :: prisma_client_rust :: PrismaValue) > for OrderByWithRelationParam { fn into (self) -> (String , :: prisma_client_rust :: PrismaValue) { let (k , v) = match self { Self :: Id (param) => ("id" , param . into ()) , Self :: FileSize (param) => ("fileSize" , param . into ()) , Self :: Updated (param) => ("updated" , param . into ()) , Self :: IconUrl (param) => ("iconUrl" , param . into ()) , Self :: InstanceId (param) => ("instanceId" , param . into ()) , Self :: Source (param) => ("source" , param . into ()) , Self :: ProjectId (param) => ("projectId" , param . into ()) , Self :: ProjectName (param) => ("projectName" , param . into ()) , Self :: ProjectDesc (param) => ("projectDesc" , param . into ()) , Self :: ProjectVersion (param) => ("projectVersion" , param . into ()) } ; (k . to_string () , v) } } # [derive (Debug , Clone)] pub enum WithParam { } impl Into < :: prisma_client_rust :: Selection > for WithParam { fn into (self) -> :: prisma_client_rust :: Selection { match self { } } } # [derive (Debug , Clone)] pub enum SetParam { Id (super :: _prisma :: write_params :: IntParam) , FileSize (super :: _prisma :: write_params :: IntParam) , Updated (super :: _prisma :: write_params :: DateTimeParam) , IconUrl (super :: _prisma :: write_params :: StringNullableParam) , InstanceId (super :: _prisma :: write_params :: IntParam) , Source (super :: _prisma :: write_params :: StringParam) , ProjectId (super :: _prisma :: write_params :: StringParam) , ProjectName (super :: _prisma :: write_params :: StringParam) , ProjectDesc (super :: _prisma :: write_params :: StringNullableParam) , ProjectVersion (super :: _prisma :: write_params :: StringNullableParam) } impl Into < (String , :: prisma_client_rust :: PrismaValue) > for SetParam { fn into (self) -> (String , :: prisma_client_rust :: PrismaValue) { let (k , v) = match self { Self :: Id (value) => (id :: NAME , value . into ()) , Self :: FileSize (value) => (file_size :: NAME , value . into ()) , Self :: Updated (value) => (updated :: NAME , value . into ()) , Self :: IconUrl (value) => (icon_url :: NAME , value . into ()) , Self :: InstanceId (value) => (instance_id :: NAME , value . into ()) , Self :: Source (value) => (source :: NAME , value . into ()) , Self :: ProjectId (value) => (project_id :: NAME , value . into ()) , Self :: ProjectName (value) => (project_name :: NAME , value . into ()) , Self :: ProjectDesc (value) => (project_desc :: NAME , value . into ()) , Self :: ProjectVersion (value) => (project_version :: NAME , value . into ()) } ; (k . to_string () , v) } } # [derive (Debug , Clone)] pub enum UncheckedSetParam { Id (super :: _prisma :: write_params :: IntParam) , FileSize (super :: _prisma :: write_params :: IntParam) , Updated (super :: _prisma :: write_params :: DateTimeParam) , IconUrl (super :: _prisma :: write_params :: StringNullableParam) , InstanceId (super :: _prisma :: write_params :: IntParam) , Source (super :: _prisma :: write_params :: StringParam) , ProjectId (super :: _prisma :: write_params :: StringParam) , ProjectName (super :: _prisma :: write_params :: StringParam) , ProjectDesc (super :: _prisma :: write_params :: StringNullableParam) , ProjectVersion (super :: _prisma :: write_params :: StringNullableParam) } impl Into < (String , :: prisma_client_rust :: PrismaValue) > for UncheckedSetParam { fn into (self) -> (String , :: prisma_client_rust :: PrismaValue) { let (k , v) = match self { Self :: Id (value) => ("id" , value . into ()) , Self :: FileSize (value) => ("fileSize" , value . into ()) , Self :: Updated (value) => ("updated" , value . into ()) , Self :: IconUrl (value) => ("iconUrl" , value . into ()) , Self :: InstanceId (value) => ("instanceId" , value . into ()) , Self :: Source (value) => ("source" , value . into ()) , Self :: ProjectId (value) => ("projectId" , value . into ()) , Self :: ProjectName (value) => ("projectName" , value . into ()) , Self :: ProjectDesc (value) => ("projectDesc" , value . into ()) , Self :: ProjectVersion (value) => ("projectVersion" , value . into ()) } ; (k . to_string () , v) } } :: prisma_client_rust :: macros :: select_factory ! (_select_installed_mod , select , prisma :: installed_mod , struct Data { # [serde (rename = "id")] id : id :: Type , # [serde (rename = "fileSize")] file_size : file_size :: Type , # [serde (rename = "updated")] updated : updated :: Type , # [serde (rename = "iconUrl")] icon_url : icon_url :: Type , # [serde (rename = "instanceId")] instance_id : instance_id :: Type , # [serde (rename = "source")] source : source :: Type , # [serde (rename = "projectId")] project_id : project_id :: Type , # [serde (rename = "projectName")] project_name : project_name :: Type , # [serde (rename = "projectDesc")] project_desc : project_desc :: Type , # [serde (rename = "projectVersion")] project_version : project_version :: Type } , [(id , Scalar) , (file_size , Scalar) , (updated , Scalar) , (icon_url , Scalar) , (instance_id , Scalar) , (source , Scalar) , (project_id , Scalar) , (project_name , Scalar) , (project_desc , Scalar) , (project_version , Scalar)]) ; pub enum SelectParam { Id (id :: Select) , FileSize (file_size :: Select) , Updated (updated :: Select) , IconUrl (icon_url :: Select) , InstanceId (instance_id :: Select) , Source (source :: Select) , ProjectId (project_id :: Select) , ProjectName (project_name :: Select) , ProjectDesc (project_desc :: Select) , ProjectVersion (project_version :: Select) } impl Into < :: prisma_client_rust :: Selection > for SelectParam { fn into (self) -> :: prisma_client_rust :: Selection { match self { Self :: Id (data) => data . into () , Self :: FileSize (data) => data . into () , Self :: Updated (data) => data . into () , Self :: IconUrl (data) => data . into () , Self :: InstanceId (data) => data . into () , Self :: Source (data) => data . into () , Self :: ProjectId (data) => data . into () , Self :: ProjectName (data) => data . into () , Self :: ProjectDesc (data) => data . into () , Self :: ProjectVersion (data) => data . into () } } } :: prisma_client_rust :: macros :: include_factory ! (_include_installed_mod , include , prisma :: installed_mod , struct Data { # [serde (rename = "id")] id : id :: Type , # [serde (rename = "fileSize")] file_size : file_size :: Type , # [serde (rename = "updated")] updated : updated :: Type , # [serde (rename = "iconUrl")] icon_url : icon_url :: Type , # [serde (rename = "instanceId")] instance_id : instance_id :: Type , # [serde (rename = "source")] source : source :: Type , # [serde (rename = "projectId")] project_id : project_id :: Type , # [serde (rename = "projectName")] project_name : project_name :: Type , # [serde (rename = "projectDesc")] project_desc : project_desc :: Type , # [serde (rename = "projectVersion")] project_version : project_version :: Type } , []) ; pub enum IncludeParam { Id (id :: Include) , FileSize (file_size :: Include) , Updated (updated :: Include) , IconUrl (icon_url :: Include) , InstanceId (instance_id :: Include) , Source (source :: Include) , ProjectId (project_id :: Include) , ProjectName (project_name :: Include) , ProjectDesc (project_desc :: Include) , ProjectVersion (project_version :: Include) } impl Into < :: prisma_client_rust :: Selection > for IncludeParam { fn into (self) -> :: prisma_client_rust :: Selection { match self { Self :: Id (data) => data . into () , Self :: FileSize (data) => data . into () , Self :: Updated (data) => data . into () , Self :: IconUrl (data) => data . into () , Self :: InstanceId (data) => data . into () , Self :: Source (data) => data . into () , Self :: ProjectId (data) => data . into () , Self :: ProjectName (data) => data . into () , Self :: ProjectDesc (data) => data . into () , Self :: ProjectVersion (data) => data . into () } } } # [derive (Debug , Clone)] pub struct Create { pub file_size : Int , pub instance_id : Int , pub source : String , pub project_id : String , pub project_name : String , pub _params : Vec < SetParam > } impl Create { pub fn to_query < 'a > (self , client : & 'a PrismaClient) -> CreateQuery < 'a > { client . installed_mod () . create (self . file_size , self . instance_id , self . source , self . project_id , self . project_name , self . _params) } pub fn to_params (mut self) -> Vec < SetParam > { self . _params . extend ([file_size :: set (self . file_size) , instance_id :: set (self . instance_id) , source :: set (self . source) , project_id :: set (self . project_id) , project_name :: set (self . project_name)]) ; self . _params } } pub fn create (file_size : Int , instance_id : Int , source : String , project_id : String , project_name : String , _params : Vec < SetParam >) -> Create { Create { file_size , instance_id , source , project_id , project_name , _params } } # [derive (Debug , Clone , :: serde :: Serialize , :: serde :: Deserialize)] # [derive (:: prisma_client_rust :: specta :: Type)] # [specta (rename = "InstalledModCreation" , crate = prisma_client_rust :: specta)] pub struct CreateUnchecked { # [serde (rename = "fileSize")] pub file_size : Int , # [serde (rename = "instanceId")] pub instance_id : Int , # [serde (rename = "source")] pub source : String , # [serde (rename = "projectId")] pub project_id : String , # [serde (rename = "projectName")] pub project_name : String , # [serde (skip)] pub _params : Vec < UncheckedSetParam > } impl CreateUnchecked { pub fn to_query < 'a > (self , client : & 'a PrismaClient) -> CreateUncheckedQuery < 'a > { client . installed_mod () . create_unchecked (self . file_size , self . instance_id , self . source , self . project_id , self . project_name , self . _params) } pub fn to_params (mut self) -> Vec < UncheckedSetParam > { self . _params . extend ([file_size :: set (self . file_size) , instance_id :: set (self . instance_id) , source :: set (self . source) , project_id :: set (self . project_id) , project_name :: set (self . project_name)]) ; self . _params } } pub fn create_unchecked (file_size : Int , instance_id : Int , source : String , project_id : String , project_name : String , _params : Vec < UncheckedSetParam >) -> CreateUnchecked { CreateUnchecked { file_size , instance_id , source , project_id , project_name , _params } } # [derive (Debug , Clone , :: serde :: Serialize , :: serde :: Deserialize)] # [derive (:: prisma_client_rust :: specta :: Type)] # [specta (rename = "InstalledModUpdate" , crate = prisma_client_rust :: specta)] pub struct Update { # [serde (rename = "id")] pub id : id :: Type , # [serde (rename = "fileSize" , skip_serializing_if = "Option::is_none")] pub file_size : Option < file_size :: Type > , # [serde (rename = "updated" , skip_serializing_if = "Option::is_none")] pub updated : Option < updated :: Type > , # [serde (rename = "iconUrl" , skip_serializing_if = "Option::is_none")] pub icon_url : icon_url :: Type , # [serde (rename = "instanceId" , skip_serializing_if = "Option::is_none")] pub instance_id : Option < instance_id :: Type > , # [serde (rename = "source" , skip_serializing_if = "Option::is_none")] pub source : Option < source :: Type > , # [serde (rename = "projectId" , skip_serializing_if = "Option::is_none")] pub project_id : Option < project_id :: Type > , # [serde (rename = "projectName" , skip_serializing_if = "Option::is_none")] pub project_name : Option < project_name :: Type > , # [serde (rename = "projectDesc" , skip_serializing_if = "Option::is_none")] pub project_desc : project_desc :: Type , # [serde (rename = "projectVersion" , skip_serializing_if = "Option::is_none")] pub project_version : project_version :: Type } impl Update { pub fn as_params (self) -> Vec < SetParam > { let mut params = Vec :: new () ; if let Some (field) = self . file_size { params . push (file_size :: set (field)) ; } if let Some (field) = self . updated { params . push (updated :: set (field)) ; } if let Some (field) = self . icon_url { params . push (icon_url :: set (Some (field))) ; } if let Some (field) = self . instance_id { params . push (instance_id :: set (field)) ; } if let Some (field) = self . source { params . push (source :: set (field)) ; } if let Some (field) = self . project_id { params . push (project_id :: set (field)) ; } if let Some (field) = self . project_name { params . push (project_name :: set (field)) ; } if let Some (field) = self . project_desc { params . push (project_desc :: set (Some (field))) ; } if let Some (field) = self . project_version { params . push (project_version :: set (Some (field))) ; } params } } # [derive (Debug , Clone)] pub struct Types ; impl :: prisma_client_rust :: ModelTypes for Types { type Data = Data ; type Where = WhereParam ; type WhereUnique = UniqueWhereParam ; type UncheckedSet = UncheckedSetParam ; type Set = SetParam ; type With = WithParam ; type OrderBy = OrderByWithRelationParam ; type Cursor = UniqueWhereParam ; const MODEL : & 'static str = NAME ; fn scalar_selections () -> Vec < :: prisma_client_rust :: Selection > { vec ! [:: prisma_client_rust :: sel (id :: NAME) , :: prisma_client_rust :: sel (file_size :: NAME) , :: prisma_client_rust :: sel (updated :: NAME) , :: prisma_client_rust :: sel (icon_url :: NAME) , :: prisma_client_rust :: sel (instance_id :: NAME) , :: prisma_client_rust :: sel (source :: NAME) , :: prisma_client_rust :: sel (project_id :: NAME) , :: prisma_client_rust :: sel (project_name :: NAME) , :: prisma_client_rust :: sel (project_desc :: NAME) , :: prisma_client_rust :: sel (project_version :: NAME)] } } # [derive (Debug , Clone , :: serde :: Serialize , :: serde :: Deserialize)] # [derive (:: prisma_client_rust :: specta :: Type)] # [specta (rename = "InstalledMod" , crate = prisma_client_rust :: specta)] pub struct Data { # [serde (rename = "id")] pub id : id :: Type , # [serde (rename = "fileSize")] pub file_size : file_size :: Type , # [serde (rename = "updated")] pub updated : updated :: Type , # [serde (rename = "iconUrl")] pub icon_url : icon_url :: Type , # [serde (rename = "instanceId")] pub instance_id : instance_id :: Type , # [serde (rename = "source")] pub source : source :: Type , # [serde (rename = "projectId")] pub project_id : project_id :: Type , # [serde (rename = "projectName")] pub project_name : project_name :: Type , # [serde (rename = "projectDesc")] pub project_desc : project_desc :: Type , # [serde (rename = "projectVersion")] pub project_version : project_version :: Type } impl Data { } :: prisma_client_rust :: macros :: partial_unchecked_factory ! (_partial_unchecked_installed_mod , prisma :: installed_mod , struct Data { # [serde (rename = "id")] pub id : prisma :: installed_mod :: id :: Type , # [serde (rename = "fileSize")] pub file_size : prisma :: installed_mod :: file_size :: Type , # [serde (rename = "updated")] pub updated : prisma :: installed_mod :: updated :: Type , # [serde (rename = "iconUrl")] # [serde (default , with = "::prisma_client_rust::serde::double_option")] pub icon_url : prisma :: installed_mod :: icon_url :: Type , # [serde (rename = "instanceId")] pub instance_id : prisma :: installed_mod :: instance_id :: Type , # [serde (rename = "source")] pub source : prisma :: installed_mod :: source :: Type , # [serde (rename = "projectId")] pub project_id : prisma :: installed_mod :: project_id :: Type , # [serde (rename = "projectName")] pub project_name : prisma :: installed_mod :: project_name :: Type , # [serde (rename = "projectDesc")] # [serde (default , with = "::prisma_client_rust::serde::double_option")] pub project_desc : prisma :: installed_mod :: project_desc :: Type , # [serde (rename = "projectVersion")] # [serde (default , with = "::prisma_client_rust::serde::double_option")] pub project_version : prisma :: installed_mod :: project_version :: Type }) ; :: prisma_client_rust :: macros :: filter_factory ! (_installed_mod_filter , prisma :: installed_mod , [(id , Scalar) , (file_size , Scalar) , (updated , Scalar) , (icon_url , Scalar) , (instance_id , Scalar) , (source , Scalar) , (project_id , Scalar) , (project_name , Scalar) , (project_desc , Scalar) , (project_version , Scalar)]) ; pub type UniqueArgs = :: prisma_client_rust :: UniqueArgs < Types > ; pub type ManyArgs = :: prisma_client_rust :: ManyArgs < Types > ; pub type CountQuery < 'a > = :: prisma_client_rust :: Count < 'a , Types > ; pub type CreateQuery < 'a > = :: prisma_client_rust :: Create < 'a , Types > ; pub type CreateUncheckedQuery < 'a > = :: prisma_client_rust :: CreateUnchecked < 'a , Types > ; pub type CreateManyQuery < 'a > = :: prisma_client_rust :: CreateMany < 'a , Types > ; pub type FindUniqueQuery < 'a > = :: prisma_client_rust :: FindUnique < 'a , Types > ; pub type FindManyQuery < 'a > = :: prisma_client_rust :: FindMany < 'a , Types > ; pub type FindFirstQuery < 'a > = :: prisma_client_rust :: FindFirst < 'a , Types > ; pub type UpdateQuery < 'a > = :: prisma_client_rust :: Update < 'a , Types > ; pub type UpdateUncheckedQuery < 'a > = :: prisma_client_rust :: UpdateUnchecked < 'a , Types > ; pub type UpdateManyQuery < 'a > = :: prisma_client_rust :: UpdateMany < 'a , Types > ; pub type UpsertQuery < 'a > = :: prisma_client_rust :: Upsert < 'a , Types > ; pub type DeleteQuery < 'a > = :: prisma_client_rust :: Delete < 'a , Types > ; pub type DeleteManyQuery < 'a > = :: prisma_client_rust :: DeleteMany < 'a , Types > ; # [derive (Clone)] pub struct Actions < 'a > { pub client : & 'a :: prisma_client_rust :: PrismaClientInternals , } impl < 'a > Actions < 'a > { pub fn find_unique (self , _where : UniqueWhereParam) -> FindUniqueQuery < 'a > { FindUniqueQuery :: new (self . client , _where) } pub fn find_first (self , _where : Vec < WhereParam >) -> FindFirstQuery < 'a > { FindFirstQuery :: new (self . client , _where) } pub fn find_many (self , _where : Vec < WhereParam >) -> FindManyQuery < 'a > { FindManyQuery :: new (self . client , _where) } pub fn create (self , file_size : Int , instance_id : Int , source : String , project_id : String , project_name : String , mut _params : Vec < SetParam >) -> CreateQuery < 'a > { _params . extend ([file_size :: set (file_size) , instance_id :: set (instance_id) , source :: set (source) , project_id :: set (project_id) , project_name :: set (project_name)]) ; CreateQuery :: new (self . client , _params) } pub fn create_unchecked (self , file_size : Int , instance_id : Int , source : String , project_id : String , project_name : String , mut _params : Vec < UncheckedSetParam >) -> CreateUncheckedQuery < 'a > { _params . extend ([file_size :: set (file_size) , instance_id :: set (instance_id) , source :: set (source) , project_id :: set (project_id) , project_name :: set (project_name)]) ; CreateUncheckedQuery :: new (self . client , _params . into_iter () . map (Into :: into) . collect ()) } pub fn create_many (self , data : Vec < CreateUnchecked >) -> CreateManyQuery < 'a > { let data = data . into_iter () . map (CreateUnchecked :: to_params) . collect () ; CreateManyQuery :: new (self . client , data) } pub fn update (self , _where : UniqueWhereParam , _params : Vec < SetParam >) -> UpdateQuery < 'a > { UpdateQuery :: new (self . client , _where , _params , vec ! []) } pub fn update_unchecked (self , _where : UniqueWhereParam , _params : Vec < UncheckedSetParam >) -> UpdateUncheckedQuery < 'a > { UpdateUncheckedQuery :: new (self . client , _where , _params . into_iter () . map (Into :: into) . collect () , vec ! []) } pub fn update_many (self , _where : Vec < WhereParam > , _params : Vec < SetParam >) -> UpdateManyQuery < 'a > { UpdateManyQuery :: new (self . client , _where , _params ,) } pub fn upsert (self , _where : UniqueWhereParam , _create : Create , _update : Vec < SetParam >) -> UpsertQuery < 'a > { UpsertQuery :: new (self . client , _where , _create . to_params () , _update) } pub fn delete (self , _where : UniqueWhereParam) -> DeleteQuery < 'a > { DeleteQuery :: new (self . client , _where , vec ! []) } pub fn delete_many (self , _where : Vec < WhereParam >) -> DeleteManyQuery < 'a > { DeleteManyQuery :: new (self . client , _where) } pub fn count (self , _where : Vec < WhereParam >) -> CountQuery < 'a > { CountQuery :: new (self . client , _where) } } pub mod file_size { use super :: super :: { _prisma :: * , * } ; use super :: { WhereParam , UniqueWhereParam , WithParam , SetParam , UncheckedSetParam } ; pub const NAME : & str = "fileSize" ; pub type Type = Int ; pub type RecursiveSafeType = Type ; pub struct Equals (pub Int) ; pub fn equals < T : From < Equals >> (value : Int) -> T { Equals (value) . into () } impl From < Equals > for WhereParam { fn from (Equals (v) : Equals) -> Self { WhereParam :: FileSize (_prisma :: read_filters :: IntFilter :: Equals (v)) } } :: prisma_client_rust :: scalar_where_param_fns ! (_prisma :: read_filters :: IntFilter , FileSize , { fn in_vec (_ : Vec < Int >) -> InVec ; fn not_in_vec (_ : Vec < Int >) -> NotInVec ; fn lt (_ : Int) -> Lt ; fn lte (_ : Int) -> Lte ; fn gt (_ : Int) -> Gt ; fn gte (_ : Int) -> Gte ; fn not (_ : Int) -> Not ; }) ; pub struct Order (SortOrder) ; pub fn order < T : From < Order >> (v : SortOrder) -> T { Order (v) . into () } impl From < Order > for super :: OrderByWithRelationParam { fn from (Order (v) : Order) -> Self { Self :: FileSize (v) } } pub struct Set (pub Int) ; impl From < Set > for SetParam { fn from (Set (v) : Set) -> Self { Self :: FileSize (_prisma :: write_params :: IntParam :: Set (v)) } } pub fn set < T : From < Set >> (value : Int) -> T { Set (value) . into () } pub struct UpdateOperation (pub _prisma :: write_params :: IntParam) ; impl From < UpdateOperation > for SetParam { fn from (UpdateOperation (v) : UpdateOperation) -> Self { Self :: FileSize (v) } } pub fn increment < T : From < UpdateOperation >> (value : Int) -> T { UpdateOperation (_prisma :: write_params :: IntParam :: Increment (value)) . into () } pub fn decrement < T : From < UpdateOperation >> (value : Int) -> T { UpdateOperation (_prisma :: write_params :: IntParam :: Decrement (value)) . into () } pub fn multiply < T : From < UpdateOperation >> (value : Int) -> T { UpdateOperation (_prisma :: write_params :: IntParam :: Multiply (value)) . into () } pub fn divide < T : From < UpdateOperation >> (value : Int) -> T { UpdateOperation (_prisma :: write_params :: IntParam :: Divide (value)) . into () } impl From < Set > for UncheckedSetParam { fn from (Set (v) : Set) -> Self { Self :: FileSize (_prisma :: write_params :: IntParam :: Set (v)) } } impl From < UpdateOperation > for UncheckedSetParam { fn from (UpdateOperation (v) : UpdateOperation) -> Self { Self :: FileSize (v) } } pub struct Select ; impl Into < super :: SelectParam > for Select { fn into (self) -> super :: SelectParam { super :: SelectParam :: FileSize (self) } } impl Into < :: prisma_client_rust :: Selection > for Select { fn into (self) -> :: prisma_client_rust :: Selection { :: prisma_client_rust :: sel (NAME) } } pub struct Include ; impl Into < super :: IncludeParam > for Include { fn into (self) -> super :: IncludeParam { super :: IncludeParam :: FileSize (self) } } impl Into < :: prisma_client_rust :: Selection > for Include { fn into (self) -> :: prisma_client_rust :: Selection { :: prisma_client_rust :: sel (NAME) } } } pub mod icon_url { use super :: super :: { _prisma :: * , * } ; use super :: { WhereParam , UniqueWhereParam , WithParam , SetParam , UncheckedSetParam } ; pub const NAME : & str = "iconUrl" ; pub type Type = Option < String > ; pub type RecursiveSafeType = Type ; pub struct Equals (pub Option < String >) ; pub fn equals < T : From < Equals >> (value : Option < String >) -> T { Equals (value) . into () } impl From < Equals > for WhereParam { fn from (Equals (v) : Equals) -> Self { WhereParam :: IconUrl (_prisma :: read_filters :: StringNullableFilter :: Equals (v)) } } :: prisma_client_rust :: scalar_where_param_fns ! (_prisma :: read_filters :: StringNullableFilter , IconUrl , { fn in_vec (_ : Vec < String >) -> InVec ; fn not_in_vec (_ : Vec < String >) -> NotInVec ; fn lt (_ : String) -> Lt ; fn lte (_ : String) -> Lte ; fn gt (_ : String) -> Gt ; fn gte (_ : String) -> Gte ; fn contains (_ : String) -> Contains ; fn starts_with (_ : String) -> StartsWith ; fn ends_with (_ : String) -> EndsWith ; fn not (_ : Option < String >) -> Not ; }) ; pub struct Order (SortOrder) ; pub fn order < T : From < Order >> (v : SortOrder) -> T { Order (v) . into () } impl From < Order > for super :: OrderByWithRelationParam { fn from (Order (v) : Order) -> Self { Self :: IconUrl (v) } } pub struct Set (pub Option < String >) ; impl From < Set > for SetParam { fn from (Set (v) : Set) -> Self { Self :: IconUrl (_prisma :: write_params :: StringNullableParam :: Set (v)) } } pub fn set < T : From < Set >> (value : Option < String >) -> T { Set (value) . into () } pub struct UpdateOperation (pub _prisma :: write_params :: StringNullableParam) ; impl From < UpdateOperation > for SetParam { fn from (UpdateOperation (v) : UpdateOperation) -> Self { Self :: IconUrl (v) } } impl From < Set > for UncheckedSetParam { fn from (Set (v) : Set) -> Self { Self :: IconUrl (_prisma :: write_params :: StringNullableParam :: Set (v)) } } impl From < UpdateOperation > for UncheckedSetParam { fn from (UpdateOperation (v) : UpdateOperation) -> Self { Self :: IconUrl (v) } } pub struct Select ; impl Into < super :: SelectParam > for Select { fn into (self) -> super :: SelectParam { super :: SelectParam :: IconUrl (self) } } impl Into < :: prisma_client_rust :: Selection > for Select { fn into (self) -> :: prisma_client_rust :: Selection { :: prisma_client_rust :: sel (NAME) } } pub struct Include ; impl Into < super :: IncludeParam > for Include { fn into (self) -> super :: IncludeParam { super :: IncludeParam :: IconUrl (self) } } impl Into < :: prisma_client_rust :: Selection > for Include { fn into (self) -> :: prisma_client_rust :: Selection { :: prisma_client_rust :: sel (NAME) } } } pub mod id { use super :: super :: { _prisma :: * , * } ; use super :: { WhereParam , UniqueWhereParam , WithParam , SetParam , UncheckedSetParam } ; pub const NAME : & str = "id" ; pub type Type = Int ; pub type RecursiveSafeType = Type ; pub struct Equals (pub Int) ; pub fn equals < T : From < Equals >> (value : Int) -> T { Equals (value) . into () } impl From < Equals > for UniqueWhereParam { fn from (Equals (v) : Equals) -> Self { UniqueWhereParam :: IdEquals (v) } } impl From < Equals > for WhereParam { fn from (Equals (v) : Equals) -> Self { WhereParam :: Id (_prisma :: read_filters :: IntFilter :: Equals (v)) } } :: prisma_client_rust :: scalar_where_param_fns ! (_prisma :: read_filters :: IntFilter , Id , { fn in_vec (_ : Vec < Int >) -> InVec ; fn not_in_vec (_ : Vec < Int >) -> NotInVec ; fn lt (_ : Int) -> Lt ; fn lte (_ : Int) -> Lte ; fn gt (_ : Int) -> Gt ; fn gte (_ : Int) -> Gte ; fn not (_ : Int) -> Not ; }) ; pub struct Order (SortOrder) ; pub fn order < T : From < Order >> (v : SortOrder) -> T { Order (v) . into () } impl From < Order > for super :: OrderByWithRelationParam { fn from (Order (v) : Order) -> Self { Self :: Id (v) } } pub struct Set (pub Int) ; impl From < Set > for SetParam { fn from (Set (v) : Set) -> Self { Self :: Id (_prisma :: write_params :: IntParam :: Set (v)) } } pub fn set < T : From < Set >> (value : Int) -> T { Set (value) . into () } pub struct UpdateOperation (pub _prisma :: write_params :: IntParam) ; impl From < UpdateOperation > for SetParam { fn from (UpdateOperation (v) : UpdateOperation) -> Self { Self :: Id (v) } } pub fn increment < T : From < UpdateOperation >> (value : Int) -> T { UpdateOperation (_prisma :: write_params :: IntParam :: Increment (value)) . into () } pub fn decrement < T : From < UpdateOperation >> (value : Int) -> T { UpdateOperation (_prisma :: write_params :: IntParam :: Decrement (value)) . into () } pub fn multiply < T : From < UpdateOperation >> (value : Int) -> T { UpdateOperation (_prisma :: write_params :: IntParam :: Multiply (value)) . into () } pub fn divide < T : From < UpdateOperation >> (value : Int) -> T { UpdateOperation (_prisma :: write_params :: IntParam :: Divide (value)) . into () } impl From < Set > for UncheckedSetParam { fn from (Set (v) : Set) -> Self { Self :: Id (_prisma :: write_params :: IntParam :: Set (v)) } } impl From < UpdateOperation > for UncheckedSetParam { fn from (UpdateOperation (v) : UpdateOperation) -> Self { Self :: Id (v) } } pub struct Select ; impl Into < super :: SelectParam > for Select { fn into (self) -> super :: SelectParam { super :: SelectParam :: Id (self) } } impl Into < :: prisma_client_rust :: Selection > for Select { fn into (self) -> :: prisma_client_rust :: Selection { :: prisma_client_rust :: sel (NAME) } } pub struct Include ; impl Into < super :: IncludeParam > for Include { fn into (self) -> super :: IncludeParam { super :: IncludeParam :: Id (self) } } impl Into < :: prisma_client_rust :: Selection > for Include { fn into (self) -> :: prisma_client_rust :: Selection { :: prisma_client_rust :: sel (NAME) } } } pub mod instance_id { use super :: super :: { _prisma :: * , * } ; use super :: { WhereParam , UniqueWhereParam , WithParam , SetParam , UncheckedSetParam } ; pub const NAME : & str = "instanceId" ; pub type Type = Int ; pub type RecursiveSafeType = Type ; pub struct Equals (pub Int) ; pub fn equals < T : From < Equals >> (value : Int) -> T { Equals (value) . into () } impl From < Equals > for WhereParam { fn from (Equals (v) : Equals) -> Self { WhereParam :: InstanceId (_prisma :: read_filters :: IntFilter :: Equals (v)) } } :: prisma_client_rust :: scalar_where_param_fns ! (_prisma :: read_filters :: IntFilter , InstanceId , { fn in_vec (_ : Vec < Int >) -> InVec ; fn not_in_vec (_ : Vec < Int >) -> NotInVec ; fn lt (_ : Int) -> Lt ; fn lte (_ : Int) -> Lte ; fn gt (_ : Int) -> Gt ; fn gte (_ : Int) -> Gte ; fn not (_ : Int) -> Not ; }) ; pub struct Order (SortOrder) ; pub fn order < T : From < Order >> (v : SortOrder) -> T { Order (v) . into () } impl From < Order > for super :: OrderByWithRelationParam { fn from (Order (v) : Order) -> Self { Self :: InstanceId (v) } } pub struct Set (pub Int) ; impl From < Set > for SetParam { fn from (Set (v) : Set) -> Self { Self :: InstanceId (_prisma :: write_params :: IntParam :: Set (v)) } } pub fn set < T : From < Set >> (value : Int) -> T { Set (value) . into () } pub struct UpdateOperation (pub _prisma :: write_params :: IntParam) ; impl From < UpdateOperation > for SetParam { fn from (UpdateOperation (v) : UpdateOperation) -> Self { Self :: InstanceId (v) } } pub fn increment < T : From < UpdateOperation >> (value : Int) -> T { UpdateOperation (_prisma :: write_params :: IntParam :: Increment (value)) . into () } pub fn decrement < T : From < UpdateOperation >> (value : Int) -> T { UpdateOperation (_prisma :: write_params :: IntParam :: Decrement (value)) . into () } pub fn multiply < T : From < UpdateOperation >> (value : Int) -> T { UpdateOperation (_prisma :: write_params :: IntParam :: Multiply (value)) . into () } pub fn divide < T : From < UpdateOperation >> (value : Int) -> T { UpdateOperation (_prisma :: write_params :: IntParam :: Divide (value)) . into () } impl From < Set > for UncheckedSetParam { fn from (Set (v) : Set) -> Self { Self :: InstanceId (_prisma :: write_params :: IntParam :: Set (v)) } } impl From < UpdateOperation > for UncheckedSetParam { fn from (UpdateOperation (v) : UpdateOperation) -> Self { Self :: InstanceId (v) } } pub struct Select ; impl Into < super :: SelectParam > for Select { fn into (self) -> super :: SelectParam { super :: SelectParam :: InstanceId (self) } } impl Into < :: prisma_client_rust :: Selection > for Select { fn into (self) -> :: prisma_client_rust :: Selection { :: prisma_client_rust :: sel (NAME) } } pub struct Include ; impl Into < super :: IncludeParam > for Include { fn into (self) -> super :: IncludeParam { super :: IncludeParam :: InstanceId (self) } } impl Into < :: prisma_client_rust :: Selection > for Include { fn into (self) -> :: prisma_client_rust :: Selection { :: prisma_client_rust :: sel (NAME) } } } pub mod project_desc { use super :: super :: { _prisma :: * , * } ; use super :: { WhereParam , UniqueWhereParam , WithParam , SetParam , UncheckedSetParam } ; pub const NAME : & str = "projectDesc" ; pub type Type = Option < String > ; pub type RecursiveSafeType = Type ; pub struct Equals (pub Option < String >) ; pub fn equals < T : From < Equals >> (value : Option < String >) -> T { Equals (value) . into () } impl From < Equals > for WhereParam { fn from (Equals (v) : Equals) -> Self { WhereParam :: ProjectDesc (_prisma :: read_filters :: StringNullableFilter :: Equals (v)) } } :: prisma_client_rust :: scalar_where_param_fns ! (_prisma :: read_filters :: StringNullableFilter , ProjectDesc , { fn in_vec (_ : Vec < String >) -> InVec ; fn not_in_vec (_ : Vec < String >) -> NotInVec ; fn lt (_ : String) -> Lt ; fn lte (_ : String) -> Lte ; fn gt (_ : String) -> Gt ; fn gte (_ : String) -> Gte ; fn contains (_ : String) -> Contains ; fn starts_with (_ : String) -> StartsWith ; fn ends_with (_ : String) -> EndsWith ; fn not (_ : Option < String >) -> Not ; }) ; pub struct Order (SortOrder) ; pub fn order < T : From < Order >> (v : SortOrder) -> T { Order (v) . into () } impl From < Order > for super :: OrderByWithRelationParam { fn from (Order (v) : Order) -> Self { Self :: ProjectDesc (v) } } pub struct Set (pub Option < String >) ; impl From < Set > for SetParam { fn from (Set (v) : Set) -> Self { Self :: ProjectDesc (_prisma :: write_params :: StringNullableParam :: Set (v)) } } pub fn set < T : From < Set >> (value : Option < String >) -> T { Set (value) . into () } pub struct UpdateOperation (pub _prisma :: write_params :: StringNullableParam) ; impl From < UpdateOperation > for SetParam { fn from (UpdateOperation (v) : UpdateOperation) -> Self { Self :: ProjectDesc (v) } } impl From < Set > for UncheckedSetParam { fn from (Set (v) : Set) -> Self { Self :: ProjectDesc (_prisma :: write_params :: StringNullableParam :: Set (v)) } } impl From < UpdateOperation > for UncheckedSetParam { fn from (UpdateOperation (v) : UpdateOperation) -> Self { Self :: ProjectDesc (v) } } pub struct Select ; impl Into < super :: SelectParam > for Select { fn into (self) -> super :: SelectParam { super :: SelectParam :: ProjectDesc (self) } } impl Into < :: prisma_client_rust :: Selection > for Select { fn into (self) -> :: prisma_client_rust :: Selection { :: prisma_client_rust :: sel (NAME) } } pub struct Include ; impl Into < super :: IncludeParam > for Include { fn into (self) -> super :: IncludeParam { super :: IncludeParam :: ProjectDesc (self) } } impl Into < :: prisma_client_rust :: Selection > for Include { fn into (self) -> :: prisma_client_rust :: Selection { :: prisma_client_rust :: sel (NAME) } } } pub mod project_id { use super :: super :: { _prisma :: * , * } ; use super :: { WhereParam , UniqueWhereParam , WithParam , SetParam , UncheckedSetParam } ; pub const NAME : & str = "projectId" ; pub type Type = String ; pub type RecursiveSafeType = Type ; pub struct Equals (pub String) ; pub fn equals < T : From < Equals >> (value : String) -> T { Equals (value) . into () } impl From < Equals > for UniqueWhereParam { fn from (Equals (v) : Equals) -> Self { UniqueWhereParam :: ProjectIdEquals (v) } } impl From < Equals > for WhereParam { fn from (Equals (v) : Equals) -> Self { WhereParam :: ProjectId (_prisma :: read_filters :: StringFilter :: Equals (v)) } } :: prisma_client_rust :: scalar_where_param_fns ! (_prisma :: read_filters :: StringFilter , ProjectId , { fn in_vec (_ : Vec < String >) -> InVec ; fn not_in_vec (_ : Vec < String >) -> NotInVec ; fn lt (_ : String) -> Lt ; fn lte (_ : String) -> Lte ; fn gt (_ : String) -> Gt ; fn gte (_ : String) -> Gte ; fn contains (_ : String) -> Contains ; fn starts_with (_ : String) -> StartsWith ; fn ends_with (_ : String) -> EndsWith ; fn not (_ : String) -> Not ; }) ; pub struct Order (SortOrder) ; pub fn order < T : From < Order >> (v : SortOrder) -> T { Order (v) . into () } impl From < Order > for super :: OrderByWithRelationParam { fn from (Order (v) : Order) -> Self { Self :: ProjectId (v) } } pub struct Set (pub String) ; impl From < Set > for SetParam { fn from (Set (v) : Set) -> Self { Self :: ProjectId (_prisma :: write_params :: StringParam :: Set (v)) } } pub fn set < T : From < Set >> (value : String) -> T { Set (value) . into () } pub struct UpdateOperation (pub _prisma :: write_params :: StringParam) ; impl From < UpdateOperation > for SetParam { fn from (UpdateOperation (v) : UpdateOperation) -> Self { Self :: ProjectId (v) } } impl From < Set > for UncheckedSetParam { fn from (Set (v) : Set) -> Self { Self :: ProjectId (_prisma :: write_params :: StringParam :: Set (v)) } } impl From < UpdateOperation > for UncheckedSetParam { fn from (UpdateOperation (v) : UpdateOperation) -> Self { Self :: ProjectId (v) } } pub struct Select ; impl Into < super :: SelectParam > for Select { fn into (self) -> super :: SelectParam { super :: SelectParam :: ProjectId (self) } } impl Into < :: prisma_client_rust :: Selection > for Select { fn into (self) -> :: prisma_client_rust :: Selection { :: prisma_client_rust :: sel (NAME) } } pub struct Include ; impl Into < super :: IncludeParam > for Include { fn into (self) -> super :: IncludeParam { super :: IncludeParam :: ProjectId (self) } } impl Into < :: prisma_client_rust :: Selection > for Include { fn into (self) -> :: prisma_client_rust :: Selection { :: prisma_client_rust :: sel (NAME) } } } pub mod project_name { use super :: super :: { _prisma :: * , * } ; use super :: { WhereParam , UniqueWhereParam , WithParam , SetParam , UncheckedSetParam } ; pub const NAME : & str = "projectName" ; pub type Type = String ; pub type RecursiveSafeType = Type ; pub struct Equals (pub String) ; pub fn equals < T : From < Equals >> (value : String) -> T { Equals (value) . into () } impl From < Equals > for WhereParam { fn from (Equals (v) : Equals) -> Self { WhereParam :: ProjectName (_prisma :: read_filters :: StringFilter :: Equals (v)) } } :: prisma_client_rust :: scalar_where_param_fns ! (_prisma :: read_filters :: StringFilter , ProjectName , { fn in_vec (_ : Vec < String >) -> InVec ; fn not_in_vec (_ : Vec < String >) -> NotInVec ; fn lt (_ : String) -> Lt ; fn lte (_ : String) -> Lte ; fn gt (_ : String) -> Gt ; fn gte (_ : String) -> Gte ; fn contains (_ : String) -> Contains ; fn starts_with (_ : String) -> StartsWith ; fn ends_with (_ : String) -> EndsWith ; fn not (_ : String) -> Not ; }) ; pub struct Order (SortOrder) ; pub fn order < T : From < Order >> (v : SortOrder) -> T { Order (v) . into () } impl From < Order > for super :: OrderByWithRelationParam { fn from (Order (v) : Order) -> Self { Self :: ProjectName (v) } } pub struct Set (pub String) ; impl From < Set > for SetParam { fn from (Set (v) : Set) -> Self { Self :: ProjectName (_prisma :: write_params :: StringParam :: Set (v)) } } pub fn set < T : From < Set >> (value : String) -> T { Set (value) . into () } pub struct UpdateOperation (pub _prisma :: write_params :: StringParam) ; impl From < UpdateOperation > for SetParam { fn from (UpdateOperation (v) : UpdateOperation) -> Self { Self :: ProjectName (v) } } impl From < Set > for UncheckedSetParam { fn from (Set (v) : Set) -> Self { Self :: ProjectName (_prisma :: write_params :: StringParam :: Set (v)) } } impl From < UpdateOperation > for UncheckedSetParam { fn from (UpdateOperation (v) : UpdateOperation) -> Self { Self :: ProjectName (v) } } pub struct Select ; impl Into < super :: SelectParam > for Select { fn into (self) -> super :: SelectParam { super :: SelectParam :: ProjectName (self) } } impl Into < :: prisma_client_rust :: Selection > for Select { fn into (self) -> :: prisma_client_rust :: Selection { :: prisma_client_rust :: sel (NAME) } } pub struct Include ; impl Into < super :: IncludeParam > for Include { fn into (self) -> super :: IncludeParam { super :: IncludeParam :: ProjectName (self) } } impl Into < :: prisma_client_rust :: Selection > for Include { fn into (self) -> :: prisma_client_rust :: Selection { :: prisma_client_rust :: sel (NAME) } } } pub mod project_version { use super :: super :: { _prisma :: * , * } ; use super :: { WhereParam , UniqueWhereParam , WithParam , SetParam , UncheckedSetParam } ; pub const NAME : & str = "projectVersion" ; pub type Type = Option < String > ; pub type RecursiveSafeType = Type ; pub struct Equals (pub Option < String >) ; pub fn equals < T : From < Equals >> (value : Option < String >) -> T { Equals (value) . into () } impl From < Equals > for WhereParam { fn from (Equals (v) : Equals) -> Self { WhereParam :: ProjectVersion (_prisma :: read_filters :: StringNullableFilter :: Equals (v)) } } :: prisma_client_rust :: scalar_where_param_fns ! (_prisma :: read_filters :: StringNullableFilter , ProjectVersion , { fn in_vec (_ : Vec < String >) -> InVec ; fn not_in_vec (_ : Vec < String >) -> NotInVec ; fn lt (_ : String) -> Lt ; fn lte (_ : String) -> Lte ; fn gt (_ : String) -> Gt ; fn gte (_ : String) -> Gte ; fn contains (_ : String) -> Contains ; fn starts_with (_ : String) -> StartsWith ; fn ends_with (_ : String) -> EndsWith ; fn not (_ : Option < String >) -> Not ; }) ; pub struct Order (SortOrder) ; pub fn order < T : From < Order >> (v : SortOrder) -> T { Order (v) . into () } impl From < Order > for super :: OrderByWithRelationParam { fn from (Order (v) : Order) -> Self { Self :: ProjectVersion (v) } } pub struct Set (pub Option < String >) ; impl From < Set > for SetParam { fn from (Set (v) : Set) -> Self { Self :: ProjectVersion (_prisma :: write_params :: StringNullableParam :: Set (v)) } } pub fn set < T : From < Set >> (value : Option < String >) -> T { Set (value) . into () } pub struct UpdateOperation (pub _prisma :: write_params :: StringNullableParam) ; impl From < UpdateOperation > for SetParam { fn from (UpdateOperation (v) : UpdateOperation) -> Self { Self :: ProjectVersion (v) } } impl From < Set > for UncheckedSetParam { fn from (Set (v) : Set) -> Self { Self :: ProjectVersion (_prisma :: write_params :: StringNullableParam :: Set (v)) } } impl From < UpdateOperation > for UncheckedSetParam { fn from (UpdateOperation (v) : UpdateOperation) -> Self { Self :: ProjectVersion (v) } } pub struct Select ; impl Into < super :: SelectParam > for Select { fn into (self) -> super :: SelectParam { super :: SelectParam :: ProjectVersion (self) } } impl Into < :: prisma_client_rust :: Selection > for Select { fn into (self) -> :: prisma_client_rust :: Selection { :: prisma_client_rust :: sel (NAME) } } pub struct Include ; impl Into < super :: IncludeParam > for Include { fn into (self) -> super :: IncludeParam { super :: IncludeParam :: ProjectVersion (self) } } impl Into < :: prisma_client_rust :: Selection > for Include { fn into (self) -> :: prisma_client_rust :: Selection { :: prisma_client_rust :: sel (NAME) } } } pub mod source { use super :: super :: { _prisma :: * , * } ; use super :: { WhereParam , UniqueWhereParam , WithParam , SetParam , UncheckedSetParam } ; pub const NAME : & str = "source" ; pub type Type = String ; pub type RecursiveSafeType = Type ; pub struct Equals (pub String) ; pub fn equals < T : From < Equals >> (value : String) -> T { Equals (value) . into () } impl From < Equals > for WhereParam { fn from (Equals (v) : Equals) -> Self { WhereParam :: Source (_prisma :: read_filters :: StringFilter :: Equals (v)) } } :: prisma_client_rust :: scalar_where_param_fns ! (_prisma :: read_filters :: StringFilter , Source , { fn in_vec (_ : Vec < String >) -> InVec ; fn not_in_vec (_ : Vec < String >) -> NotInVec ; fn lt (_ : String) -> Lt ; fn lte (_ : String) -> Lte ; fn gt (_ : String) -> Gt ; fn gte (_ : String) -> Gte ; fn contains (_ : String) -> Contains ; fn starts_with (_ : String) -> StartsWith ; fn ends_with (_ : String) -> EndsWith ; fn not (_ : String) -> Not ; }) ; pub struct Order (SortOrder) ; pub fn order < T : From < Order >> (v : SortOrder) -> T { Order (v) . into () } impl From < Order > for super :: OrderByWithRelationParam { fn from (Order (v) : Order) -> Self { Self :: Source (v) } } pub struct Set (pub String) ; impl From < Set > for SetParam { fn from (Set (v) : Set) -> Self { Self :: Source (_prisma :: write_params :: StringParam :: Set (v)) } } pub fn set < T : From < Set >> (value : String) -> T { Set (value) . into () } pub struct UpdateOperation (pub _prisma :: write_params :: StringParam) ; impl From < UpdateOperation > for SetParam { fn from (UpdateOperation (v) : UpdateOperation) -> Self { Self :: Source (v) } } impl From < Set > for UncheckedSetParam { fn from (Set (v) : Set) -> Self { Self :: Source (_prisma :: write_params :: StringParam :: Set (v)) } } impl From < UpdateOperation > for UncheckedSetParam { fn from (UpdateOperation (v) : UpdateOperation) -> Self { Self :: Source (v) } } pub struct Select ; impl Into < super :: SelectParam > for Select { fn into (self) -> super :: SelectParam { super :: SelectParam :: Source (self) } } impl Into < :: prisma_client_rust :: Selection > for Select { fn into (self) -> :: prisma_client_rust :: Selection { :: prisma_client_rust :: sel (NAME) } } pub struct Include ; impl Into < super :: IncludeParam > for Include { fn into (self) -> super :: IncludeParam { super :: IncludeParam :: Source (self) } } impl Into < :: prisma_client_rust :: Selection > for Include { fn into (self) -> :: prisma_client_rust :: Selection { :: prisma_client_rust :: sel (NAME) } } } pub mod updated { use super :: super :: { _prisma :: * , * } ; use super :: { WhereParam , UniqueWhereParam , WithParam , SetParam , UncheckedSetParam } ; pub const NAME : & str = "updated" ; pub type Type = DateTime ; pub type RecursiveSafeType = Type ; pub struct Equals (pub DateTime) ; pub fn equals < T : From < Equals >> (value : DateTime) -> T { Equals (value) . into () } impl From < Equals > for WhereParam { fn from (Equals (v) : Equals) -> Self { WhereParam :: Updated (_prisma :: read_filters :: DateTimeFilter :: Equals (v)) } } :: prisma_client_rust :: scalar_where_param_fns ! (_prisma :: read_filters :: DateTimeFilter , Updated , { fn in_vec (_ : Vec < DateTime >) -> InVec ; fn not_in_vec (_ : Vec < DateTime >) -> NotInVec ; fn lt (_ : DateTime) -> Lt ; fn lte (_ : DateTime) -> Lte ; fn gt (_ : DateTime) -> Gt ; fn gte (_ : DateTime) -> Gte ; fn not (_ : DateTime) -> Not ; }) ; pub struct Order (SortOrder) ; pub fn order < T : From < Order >> (v : SortOrder) -> T { Order (v) . into () } impl From < Order > for super :: OrderByWithRelationParam { fn from (Order (v) : Order) -> Self { Self :: Updated (v) } } pub struct Set (pub DateTime) ; impl From < Set > for SetParam { fn from (Set (v) : Set) -> Self { Self :: Updated (_prisma :: write_params :: DateTimeParam :: Set (v)) } } pub fn set < T : From < Set >> (value : DateTime) -> T { Set (value) . into () } pub struct UpdateOperation (pub _prisma :: write_params :: DateTimeParam) ; impl From < UpdateOperation > for SetParam { fn from (UpdateOperation (v) : UpdateOperation) -> Self { Self :: Updated (v) } } impl From < Set > for UncheckedSetParam { fn from (Set (v) : Set) -> Self { Self :: Updated (_prisma :: write_params :: DateTimeParam :: Set (v)) } } impl From < UpdateOperation > for UncheckedSetParam { fn from (UpdateOperation (v) : UpdateOperation) -> Self { Self :: Updated (v) } } pub struct Select ; impl Into < super :: SelectParam > for Select { fn into (self) -> super :: SelectParam { super :: SelectParam :: Updated (self) } } impl Into < :: prisma_client_rust :: Selection > for Select { fn into (self) -> :: prisma_client_rust :: Selection { :: prisma_client_rust :: sel (NAME) } } pub struct Include ; impl Into < super :: IncludeParam > for Include { fn into (self) -> super :: IncludeParam { super :: IncludeParam :: Updated (self) } } impl Into < :: prisma_client_rust :: Selection > for Include { fn into (self) -> :: prisma_client_rust :: Selection { :: prisma_client_rust :: sel (NAME) } } } } \ No newline at end of file diff --git a/crates/init/src/lib.rs b/crates/init/src/lib.rs index aeba864..acfc97d 100644 --- a/crates/init/src/lib.rs +++ b/crates/init/src/lib.rs @@ -12,6 +12,8 @@ pub async fn boot() -> Result<()> { INIT = true; } + data::get_or_init_client().await?; + tokio::spawn(async move { MsaState::init().await.unwrap(); }) diff --git a/crates/rpc-rs-macros/Cargo.toml b/crates/rpc-rs-macros/Cargo.toml index b94f6fb..28465fa 100644 --- a/crates/rpc-rs-macros/Cargo.toml +++ b/crates/rpc-rs-macros/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rpc-rs-macros" -version.workspace = true +version = "0.3.0" edition.workspace = true license.workspace = true repository.workspace = true diff --git a/crates/rpc-rs-macros/src/lib.rs b/crates/rpc-rs-macros/src/lib.rs index a95f1a0..64b5453 100644 --- a/crates/rpc-rs-macros/src/lib.rs +++ b/crates/rpc-rs-macros/src/lib.rs @@ -5,15 +5,25 @@ use std::str::FromStr; use proc_macro::TokenStream; use proc_macro2::TokenStream as TTokenStream; use quote::{quote, ToTokens}; +use syn::{parse_macro_input, ItemStruct}; #[proc_macro_derive(Event)] -pub fn derive_event(input: TokenStream) -> TokenStream { - let input = TTokenStream::from(input); +pub fn derive_event(raw_input: TokenStream) -> TokenStream { + let input = TTokenStream::from(raw_input.clone()); let hash = TTokenStream::from_str("#").unwrap(); + let struct_ = parse_macro_input!(raw_input as ItemStruct); + let name = struct_.ident; + let name_str = format!("\"{}\"", name); quote! { #hash [derive(serde::Serialize, serde::Deserialize)] #input + + impl rpc_rc::Event for #name { + fn name() -> &'static str { + #name_str + } + } } .to_token_stream() .into() diff --git a/crates/rpc-rs/Cargo.toml b/crates/rpc-rs/Cargo.toml index e20db5d..defeda8 100644 --- a/crates/rpc-rs/Cargo.toml +++ b/crates/rpc-rs/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rpc-rs" -version = "0.2.0" +version = "0.3.0" edition.workspace = true license.workspace = true repository.workspace = true diff --git a/crates/rpc-rs/src/events/mod.rs b/crates/rpc-rs/src/events/mod.rs index 5fb1b2e..af59c94 100644 --- a/crates/rpc-rs/src/events/mod.rs +++ b/crates/rpc-rs/src/events/mod.rs @@ -5,7 +5,10 @@ use serde_json::Value; use tokio::sync::mpsc::{unbounded_channel, UnboundedReceiver, UnboundedSender}; /// An event. -pub trait Event: Serialize + DeserializeOwned {} +pub trait Event: Serialize + DeserializeOwned { + /// Get the name of this event. + fn name() -> &'static str; +} /// Create an event "bus" for sending/receiving [`Event`]s. pub fn create_event_bus() -> (UnboundedSender, UnboundedReceiver) { diff --git a/crates/rpc-rs/src/filtered.rs b/crates/rpc-rs/src/filtered.rs index 3dbda21..ca569b0 100644 --- a/crates/rpc-rs/src/filtered.rs +++ b/crates/rpc-rs/src/filtered.rs @@ -19,15 +19,15 @@ macro_rules! prisma_multi_module_filtered { primary_key: $pkey: ident, filter: $filter: ident = $filter_ty: ident, } => { - Module::builder() - .read(wrap(|cx: Arc<$client>, filt: $filter_ty| async move { + $crate::module::Module::builder() + .read($crate::proc::wrap(|cx: Arc<$client>, filt: $filter_ty| async move { cx.$cont() .find_many(vec![$module::$filter::equals(filt)]) .exec() .await .unwrap_or_default() })) - .create(wrap( + .create($crate::proc::wrap( |cx: Arc<$client>, m: Vec<$module::CreateUnchecked>| async move { cx.$cont() .create_many(m) @@ -36,7 +36,7 @@ macro_rules! prisma_multi_module_filtered { .map_err(|v| v.to_string()) }, )) - .delete(wrap(|cx: Arc<$client>, ids: Vec| async move { + .delete($crate::proc::wrap(|cx: Arc<$client>, ids: Vec| async move { cx.$cont() .delete_many(ids.iter().map(|v| $module::$pkey::equals(v.clone())).collect()) .exec() diff --git a/crates/rpc-rs/src/macros.rs b/crates/rpc-rs/src/macros.rs index 4e7b21c..19bde2e 100644 --- a/crates/rpc-rs/src/macros.rs +++ b/crates/rpc-rs/src/macros.rs @@ -17,15 +17,15 @@ macro_rules! prisma_single_module { container: $cont: ident, primary_key: $pkey: ident, } => { - Module::builder() - .read(wrap(|cx: Arc<$client>, item_id: i32| async move { + $crate::module::Module::builder() + .read($crate::proc::wrap(|cx: Arc<$client>, item_id: i32| async move { cx.$cont() .find_first(vec![$module::$pkey::equals(item_id)]) .exec() .await .unwrap_or_default() })) - .create(wrap( + .create($crate::proc::wrap( |cx: Arc<$client>, item: $module::CreateUnchecked| async move { cx.$cont() .create_many(vec![item]) @@ -34,7 +34,7 @@ macro_rules! prisma_single_module { .map_err(|v| v.to_string()) }, )) - .update(wrap( + .update($crate::proc::wrap( |cx: Arc<$client>, update: $module::Update| async move { cx.$cont() .update($module::$pkey::equals(update.id), update.as_params()) @@ -43,7 +43,7 @@ macro_rules! prisma_single_module { .map_err(|v| v.to_string()) }, )) - .delete(wrap( + .delete($crate::proc::wrap( |cx: Arc<$client>, item_id: i32| async move { cx.$cont() .delete($module::$pkey::equals(item_id)) @@ -74,15 +74,15 @@ macro_rules! prisma_multi_module { container: $cont: ident, primary_key: $pkey: ident, } => { - Module::builder() - .read(wrap(|cx: Arc<$client>, _: ()| async move { + $crate::module::Module::builder() + .read($crate::proc::wrap(|cx: Arc<$client>, _: ()| async move { cx.$cont() .find_many(vec![]) .exec() .await .unwrap_or_default() })) - .create(wrap( + .create($crate::proc::wrap( |cx: Arc<$client>, m: Vec<$module::CreateUnchecked>| async move { cx.$cont() .create_many(m) @@ -91,7 +91,7 @@ macro_rules! prisma_multi_module { .map_err(|v| v.to_string()) }, )) - .delete(wrap(|cx: Arc<$client>, ids: Vec| async move { + .delete($crate::proc::wrap(|cx: Arc<$client>, ids: Vec| async move { cx.$cont() .delete_many(ids.iter().map(|v| $module::$pkey::equals(v.clone())).collect()) .exec() diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 3bf8337..803b507 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -24,6 +24,7 @@ model InstalledMod { fileSize Int updated DateTime @updatedAt iconUrl String? + instanceId Int source String // The source that this mod comes from projectId String @unique // This is the project ID in the mod's source projectName String diff --git a/src/api/bindings/app.ts b/src/api/bindings/app.ts index ae2072c..a681fad 100644 --- a/src/api/bindings/app.ts +++ b/src/api/bindings/app.ts @@ -133,86 +133,14 @@ export const unwrap = (res: Result | Option): T => { }; -export async function __rpc_call_latestLoader_Delete(data: null = null): Promise { -return await __rpc_call("/rpc", "Delete", "latestLoader", data); -} - -export async function __rpc_call_latestLoader_Create(data: null = null): Promise { -return await __rpc_call("/rpc", "Create", "latestLoader", data); -} - -export async function __rpc_call_latestLoader_Read(data: ModLoaderType): Promise> { -return await __rpc_call("/rpc", "Read", "latestLoader", data); -} - -export async function __rpc_call_latestLoader_Update(data: null = null): Promise { -return await __rpc_call("/rpc", "Update", "latestLoader", data); -} - -const __rpc_module_latestLoader = { - create: __rpc_call_latestLoader_Create, - read: __rpc_call_latestLoader_Read, - update: __rpc_call_latestLoader_Update, - delete: __rpc_call_latestLoader_Delete, -}; - - -export async function __rpc_call_instance_Read(data: number): Promise> { -return await __rpc_call("/rpc", "Read", "instance", data); -} - -export async function __rpc_call_instance_Create(data: InstanceCreation): Promise> { -return await __rpc_call("/rpc", "Create", "instance", data); -} - -export async function __rpc_call_instance_Update(data: InstanceUpdate): Promise> { -return await __rpc_call("/rpc", "Update", "instance", data); -} - -export async function __rpc_call_instance_Delete(data: number): Promise> { -return await __rpc_call("/rpc", "Delete", "instance", data); -} - -const __rpc_module_instance = { - create: __rpc_call_instance_Create, - read: __rpc_call_instance_Read, - update: __rpc_call_instance_Update, - delete: __rpc_call_instance_Delete, -}; - - -export async function __rpc_call_dirs_Delete(data: null = null): Promise { -return await __rpc_call("/rpc", "Delete", "dirs", data); -} - -export async function __rpc_call_dirs_Create(data: null = null): Promise { -return await __rpc_call("/rpc", "Create", "dirs", data); -} - -export async function __rpc_call_dirs_Read(data: string): Promise { -return await __rpc_call("/rpc", "Read", "dirs", data); -} - -export async function __rpc_call_dirs_Update(data: null = null): Promise { -return await __rpc_call("/rpc", "Update", "dirs", data); +export async function __rpc_call_instances_Read(data: null = null): Promise { +return await __rpc_call("/rpc", "Read", "instances", data); } -const __rpc_module_dirs = { - create: __rpc_call_dirs_Create, - read: __rpc_call_dirs_Read, - update: __rpc_call_dirs_Update, - delete: __rpc_call_dirs_Delete, -}; - - export async function __rpc_call_instances_Create(data: InstanceCreation[]): Promise> { return await __rpc_call("/rpc", "Create", "instances", data); } -export async function __rpc_call_instances_Read(data: number): Promise { -return await __rpc_call("/rpc", "Read", "instances", data); -} - export async function __rpc_call_instances_Update(data: null = null): Promise { return await __rpc_call("/rpc", "Update", "instances", data); } @@ -229,67 +157,19 @@ const __rpc_module_instances = { }; -export async function __rpc_call_source_Update(data: SourceUpdate): Promise> { -return await __rpc_call("/rpc", "Update", "source", data); -} - -export async function __rpc_call_source_Create(data: SourceCreation): Promise> { -return await __rpc_call("/rpc", "Create", "source", data); -} - -export async function __rpc_call_source_Read(data: number): Promise> { -return await __rpc_call("/rpc", "Read", "source", data); -} - -export async function __rpc_call_source_Delete(data: number): Promise> { -return await __rpc_call("/rpc", "Delete", "source", data); -} - -const __rpc_module_source = { - create: __rpc_call_source_Create, - read: __rpc_call_source_Read, - update: __rpc_call_source_Update, - delete: __rpc_call_source_Delete, -}; - - -export async function __rpc_call_loaders_Delete(data: null = null): Promise { -return await __rpc_call("/rpc", "Delete", "loaders", data); -} - -export async function __rpc_call_loaders_Read(data: ModLoaderType): Promise> { -return await __rpc_call("/rpc", "Read", "loaders", data); -} - -export async function __rpc_call_loaders_Create(data: null = null): Promise { -return await __rpc_call("/rpc", "Create", "loaders", data); -} - -export async function __rpc_call_loaders_Update(data: null = null): Promise { -return await __rpc_call("/rpc", "Update", "loaders", data); -} - -const __rpc_module_loaders = { - create: __rpc_call_loaders_Create, - read: __rpc_call_loaders_Read, - update: __rpc_call_loaders_Update, - delete: __rpc_call_loaders_Delete, -}; - - -export async function __rpc_call_mod_Delete(data: number): Promise> { +export async function __rpc_call_mod_Delete(data: number): Promise> { return await __rpc_call("/rpc", "Delete", "mod", data); } -export async function __rpc_call_mod_Read(data: number): Promise> { -return await __rpc_call("/rpc", "Read", "mod", data); +export async function __rpc_call_mod_Update(data: InstalledModUpdate): Promise> { +return await __rpc_call("/rpc", "Update", "mod", data); } -export async function __rpc_call_mod_Update(data: ModUpdate): Promise> { -return await __rpc_call("/rpc", "Update", "mod", data); +export async function __rpc_call_mod_Read(data: number): Promise> { +return await __rpc_call("/rpc", "Read", "mod", data); } -export async function __rpc_call_mod_Create(data: ModCreation): Promise> { +export async function __rpc_call_mod_Create(data: InstalledModCreation): Promise> { return await __rpc_call("/rpc", "Create", "mod", data); } @@ -301,39 +181,39 @@ const __rpc_module_mod = { }; -export async function __rpc_call_games_Delete(data: number[]): Promise> { -return await __rpc_call("/rpc", "Delete", "games", data); +export async function __rpc_call_instance_Create(data: InstanceCreation): Promise> { +return await __rpc_call("/rpc", "Create", "instance", data); } -export async function __rpc_call_games_Create(data: GameCreation[]): Promise> { -return await __rpc_call("/rpc", "Create", "games", data); +export async function __rpc_call_instance_Read(data: number): Promise> { +return await __rpc_call("/rpc", "Read", "instance", data); } -export async function __rpc_call_games_Read(data: null = null): Promise { -return await __rpc_call("/rpc", "Read", "games", data); +export async function __rpc_call_instance_Update(data: InstanceUpdate): Promise> { +return await __rpc_call("/rpc", "Update", "instance", data); } -export async function __rpc_call_games_Update(data: null = null): Promise { -return await __rpc_call("/rpc", "Update", "games", data); +export async function __rpc_call_instance_Delete(data: number): Promise> { +return await __rpc_call("/rpc", "Delete", "instance", data); } -const __rpc_module_games = { - create: __rpc_call_games_Create, - read: __rpc_call_games_Read, - update: __rpc_call_games_Update, - delete: __rpc_call_games_Delete, +const __rpc_module_instance = { + create: __rpc_call_instance_Create, + read: __rpc_call_instance_Read, + update: __rpc_call_instance_Update, + delete: __rpc_call_instance_Delete, }; -export async function __rpc_call_mods_Delete(data: number[]): Promise> { -return await __rpc_call("/rpc", "Delete", "mods", data); +export async function __rpc_call_mods_Create(data: InstalledModCreation[]): Promise> { +return await __rpc_call("/rpc", "Create", "mods", data); } -export async function __rpc_call_mods_Create(data: ModCreation[]): Promise> { -return await __rpc_call("/rpc", "Create", "mods", data); +export async function __rpc_call_mods_Delete(data: number[]): Promise> { +return await __rpc_call("/rpc", "Delete", "mods", data); } -export async function __rpc_call_mods_Read(data: number): Promise { +export async function __rpc_call_mods_Read(data: number): Promise { return await __rpc_call("/rpc", "Read", "mods", data); } @@ -349,175 +229,27 @@ const __rpc_module_mods = { }; -export async function __rpc_call_game_Create(data: GameCreation): Promise> { -return await __rpc_call("/rpc", "Create", "game", data); -} - -export async function __rpc_call_game_Update(data: GameUpdate): Promise> { -return await __rpc_call("/rpc", "Update", "game", data); -} - -export async function __rpc_call_game_Delete(data: number): Promise> { -return await __rpc_call("/rpc", "Delete", "game", data); -} - -export async function __rpc_call_game_Read(data: number): Promise> { -return await __rpc_call("/rpc", "Read", "game", data); -} - -const __rpc_module_game = { - create: __rpc_call_game_Create, - read: __rpc_call_game_Read, - update: __rpc_call_game_Update, - delete: __rpc_call_game_Delete, -}; - - -export async function __rpc_call_sources_Read(data: null = null): Promise { -return await __rpc_call("/rpc", "Read", "sources", data); -} - -export async function __rpc_call_sources_Update(data: null = null): Promise { -return await __rpc_call("/rpc", "Update", "sources", data); -} - -export async function __rpc_call_sources_Create(data: SourceCreation[]): Promise> { -return await __rpc_call("/rpc", "Create", "sources", data); -} - -export async function __rpc_call_sources_Delete(data: number[]): Promise> { -return await __rpc_call("/rpc", "Delete", "sources", data); -} +const __rpc_invokers = { -const __rpc_module_sources = { - create: __rpc_call_sources_Create, - read: __rpc_call_sources_Read, - update: __rpc_call_sources_Update, - delete: __rpc_call_sources_Delete, }; +export type InstalledMod = { id: number; fileSize: number; updated: string; iconUrl: string | null; instanceId: number; source: string; projectId: string; projectName: string; projectDesc: string | null; projectVersion: string | null } -export async function __rpc_call_plugins_Read(data: null = null): Promise> { -return await __rpc_call("/rpc", "Read", "plugins", data); -} - -export async function __rpc_call_plugins_Update(data: null = null): Promise { -return await __rpc_call("/rpc", "Update", "plugins", data); -} +export type InstalledModCreation = { fileSize: number; instanceId: number; source: string; projectId: string; projectName: string } -export async function __rpc_call_plugins_Create(data: null = null): Promise { -return await __rpc_call("/rpc", "Create", "plugins", data); -} +export type InstalledModUpdate = { id: number; fileSize?: number | null; updated?: string | null; iconUrl?: string | null; instanceId?: number | null; source?: string | null; projectId?: string | null; projectName?: string | null; projectDesc?: string | null; projectVersion?: string | null } -export async function __rpc_call_plugins_Delete(data: null = null): Promise { -return await __rpc_call("/rpc", "Delete", "plugins", data); -} +export type Instance = { id: number; name: string; plugin: string; description: string; updated: string; iconUrl: string | null; bannerUrl: string | null; extraData: string } -const __rpc_module_plugins = { - create: __rpc_call_plugins_Create, - read: __rpc_call_plugins_Read, - update: __rpc_call_plugins_Update, - delete: __rpc_call_plugins_Delete, -}; +export type InstanceCreation = { name: string; plugin: string; description: string; extraData: string } - -export async function __rpc_invoke_version(data: null = null): Promise { -return await __rpc_invoke("/rpc", "version", data); -} - -const __rpc_invokers = { -version: __rpc_invoke_version, -}; - -export type Dirs = { root: string; data: string; cache: string; temp: string } - -export type Game = { id: number; name: string; curseforge: number | null; thunderstore: string | null; spacedock: string | null; ckan: boolean; modrinth: boolean } - -export type GameCreation = { name: string } - -export type GameUpdate = { id: number; name?: string | null; curseforge?: number | null; thunderstore?: string | null; spacedock?: string | null; ckan?: boolean | null; modrinth?: boolean | null } - -export type Instance = { id: number; name: string; gameId: number; dataDir: string; cacheDir: string; installDir: string; description: string; created: string; updated: string; loader: string | null } - -export type InstanceCreation = { name: string; gameId: number; dataDir: string; cacheDir: string; installDir: string } - -export type InstanceUpdate = { id: number; name?: string | null; gameId?: number | null; dataDir?: string | null; cacheDir?: string | null; installDir?: string | null; description?: string | null; created?: string | null; updated?: string | null; loader?: string | null } - -export type Mod = { id: number; mod: string; version: string | null; name: string; file: string; size: number; hash: string | null; installed_files: string; sourceId: number; instanceId: number } - -export type ModCreation = { mod: string; name: string; file: string; size: number; installed_files: string; sourceId: number; instanceId: number } - -/** - * The ModLoader type. - * Each element contains the Minecraft version - * and then its version. - */ -export type ModLoader = { Vanilla: string } | { Forge: [string, string] } | { NeoForge: [string, string] } | { Fabric: [string, string] } | { Quilt: [string, string] } | -/** - * This is for any other game, I just didn't feel - * like dealing with recursive dependencies. - */ -"None" - -export type ModLoaderType = "Vanilla" | "Forge" | "NeoForge" | "Fabric" | "Quilt" | "None" - -export type ModUpdate = { id: number; mod?: string | null; version?: string | null; name?: string | null; file?: string | null; size?: number | null; hash?: string | null; installed_files?: string | null; sourceId?: number | null; instanceId?: number | null } - -/** - * A plugin's metadata. This is useful for getting information - * about the plugin on the frontend. - */ -export type PluginInfo = { -/** - * The plugin's identifier. - */ -id: string; -/** - * The plugin's game ID. - */ -game: number; -/** - * The plugin's display name. - */ -display_name: string; -/** - * The plugin's icon URL. - */ -icon_url: string; -/** - * The plugin's banner URL. - */ -banner_url: string; -/** - * The plugin's fallback mod install directory. - * If the installer can't automatically determine - * where to install a mod, this will be used. - */ -fallback_dir: string | null; -/** - * The plugin's query resolvers (IDs). - */ -resolvers: Source[] } - -export type Source = { id: number; name: string } - -export type SourceCreation = { name: string } - -export type SourceUpdate = { id: number; name?: string | null } +export type InstanceUpdate = { id: number; name?: string | null; plugin?: string | null; description?: string | null; updated?: string | null; iconUrl?: string | null; bannerUrl?: string | null; extraData?: string | null } export const RPC = { -latestLoader: __rpc_module_latestLoader, -instance: __rpc_module_instance, -dirs: __rpc_module_dirs, instances: __rpc_module_instances, -source: __rpc_module_source, -loaders: __rpc_module_loaders, mod: __rpc_module_mod, -games: __rpc_module_games, +instance: __rpc_module_instance, mods: __rpc_module_mods, -game: __rpc_module_game, -sources: __rpc_module_sources, -plugins: __rpc_module_plugins, invoke: __rpc_invokers, };