aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2022-03-12Convert `yaml::Yaml` values to `rusqlite::ToSql`Teddy Wing
This enables us to build a list of params for insertion and insert them into the database. Not sure if `NULL` makes sense for all of these types, but this at least gives us the type conversion necessary to get the YAML values into the SQL query, cool.
2022-03-12yaml_extract: Trying to build up a SQL insert statementTeddy Wing
Doesn't work yet as I need a way to convert `Yaml` values to Rusqlite SQL params.
2022-03-10Start encoding SQLite affinity rulesTeddy Wing
Need to figure out what to do for NUMERIC affinity since Rusqlite doesn't expose a variant for that pseudo-type.
2022-03-09Idea for getting SQLite type affinity from a type stringTeddy Wing
2022-03-09get_column_names(): Add a note to map to the enum type instead of StringTeddy Wing
2022-03-09get_column_names(): Also get column typeTeddy Wing
Creates a map from column name to type.
2022-03-09yaml_extract(): Fix code from transaction argument ideaTeddy Wing
2022-03-09Add TODO for column typeTeddy Wing
Want to translate YAML types to SQLite types.
2022-03-09Idea for inserting values from YAML into SQLite tableTeddy Wing
Need to figure out how to insert `table_columns.len()` values.
2022-03-09Check if YAML hash key matches column nameTeddy Wing
Possibly ugly passing `table_columns` into `yaml_extract`, but just trying to get things working for now. Query a "people" DB table instead as that matches the test YAML file.
2022-03-09get_column_names(): Put column names in a `HashMap`Teddy Wing
Make it easier to find out if a column name exists in the table.
2022-03-08get_column_names(): Remove transaction codeTeddy Wing
We probably don't even need a transaction for a `SELECT`. Get rid of that code and remove the `mut` on `dbconn` which was only necessary for the transaction.
2022-03-08Get column names from SQLite tableTeddy Wing
Eliminated the transaction because of a borrow problem.
2022-03-08Try extracting YAML dataTeddy Wing
2022-03-07Try reading and parsing a YAML fileTeddy Wing
2022-03-07Add notesTeddy Wing
2022-03-07New Rust 1.59.0 projectTeddy Wing
$ rustc --version rustc 1.59.0 (9d1b2106e 2022-02-23) $ cargo init --bin
2022-03-06Idea for a program to convert between YAML and SQLiteTeddy Wing