closing and committing
This commit is contained in:
@@ -69,5 +69,7 @@ fn grab_rows(eatery: String) -> oracle::Result<Vec<FoodItem>> {
|
|||||||
cholesterol: row.get(14).unwrap_or(None)});
|
cholesterol: row.get(14).unwrap_or(None)});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
conn.close()?;
|
||||||
|
|
||||||
Ok(row_vec)
|
Ok(row_vec)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,6 +55,8 @@ fn create_plan(plan: PlanData) -> Result<()> {
|
|||||||
("total_cholesterol", &plan.total_cholesterol)])?;
|
("total_cholesterol", &plan.total_cholesterol)])?;
|
||||||
|
|
||||||
info!("Created new plan for user: {}", plan.net_id);
|
info!("Created new plan for user: {}", plan.net_id);
|
||||||
|
conn.commit()?;
|
||||||
|
conn.close()?;
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user