{"id":22515487,"url":"https://github.com/kylesmith19091/keyvaluestore","last_synced_at":"2025-07-06T13:03:04.337Z","repository":{"id":124214049,"uuid":"384123344","full_name":"KyleSmith19091/KeyValueStore","owner":"KyleSmith19091","description":"Implementation of a Key Value Store Protocol for NoSQL","archived":false,"fork":false,"pushed_at":"2021-08-04T14:57:38.000Z","size":59,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-02T03:41:29.927Z","etag":null,"topics":["cpp11","key-value","nosql","tui"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KyleSmith19091.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-07-08T12:52:24.000Z","updated_at":"2023-03-07T16:57:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"25797f9e-e0b5-4c5c-ae86-d0e20bceead2","html_url":"https://github.com/KyleSmith19091/KeyValueStore","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KyleSmith19091%2FKeyValueStore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KyleSmith19091%2FKeyValueStore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KyleSmith19091%2FKeyValueStore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KyleSmith19091%2FKeyValueStore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KyleSmith19091","download_url":"https://codeload.github.com/KyleSmith19091/KeyValueStore/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245955441,"owners_count":20699909,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp11","key-value","nosql","tui"],"created_at":"2024-12-07T03:32:45.727Z","updated_at":"2025-03-28T02:20:14.776Z","avatar_url":"https://github.com/KyleSmith19091.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- Heading --\u003e\n\u003cdiv align=\"center\"\u003e\n    \u003ch1\u003eTransactional Key Value Store Implmentation\u003c/h1\u003e\n\u003c/div\u003e\n\n\u003cp\u003e\nThis is an \u003cstrong\u003ein progress implmentation\u003c/strong\u003e of a transactional Key-Value store implementation from scratch. Currently we only use few standard library functions such as strings, io and unordered maps as the stores. This is purely educational, where I wanted to implement as much of the functionality from scratch, such as creating my own Stack and in the future a hashmap implementation.\n\u003c/p\u003e\n\n---\n## Installation ⚡️\n\n* Building from sratch\n\nThis requires a g++ compiler, that is also able to compile c++ 11\n```bash\nmake\n```\n\u003cp\u003e\nThis creates the executable in the build directory\n\u003c/p\u003e\n\nYou'll then be presented with the following prompt\n```bash\n\u003e \n```\n\nThis 'mini-shell' environment will serve as your interface into the key-value store\n\n## CRUD Operations ⭐️\n\u003cstrong\u003e** Note, keys are case sensitive, but the operations are not.\u003c/strong\u003e\n\n\u003ch4 align=\"center\"\u003eREAD\u003c/h4\u003e\n\n```bash\n\u003e GET KEY\n```\n\u003ch4 align=\"center\"\u003eWRITE\u003c/h4\u003e\n\n```bash\n\u003e SET KEY VALUE\n```\n\n\u003cstrong\u003e** In this case the value can be anything, the interpreter will assume that all input after the given KEY is the value. This does include space seperated data.\u003c/strong\u003e\n\n\u003cstrong\u003eFor Ex.\u003c/strong\u003e\n\n```bash\n\u003e SET full-name John Smith II\n```\n\n\u003ch4 align=\"center\"\u003eUPDATE\u003c/h4\u003e\n\n```bash\n\u003e PUT KEY VALUE\n```\n\n\u003cstrong\u003e** SET can also be used as a PUT, it will overwrite the key's value\u003c/strong\u003e\n\n\u003ch4 align=\"center\"\u003eDELETE\u003c/h4\u003e\n\n```bash\n\u003e DELETE KEY\n```\n\n## Transactional Operations 🚦 \nSince this is a transactional key-value store implementation, we need the ability to create, end, rollback and commit transactions. Transactions are handled using a Stack, where the \ntop of the stack represents the \u003ci\u003eactive\u003c/i\u003e transaction.\n\n\u003ch4 align=\"center\"\u003eBEGIN: Starts a new transaction\u003c/h4\u003e\n\n```bash\n\u003e BEGIN\n```\n\n\u003ch4 align=\"center\"\u003eEND: Ends the current active transaction\u003c/h4\u003e\n\n```bash\n\u003e END\n```\n\u003ch4 align=\"center\"\u003eROLLBACK: Discards the changes made by current transaction\u003c/h4\u003e\n\n```bash\n\u003e ROLLBACK\n```\n\n\u003ch4 align=\"center\"\u003eCOMMIT: Commits the changes made by active transaction to global store\u003c/h4\u003e\n\n```bash\n\u003e ROLLBACK\n```\n\n## Other Operations 🧪\n\n\u003ch4 align=\"center\"\u003eCLEAR\u003c/h4\u003e\nTo clear the 'shell'\n\n```bash\t\n\u003e CLEAR\n```\n\n\u003ch4 align=\"center\"\u003eEXIT\u003c/h4\u003e\nTo gracefully exit the shell, CTRL+C or your equivalent will also work\n\n```bash\n\u003e EXIT\n```\n\n\u003ch4 align=\"center\"\u003ePRINT\u003c/h4\u003e\nTo Print the current active transaction's store\n\n```bash\n\u003e PRINT\n```\n\n## Additional Notes 🎉\nYou can customise the prompt token, by changing the constructor value in the Main.cpp file\n\n```c++\nint main() {\n\t// Interface into key-value store\n\tShell s(\"❯\");\n\ts.init();\n\n\treturn 0;\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkylesmith19091%2Fkeyvaluestore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkylesmith19091%2Fkeyvaluestore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkylesmith19091%2Fkeyvaluestore/lists"}