manenga / Wordbook

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WorkBook: A Transactional Key Value Store

Purpose

The assignment is to build an interactive interface to a transactional key value store. A user should be able to compile and run this program and get an interactive interface where they can select commands and textfield to enter command value. The user can enter commands to set/get/delete key/value pairs and count values. All values can be treated as strings, no need to differentiate by type. The key/value data only needs to exist in memory for the session, it does not need to be written to disk.

The interface should also allow the user to perform operations in transactions, which allows the user to commit or roll back their changes to the key value store. That includes the ability to nest transactions and roll back and commit within nested transactions.

Features

SET <key> <value> // store the value for key
GET <key>         // return the current value for key
DELETE <key>      // remove the entry for key
COUNT <value>     // return the number of keys that have the given value
BEGIN             // start a new transaction
COMMIT            // complete the current transaction
ROLLBACK          // revert to state prior to BEGIN call

Demo

How can I support the developer?

  • Star our GitHub repo ⭐
  • Create pull requests, submit bugs, suggest new features or documentation updates 🔧
  • Follow me on Twitter
  • Follow me on Instagram
  • Buy me coffee or Donate

More from the developers

License

Apache license.

From Developers

Made with ♥ by Manenga. Support me.

About


Languages

Language:Swift 100.0%