You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 3, 2022. It is now read-only.
Digging through the docs there doesn’t appear to be a way to do range queries even though it looks like the keys are ordered.
My ideal API for this would just be to add optional start, end, and ascending parameters to keys(), values() and entries(). So:
constonehour=1000*60*60constnow=Date.now()// query for everything from the last hourforawait(let[key,value]ofdb.entries(now,now+onehour,true)){// do stuff}
This might seem like a small feature but it’s something we rely on across the level ecosystem for creating more complex things on top of IDB today.
The text was updated successfully, but these errors were encountered:
I would like to second this and also add that I would love to be able to specify if start & end should be inclusive or exclusive. In my package fanny-pack I've solved it by taking a range object that can have gt/gte & lt/lte. That way you can also only specify a lower, or only a upper bound if you want to.
Digging through the docs there doesn’t appear to be a way to do range queries even though it looks like the keys are ordered.
My ideal API for this would just be to add optional
start
,end
, andascending
parameters tokeys()
,values()
andentries()
. So:This might seem like a small feature but it’s something we rely on across the
level
ecosystem for creating more complex things on top of IDB today.The text was updated successfully, but these errors were encountered: