Open aricart opened 3 years ago
We need https://github.com/nats-io/nats-server/issues/2495 to be done for this - sure we can do without but wont be efficient.
At the same time we should add a ranged get variant that returns []Entry or itterator of Entry (whatever works for a specific language)
The server work for https://github.com/nats-io/nats-server/issues/2495 was done ages ago, so in theory we can do this now. Needs discussion.
Overview
Since KV (ADR-8) can now have subjects with wildcards, it becomes very useful to implement delete to delete key sub-ranges
kv.delete("a.*")
. This allows applications to easily cleanup values that may be "hierarchical" in nature without knowing the possible values that may be stored underneath.The current behavior is to reject values with wildcards, but this is inconsistent with history and watches. Presumably, this is not in parity with
get
, but possibly the API could be expanded to do anmget
which can deal with ranges without having to resort to doing consumers on the underlying stream.