Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

Implementation of single and bulk deletion from KV #452

Merged
merged 1 commit into from
Aug 21, 2019

Conversation

gabbifish
Copy link
Contributor

@gabbifish gabbifish commented Aug 19, 2019

This PR closes #344 and #347. It implements single and bulk deletion of values from Workers KV.

This PR may potentially still be WIP because we still need to decide how exactly we want the workers subcommands to look like, especially between {namespace, individual, bulk} deletion; we can do this in this PR or on the feat-kv-commands branch.

So far, the commands are used as the following:
Individual delete:

$ wrangler kv delete-key 06779da6940b431db6e566b4846d64db matt
 Deleting key "matt"
 Success

For bulk delete (on a json blob):

$ wrangler kv delete-bulk 06779da6940b431db6e566b4846d64db test-delete.json 
 Success

For bulk delete (on a directory):

$ wrangler kv delete-bulk 06779da6940b431db6e566b4846d64db abc
 Deleting a.txt...
 Deleting b%2Fc.txt...
 Success

This PR will fail to build until the necessary API changes are also merged into cloudflare-rs (cloudflare/cloudflare-rs#29), because it is dependent on these changes.

src/commands/kv/delete_bulk.rs Outdated Show resolved Hide resolved
src/commands/kv/delete_bulk.rs Show resolved Hide resolved
src/commands/kv/delete_bulk.rs Outdated Show resolved Hide resolved
src/commands/kv/delete_key.rs Outdated Show resolved Hide resolved
src/main.rs Show resolved Hide resolved
@gabbifish gabbifish force-pushed the gabbi/add-kv-individual-bulk-delete branch from 2abd9d5 to a13c671 Compare August 21, 2019 06:42
@gabbifish gabbifish force-pushed the gabbi/add-kv-individual-bulk-delete branch from a13c671 to fca40e9 Compare August 21, 2019 06:47
@gabbifish gabbifish merged commit 408c34e into feat-kv-commands Aug 21, 2019
@delete-merged-branch delete-merged-branch bot deleted the gabbi/add-kv-individual-bulk-delete branch August 21, 2019 18:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
regression Something is broken, but works in previous releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants