confidential-containers / simple-kbs

Key Broker Server for SEV(-ES)
Apache License 2.0
12 stars 13 forks source link

db: Restore sqlite support #52

Closed dubek closed 1 year ago

dubek commented 1 year ago
  1. Fix bug on sqlite with nullable columns
  2. Add sqlite testing to run_local_tests
  3. Add CI job for testing with sqlite

Signed-off-by: Dov Murik dov.murik1@il.ibm.com


I will rebase this PR on top of #51 after that is merged.

dubek commented 1 year ago

All tests pass except lint (clippy), which warns about needless-borrows in unrelated code.

dubek commented 1 year ago

Let's merge #53 first (fixes the clippy/lint warnings), and then I'll rebase this.

dubek commented 1 year ago

BTW the fix for the nullable fields was to convert (try_get) the DB value to Option<i64> instead of i64, which will properly convert the NULL to None. See https://docs.rs/sqlx/latest/sqlx/mysql/types/index.html#nullable .

dubek commented 1 year ago

Rebased on top of main; now CI is green.