Skip to content

Implement commands for CLI #7

Description

@worthant

Proposed Commands for HandyDB

  • set <key> <value>: Sets or updates a value for a given key.
  • get <key>: Retrieves the value associated with a given key.
  • add <key> <value>: Adds a new key-value pair, errors if key exists.
  • append <value>: Appends a value with an auto-generated key.
  • delete <key>: Deletes a key-value pair based on the key.
  • exists <key>: Checks if a key exists in the database.
  • list or keys: Lists all keys in the database.
  • clear: Clears all data from the database.
  • update <key> <value>: Updates the value for an existing key, errors if key doesn't exist.
  • info: Displays information about the database.
  • help: Displays help information about commands.
  • exit or quit: Exits the database CLI.
  • export <filename>: Exports database contents to a file.
  • import <filename>: Imports data from a file into the database.
  • find <pattern>: Searches for keys matching a pattern.
  • history: Shows a history of executed commands (optional).
  • stats: Shows statistics about database usage and performance.
  • rename <old_key> <new_key>: Renames a key.
  • merge <key1> <key2> <new_key>: Merges two keys into a new key.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions