AstroHQ / metrics-sqlite

Metrics observer/exporter for SQLite
Apache License 2.0
2 stars 0 forks source link

Using rusqlite #11

Open jalcine opened 2 years ago

jalcine commented 2 years ago

I already use https://lib.rs/crates/rusqlite (indirectly) in my current projects, and I'd like to use metrics to collect stats about the app, would you be open to a PR to allow people to configure which SQLite backend they'd like to use? It could also reduce the number of dependencies since diesel is for multiple databases, and it's only being used for SQLite here.

jfro commented 2 years ago

I actually ended up choosing diesel because the dependencies were minimal. It has a bunch but 90% of them are optional. So diesel + sqlite feature is just byteorder, libsqlite3-sys, and common macro crates.

Do you think having optional backends will be much work? the APIs are a bit different so not sure how messy it'd get, but not opposed to the general idea.

jalcine commented 2 years ago

I don't think so if the operations are made into some sort of facade that could be then implemented for each implementation. I can take some time this weekend to look into it!