aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
authorTeddy Wing2022-03-09 23:28:52 +0100
committerTeddy Wing2022-03-09 23:35:11 +0100
commit552473e9e769076c2d4b9066051fa4ed0519cbbc (patch)
treed6b860024975f4429aec0e12ec3c9b99b896e205 /src/main.rs
parentaaf02280c85db648de5788bc8509c0918fb6c369 (diff)
downloadyaqlite-552473e9e769076c2d4b9066051fa4ed0519cbbc.tar.bz2
yaml_extract(): Fix code from transaction argument idea
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/main.rs b/src/main.rs
index 9ea03f4..2593122 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -6,7 +6,7 @@ fn main() {
// Get column names from SQLite
- let dbconn = rusqlite::Connection::open("./test.db").unwrap();
+ let mut dbconn = rusqlite::Connection::open("./test.db").unwrap();
let table_columns = get_column_names(&dbconn);
dbg!(&table_columns);
@@ -36,7 +36,7 @@ fn yaml_extract(
match doc {
yaml::Yaml::Array(ref array) => {
for yaml_value in array {
- yaml_extract(yaml_value, table_columns);
+ yaml_extract(yaml_value, tx, table_columns);
}
}
yaml::Yaml::Hash(ref hash) => {
@@ -52,15 +52,15 @@ fn yaml_extract(
}
}
- tx.execute(
- r#"
- INSERT INTO "people"
- ()
- VALUES
- ();
- "#,
- []
- ).unwrap();
+ // tx.execute(
+ // r#"
+ // INSERT INTO "people"
+ // ()
+ // VALUES
+ // ();
+ // "#,
+ // []
+ // ).unwrap();
}
_ => {}
}