only-cliches/snap-db

Question: synchronous read by key?

vladar opened this issue · 1 comments

Hi, cool project!

I evaluate storage options for an existing project where we must keep backward compatibility and need a way to fetch data synchronously by a key.

So curious is it (at least theoretically) possible to have a sync method for reading by a key with existing architecture (even with perf penalty)?

They thanks!

Yes, you'd need to slightly restructure the get method and make sure you open the database with mainThread set to true.