{"id":18083530,"url":"https://github.com/leizongmin/simpledb","last_synced_at":"2025-04-12T17:14:14.422Z","repository":{"id":38241096,"uuid":"260366113","full_name":"leizongmin/simpledb","owner":"leizongmin","description":"NoSQL embedded database on top of RocksDB.","archived":false,"fork":false,"pushed_at":"2024-04-10T04:37:13.000Z","size":202,"stargazers_count":16,"open_issues_count":5,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-14T01:06:57.877Z","etag":null,"topics":["crates","database","key-value","key-value-store","leveldb","mongodb","nosql","redis","rocksdb","rust","simple-db","sqlite"],"latest_commit_sha":null,"homepage":"https://simpledb.leizm.com/dev/bench/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leizongmin.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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":"2020-05-01T02:49:10.000Z","updated_at":"2024-05-01T10:57:22.640Z","dependencies_parsed_at":"2024-03-23T00:36:41.763Z","dependency_job_id":"9ffbd74e-8834-4753-967d-ebc2ff83f5ec","html_url":"https://github.com/leizongmin/simpledb","commit_stats":{"total_commits":117,"total_committers":4,"mean_commits":29.25,"dds":"0.18803418803418803","last_synced_commit":"3f716eafb18d966035b85ff0259672dbb0c8293e"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leizongmin%2Fsimpledb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leizongmin%2Fsimpledb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leizongmin%2Fsimpledb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leizongmin%2Fsimpledb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leizongmin","download_url":"https://codeload.github.com/leizongmin/simpledb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248602313,"owners_count":21131616,"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":["crates","database","key-value","key-value-store","leveldb","mongodb","nosql","redis","rocksdb","rust","simple-db","sqlite"],"created_at":"2024-10-31T14:08:27.900Z","updated_at":"2025-04-12T17:14:14.394Z","avatar_url":"https://github.com/leizongmin.png","language":"Rust","readme":"# simpledb\n\n![Rust](https://github.com/leizongmin/simpledb/workflows/Rust/badge.svg)\n[![API](https://docs.rs/simpledb/badge.svg)](https://docs.rs/simpledb)\n[![Minimum rustc version](https://img.shields.io/badge/rustc-1.45+-lightgray.svg)](https://github.com/leizongmin/simpledb#rust-version-requirements)\n\nNoSQL embedded database on top of RocksDB.\n\nAPI Documents: https://docs.rs/simpledb\n\n## Quick Start\n\nAdd this to your `Cargo.toml`:\n\n```toml\n[dependencies]\nsimpledb = \"0.1.7\"\n```\n\nExample:\n\n```rust\nuse simpledb::Database;\n\nfn main() {\n    // open a database\n    let db = Database::open(\"./target/path/to/database\").unwrap();\n    // left push a value to a list\n    db.list_left_push(\"key\", \"value\".as_bytes()).unwrap();\n}\n```\n\n## Data Types and Methods\n\n### Map\n\nStore key/value pairs, includes the following methods with `map_` prefix: `get`, `put`, `delete`, `count`, `for_each`, `items`.\n\n### Set\n\nStore unique values, includes the following methods with `set_` prefix: `add`, `is_member`, `delete`, `count`, `for_each`, `items`.\n\n### List\n\nStore ordered values, includes the following methods with `list_` prefix: `left_push`, `left_pop`, `right_push`, `right_pop`, `count`, `for_each`, `items`.\n\n### Sorted List\n\nStore sorted score/value pairs, may including multiple pairs, includes the following methods with `sorted_list_` prefix: `add`, `left_pop`, `right_pop`, `count`, `for_each`, `items`.\n\n### Sorted Set\n\nStore sorted unique score/value pairs, includes the following methods with `sorted_set_` prefix: `add`, `is_member`, `delete`, `left`, `right`, `for_each`, `items`.\n\n## Benchmark\n\nExample codes from `benchmark` directory.\n\n- rustc 1.67.1 (d5a82bbd2 2023-02-07)\n- Ubuntu 18.04\n- Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz x 16\n\n| method                | write | op/s      |\n| --------------------- | ----- | --------- |\n| map_get               |       | 662,251   |\n| map_count             |       | 1,369,863 |\n| map_put               |   Y   | 105,152   |\n| map_delete            |   Y   | 99,900    |\n| set_count             |       | 1,639,344 |\n| set_is_member         |       | 746,268   |\n| set_add               |   Y   | 109,409   |\n| set_delete            |   Y   | 105,152   |\n| list_count            |       | 1,136,363 |\n| list_left_push        |   Y   | 116,414   |\n| list_left_pop         |   Y   | 96,339    |\n| list_right_push       |   Y   | 115,207   |\n| list_right_pop        |   Y   | 98,522    |\n| sorted_list_count     |       | 1,666,666 |\n| sorted_list_add       |   Y   | 121,951   |\n| sorted_list_left_pop  |   Y   | 20,080    |\n| sorted_list_right_pop |   Y   | 9,891     |\n| sorted_set_is_member  |       | 666,666   |\n| sorted_set_count      |       | 1,428,571 |\n| sorted_set_add        |   Y   | 83,333    |\n| sorted_set_left       |   Y   | 40,160    |\n| sorted_set_right      |   Y   | 13,793    |\n| sorted_set_delete     |   Y   | 27,548    |\n\n## License\n\n```text\nMIT License\n\nCopyright (c) 2020-2023 LEI Zongmin \u003cleizongmin@gmail.com\u003e\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleizongmin%2Fsimpledb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleizongmin%2Fsimpledb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleizongmin%2Fsimpledb/lists"}