closing and committing

This commit is contained in:
Colin McKechney
2023-04-30 22:46:10 +00:00
parent 5c11b7b463
commit 402dcd8efe
2 changed files with 4 additions and 0 deletions

View File

@@ -69,5 +69,7 @@ fn grab_rows(eatery: String) -> oracle::Result<Vec<FoodItem>> {
cholesterol: row.get(14).unwrap_or(None)});
}
conn.close()?;
Ok(row_vec)
}

View File

@@ -55,6 +55,8 @@ fn create_plan(plan: PlanData) -> Result<()> {
("total_cholesterol", &plan.total_cholesterol)])?;
info!("Created new plan for user: {}", plan.net_id);
conn.commit()?;
conn.close()?;
Ok(())
}