{"id":26324832,"url":"https://github.com/adrocodes/adrodb","last_synced_at":"2025-10-06T19:44:34.585Z","repository":{"id":281966899,"uuid":"614613433","full_name":"adrocodes/adrodb","owner":"adrocodes","description":"A super simple key-value store using SQLite. ","archived":false,"fork":false,"pushed_at":"2023-03-21T08:55:15.000Z","size":34,"stargazers_count":5,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-10T17:20:23.533Z","etag":null,"topics":["key-value-store","rust","sqlite"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/adrocodes.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":"2023-03-16T00:27:00.000Z","updated_at":"2024-07-03T21:03:52.000Z","dependencies_parsed_at":"2025-03-12T04:45:34.584Z","dependency_job_id":null,"html_url":"https://github.com/adrocodes/adrodb","commit_stats":null,"previous_names":["adrocodes/adrodb"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/adrocodes/adrodb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrocodes%2Fadrodb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrocodes%2Fadrodb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrocodes%2Fadrodb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrocodes%2Fadrodb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adrocodes","download_url":"https://codeload.github.com/adrocodes/adrodb/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adrocodes%2Fadrodb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276368198,"owners_count":25629974,"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","status":"online","status_checked_at":"2025-09-22T02:00:08.972Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["key-value-store","rust","sqlite"],"created_at":"2025-03-15T18:28:57.862Z","updated_at":"2025-09-22T08:11:39.961Z","avatar_url":"https://github.com/adrocodes.png","language":"Rust","readme":"# adrodb\n\n**Don't use this for anything serious**\n\n---\n\nadrodb is a really simple structured key-value storage using sqlite because I asked ChatGPT for Rust ideas.\n\nYou'll be able to create tables of data to structure your data and store simple values. Keys are treated as the primary key and must be unique.\n\nThis package wraps [rusqlite](https://github.com/rusqlite/rusqlite) to do all of its operations. Since it wraps this package you are free to create a in memory or database connection. Allowing you to persist data if required, or simply use it to move data between different processes.\n\nThe table is configured to allow any valid value to be `set` and `get`. See the example below for more information.\n\n## Example\n\n```rust\nuse adrodb::Table;\nuse rusqlite::{Connection, Result, Error};\n\nfn main() -\u003e Result\u003c(), Error\u003e {\n  let conn = Connection::open_in_memory()?;\n  let table = Table::new(\"users\");\n\n  // Creates a new Table in the database if it doesn't exist\n  let db = table.create(\u0026conn)?;\n  \n  db.set(\"beans\", \"on toast\")?;\n\n  let beans = db.get::\u003cString\u003e(\"beans\")?;\n\n  assert_eq!(\"on toast\", beans);\n}\n```\n\nThe value passed to `.set` must impl the [`ToSql`](https://docs.rs/rusqlite/latest/rusqlite/trait.ToSql.html) trait from rusqlite.\n\nThe generic used the `.get` method must impl to [`FromSql`](https://docs.rs/rusqlite/latest/rusqlite/types/trait.FromSql.html) type from rusqlite.\n\nYou can skip the `Table::new()` and `.create()` method if you know the table has already been created. That will allow you to do:\n\n```rust\nuse adrodb::Table;\nuse rusqlite::{Connection, Result, Error};\n\nfn main() -\u003e Result\u003c(), Error\u003e {\n  let conn = Connection::open(\"persistent.db\")?;\n  let db = Table::existing(\"users\", \u0026conn);\n  \n  db.set(\"beans\", \"on toast\")?;\n\n  let beans = db.get::\u003cString\u003e(\"beans\")?;\n\n  assert_eq!(\"on toast\", beans);\n}\n```\n\nThe `Table::existing` method will not do a check if the table does exist however, the `set` and `get` methods will fail as a result.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadrocodes%2Fadrodb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadrocodes%2Fadrodb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadrocodes%2Fadrodb/lists"}