DRAFT tool: defra-kv -- key-value store via defradb embedded in CLI tool #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
NOTE: this isn't explicitly intended to actually add to the repo in its current form. It may be added or not, but that's not the goal at the moment. The point here is only code review.
This code was heavily generated by ChatGPT, so my goal is to get a sense of whether any parts of this code are good, bad, or neutral, and learn better how such a program should be coded.
This is a first-draft of a tool that satisfies the following design priorities:
type
DDL)query { .. }
ormutation { .. }
-query
CLI parameternow also includes KV actions via convenience parameters:
-has
checks if a key exists in the KV store-get
looks up an entry by key name-set
inserts (or updates) a key/value into the KV store-remove
removes an entry by key name