-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
suggestion: Deno.Kv.count()
#18965
Comments
I totally support this proposal, but in lieu of the function that @iuioiua proposes, you could use the
|
To add to Craig's alternative solution, examples can be seen in Deno SaaSKit's KV logic. |
I don't mind this solution to manage our own sums but I think we need a way to get at the result of the action without making an additional
From my understanding based on the way it works if you call this
or maybe better if they the results of one atomic action could be chained to the next...
I understand this introduces the need to rollback changes if something fails in the middle which could be more complicated to build but this would also be much more powerful. |
This would be useful for cases where one would like to know how many entries exist for a given prefix without processing/storing any of the actual data. Example:
I know this can be done using
kv.list()
, but having an in-built method seems useful.The text was updated successfully, but these errors were encountered: