fixed bug with sodium

This commit is contained in:
Colin McKechney
2023-04-30 22:35:58 +00:00
parent 24ca48fe51
commit 443dc0e101

View File

@@ -36,15 +36,19 @@ fn create_plan(plan: PlanData) -> Result<()> {
let conn = Connection::connect(ORACLE_USER, ORACLE_PASS, ORACLE_CON_STR)?; let conn = Connection::connect(ORACLE_USER, ORACLE_PASS, ORACLE_CON_STR)?;
let mut stmt = conn.statement("insert into table goal values(:net_id, :total_cal, :total_fat, :total_sat_fat, :total_trans_fat, :total_carbs, :total_fiber, :total_sugar, :total_protein, :total_sodium, :total_potassium, :total_cholesterol)").build()?; let mut stmt = conn.statement("insert into goal values(:net_id, :total_cal, :total_fat, :total_sat_fat, :total_trans_fat, :total_carbs, :total_fiber, :total_sugar, :total_protein, :total_sodium, :total_potassium, :total_cholesterol)").build()?;
stmt.execute_named(&[("net_id", &plan.net_id), ("total_cal", &plan.total_cal), stmt.execute_named(&[
("net_id", &plan.net_id),
("total_cal", &plan.total_cal),
("total_fat", &plan.total_fat), ("total_fat", &plan.total_fat),
("total_sat_fat", &plan.total_sat_fat), ("total_sat_fat", &plan.total_sat_fat),
("total_trans_fat", &plan.total_trans_fat), ("total_trans_fat", &plan.total_trans_fat),
("total_carbs", &plan.total_carbs), ("total_carbs", &plan.total_carbs),
("total_fiber", &plan.total_fiber),
("total_sugar", &plan.total_sugar), ("total_sugar", &plan.total_sugar),
("total_protein", &plan.total_protein), ("total_protein", &plan.total_protein),
("total_sodium", &plan.total_sodium),
("total_potassium", &plan.total_potassium), ("total_potassium", &plan.total_potassium),
("total_cholesterol", &plan.total_cholesterol)])?; ("total_cholesterol", &plan.total_cholesterol)])?;