Age | Commit message (Collapse) | Author |
|
Add a function to get the column name of the table's primary key. This
allows us to use a primary key value given by the user while saving
users the trouble of having to input the primary key column name.
We likely still want to offer the option of passing in a primary key
column name in case this function can't determine the table's primary
key, or if the table has a `UNIQUE` column we can query but no primary
key.
|
|
Use a new `yaqlite::Error` type. Remove the other error types and use
this main error type everywhere. For now, that seems simpler.
The real reason why I centralised on one error type is that I wanted a
single `Error::Sqlite` variant for both `rusqlite::Error` and
`SqliteError` errors. However, I wasn't sure if it's possible to do that
with `thiserror`, and I didn't want to bother having to write my own
`std::error::Error` impls.
|
|
Return a `Result` and wrap errors in a `thiserror` struct.
|
|
Found some documentation that reminded me how unit structs are written.
Change this definition as that makes more sense.
|
|
Remove the hard-coded table name.
|
|
|
|
Need to figure out what to do for NUMERIC affinity since Rusqlite
doesn't expose a variant for that pseudo-type.
|
|
|