From 2e4e109065ba829de64937b0e4bdfc02488a8658 Mon Sep 17 00:00:00 2001 From: Michael Chung Date: Wed, 22 Nov 2023 23:41:16 -0500 Subject: [PATCH] Notes --- .../mysql_queries/src/queries/model_weights/get_weight.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/lib/mysql_queries/src/queries/model_weights/get_weight.rs b/crates/lib/mysql_queries/src/queries/model_weights/get_weight.rs index 785d9e4492..0c8f417dcc 100644 --- a/crates/lib/mysql_queries/src/queries/model_weights/get_weight.rs +++ b/crates/lib/mysql_queries/src/queries/model_weights/get_weight.rs @@ -12,6 +12,10 @@ use enums::common::visibility::Visibility; use tokens::tokens::{ users::UserToken, model_weights::ModelWeightToken }; use chrono::{ DateTime, Utc }; +// Notes ensure that Enums have sqlx::Type +// 'weights_type: enums::by_table::model_weights::weights_types::WeightsType' use this to map +// Retrieved Model Weight can be constrained to the fields that are needed + pub struct RetrivedModelWeight { pub token: ModelWeightToken, pub title: String, @@ -202,6 +206,7 @@ async fn select_without_deleted( .fetch_one(mysql_connection).await } +// RawWeight is the struct that is returned from the database in raw form. #[derive(Serialize)] pub struct RawWeight { pub token: ModelWeightToken,