From 2313a1bd0910e7b42cc23f83d6722272b87e0baf Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Wed, 23 Mar 2022 00:24:22 +0100 Subject: extract(): Rename function to `db_insert()` The name `extract()` didn't make sense to me any more since the function is doing more than its originally intended behaviour which was to extract the YAML into a hash-like format for easy insertion into the database. I decided to give up on that behaviour since this works for what we want it to do. Maybe this function is doing more than it should, but I'm okay with that for the current functional requirements. --- src/insert.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/insert.rs') diff --git a/src/insert.rs b/src/insert.rs index f58fc4c..9c15fc7 100644 --- a/src/insert.rs +++ b/src/insert.rs @@ -9,7 +9,7 @@ pub fn insert( for mut doc in data { let tx = dbconn.transaction()?; - crate::yaml::extract(&mut doc, &tx, &table_name, &table_columns)?; + crate::yaml::db_insert(&mut doc, &tx, &table_name, &table_columns)?; tx.commit()?; } -- cgit v1.2.3