diff options
author | Teddy Wing | 2022-03-09 23:28:52 +0100 |
---|---|---|
committer | Teddy Wing | 2022-03-09 23:35:11 +0100 |
commit | 552473e9e769076c2d4b9066051fa4ed0519cbbc (patch) | |
tree | d6b860024975f4429aec0e12ec3c9b99b896e205 /src/main.rs | |
parent | aaf02280c85db648de5788bc8509c0918fb6c369 (diff) | |
download | yaqlite-552473e9e769076c2d4b9066051fa4ed0519cbbc.tar.bz2 |
yaml_extract(): Fix code from transaction argument idea
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 22 |
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(); } _ => {} } |