denoland / denokv

A self-hosted backend for Deno KV
https://deno.com/kv
MIT License
456 stars 21 forks source link

Keys & Values separately #54

Open fabiancook opened 9 months ago

fabiancook commented 9 months ago

The Kv client currently has

list<T>(selector: KvListSelector, options?: KvListOptions): AsyncIterableIterator<{ key: KvKey, entry: T }[]>

Would be nice to be able to get the keys alone without needing to retrieve the entries

keys(selector: KvListSelector, options?: KvListOptions): AsyncIterableIterator<KvKey[]>

Thinking ahead, a similar function could be if you want just the values directly matching:

values<T>(selector: KvListSelector, options?: KvListOptions): AsyncIterableIterator<T>

This would match keys functionality available with other kv implementations: