aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
authorTeddy Wing2022-03-12 21:34:24 +0100
committerTeddy Wing2022-03-12 21:34:24 +0100
commit0704e8fde641fd8afe1a0a25d7017b41972420f9 (patch)
tree985d86d51ca9688eb9f2eea8e63a838f582a6972 /src/main.rs
parente319f0b90218d959fd1c4663b93f08fa69996da1 (diff)
downloadyaqlite-0704e8fde641fd8afe1a0a25d7017b41972420f9.tar.bz2
yaml_extract(): Remove old comments
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs26
1 files changed, 0 insertions, 26 deletions
diff --git a/src/main.rs b/src/main.rs
index 91e9fb6..629ecbc 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -43,22 +43,6 @@ fn yaml_extract(
}
}
yaml::Yaml::Hash(ref mut hash) => {
- // Begin transaction
- // for (k, v) in hash {
- // // TODO: Put k,v in a HashMap prepared for SQLite interfacing
- // // Each hash is a new record for SQLite insertion
- //
- // // If key matches a column name, add it to the insert statement
- //
- // if table_columns.contains_key(k.as_str().unwrap()) {
- // dbg!(k, v);
- // }
- // }
-
- // let keys: Vec<&str> = hash
- // .keys()
- // .map(|k| k.as_str().unwrap())
- // .collect();
let keys: Vec<yaml::Yaml> = hash.keys().map(|k| k.clone()).collect();
let columns_as_yaml: Vec<yaml::Yaml> = table_columns.keys()
.map(|c| yaml::Yaml::from_str(c))
@@ -90,16 +74,6 @@ fn yaml_extract(
let values = hash.values().map(|v| yaqlite::yaml::Yaml(v));
stmt.insert(rusqlite::params_from_iter(values)).unwrap();
-
- // tx.execute(
- // r#"
- // INSERT INTO "people"
- // ()
- // VALUES
- // ();
- // "#,
- // []
- // ).unwrap();
}
_ => {}
}