kriszyp / lmdb-js

Simple, efficient, ultra-fast, scalable data store wrapper for LMDB
Other
505 stars 41 forks source link

getManyEntries #288

Open alexgleason opened 5 months ago

alexgleason commented 5 months ago

I'm experimenting with creating a Deno.Kv wrapper for lmdb-js

Deno.Kv wants to use versions. I can use db.getEntry to get a value with the version. But there's no equivalent for getMany.

EDIT: I might be working off the wrong premise, that "version" means the same thing between the two databases.

kriszyp commented 5 months ago

I could add this, although it isn't too hard to do this with the existing APIs. getMany is just a call to prefetch followed by (when the callback is called) a get call. So you could just call prefetch and then call getEntry (for each key) when it is done.