fdo-rs / fido-device-onboard-rs

An implementation of the FIDO Device Onboard (FDO) spec written in Rust.
BSD 3-Clause "New" or "Revised" License
58 stars 33 forks source link

database enhancements #666

Closed runcom closed 3 weeks ago

runcom commented 1 month ago

chore: store: db: reuse connection pool

The pool object is meant to be reused and since we're initializing the store as part of a long running process, we should save the pool object and pass it around/use it.

chore: store: db: refactor database configuration

This mainly comes from @mmartinv comment https://github.com/fdo-rs/fido-device-onboard-rs/pull/556/files#r1465996442

nullr0ute commented 4 weeks ago

Is this ready for review? Looking to be ongoing updates so maybe should be a draft until it's ready

runcom commented 3 weeks ago

You should move the removal of store/src/db.rs into the first commit since you are already creating two separate files for sqlite and postgres that have the pool reuse modification

I figured it's probably better to have this enhancement as a single commit (too many moving pieces and I want to avoid to break bisect too)

7flying commented 3 weeks ago

You should move the removal of store/src/db.rs into the first commit since you are already creating two separate files for sqlite and postgres that have the pool reuse modification

I figured it's probably better to have this enhancement as a single commit (too many moving pieces and I want to avoid to break bisect too)

That also works for me :+1: