Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
This was obviated by using `Cow::Borrowed` and `Cow::Owned` directly
when creating a `Yaml`.
|
|
|
|
Create an adapter from `std::fmt::Write` to `std::io::Write` based on
the following idea in the standard library:
https://github.com/rust-lang/rust/blob/master/library/std/src/io/mod.rs#L1634-L1652
Since `yaml_rust::YamlEmitter::new()` requires a `std::fmt::Write`,
adapt standard output so the emitter can write to it.
|
|
Instead of my earlier `std::collections::HashMap`, build the type we
want to return directly in the row closure.
Required copying some data like the column names, but I don't see a way
around that. I suppose we could make `yaml_rust::Yaml`s from the column
headers in the row closure too instead of copying an existing column
header that we otherwise never use.
This nearly passes the test I have for this function, but it includes
the `id` column in the `Yaml` hash. The primary key column will need to
be removed.
|
|
Can't get the info from inside the closure it seems. The row iterator
doesn't seem to be looping. Not sure what the story is yet. Maybe I'm
not converting the data types correctly.
|
|
It doesn't need to be completely public.
|
|
This allows us to use a borrowed `yaml_rust::Yaml` for `ToSql` and an
owned `yaml_rust::Yaml` for `FromSql`.
|
|
Still a work in progress. Trying to figure out what makes the most sense
for converting between the different types in SQLite and YAML.
This code still has some compilation errors.
|
|
If any value extraction comes back as `None`, convert it to a SQL
`Null`.
|
|
Want to use `yaqlite::yaml` for the YAML extraction function.
|