{"id":13672077,"url":"https://github.com/dyedgreen/cqlite","last_synced_at":"2025-04-13T04:13:36.047Z","repository":{"id":47511920,"uuid":"402209532","full_name":"dyedgreen/cqlite","owner":"dyedgreen","description":"Embedded graph database","archived":false,"fork":false,"pushed_at":"2023-06-12T20:51:46.000Z","size":182,"stargazers_count":115,"open_issues_count":2,"forks_count":7,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-13T04:13:19.122Z","etag":null,"topics":["cypher-query-language","graph","graph-database","rust"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/cqlite","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/dyedgreen.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2021-09-01T21:37:15.000Z","updated_at":"2025-03-29T14:01:20.000Z","dependencies_parsed_at":"2024-07-27T18:20:30.366Z","dependency_job_id":null,"html_url":"https://github.com/dyedgreen/cqlite","commit_stats":{"total_commits":118,"total_committers":1,"mean_commits":118.0,"dds":0.0,"last_synced_commit":"7c414332de87563fb34911d89556e6d10556a4ac"},"previous_names":["dyedgreen/gqlite"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dyedgreen%2Fcqlite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dyedgreen%2Fcqlite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dyedgreen%2Fcqlite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dyedgreen%2Fcqlite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dyedgreen","download_url":"https://codeload.github.com/dyedgreen/cqlite/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248661720,"owners_count":21141451,"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":["cypher-query-language","graph","graph-database","rust"],"created_at":"2024-08-02T09:01:25.971Z","updated_at":"2025-04-13T04:13:36.016Z","avatar_url":"https://github.com/dyedgreen.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# CQLite\n\n[![crates.io](https://img.shields.io/crates/v/cqlite.svg)](https://crates.io/crates/cqlite)\n[![Released API docs](https://docs.rs/cqlite/badge.svg)](https://docs.rs/cqlite)\n[![CI](https://github.com/dyedgreen/cqlite/actions/workflows/ci.yml/badge.svg)](https://github.com/dyedgreen/cqlite/actions/workflows/ci.yml)\n[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)\n\nAn embedded graph database implemented in Rust. This is currently a pre-release. It has not been\nextensively tested with 'real-world work-loads', and the file-format and API are not yet stabilized.\n\nThe longer term goal is to create an in-process graph database with a stable on-disk format and\nsupport for a wide range of programming languages, providing a native Rust API, as well as a C FFI interface.\n\n```rust\nuse cqlite::Graph;\n\nlet graph = Graph::open_anon()?;\n\nlet mut txn = graph.mut_txn()?;\nlet edge: u64 = graph.prepare(\n        \"\n        CREATE (a:PERSON { name: 'Peter Parker' })\n        CREATE (b:PERSON { name: 'Clark Kent' })\n        CREATE (a) -[e:KNOWS]-\u003e (b)\n        RETURN ID(e)\n        \"\n    )?\n    .query_map(\u0026mut txn, (), |m| m.get(0))?\n    .next()\n    .unwrap()?;\ntxn.commit()?;\n\nlet name: String = graph.prepare(\n        \"\n        MATCH (p:PERSON) \u003c-[e:KNOWS]- (:PERSON)\n        WHERE ID(e) = $edge\n        RETURN p.name\n        \"\n    )?\n    .query_map(\u0026mut graph.txn()?, (\"edge\", edge), |m| m.get(0))?\n    .next()\n    .unwrap()?;\nassert_eq!(\"Clark Kent\", name);\n```\n\n\n## Architecture Overview\n\n\n### Parser :: `src/parser`\n\nPEG grammar and parser for a subset of the `CYPHER` graph query language\n\n### Query Planner :: `src/planner`\n\nTransforms a parsed query ast into a logical query plan. Performs some\noptimizations on the query plan.\n\n### Byte-Code Interpreter :: `src/runtime`\n\nDefines a simple 'byte' code (`Instructions`) and can execute those against a given\ndatabase, as well as generate instructions for a given query plan.\n\n### Storage Backend :: `src/store`\n\nUses a disc-backed `btree` to provide basic storage, iteration and lockup for nodes and\nedges.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdyedgreen%2Fcqlite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdyedgreen%2Fcqlite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdyedgreen%2Fcqlite/lists"}