百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
G

graphqlite

> 数据库
开源

一个 SQLite 扩展,它添加了基于 Cypher 查询语言支持和内置图形算法的图数据库功能。

399 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

一个 SQLite 扩展,它添加了基于 Cypher 查询语言支持和内置图形算法的图数据库功能。

GraphQLite

An SQLite extension that adds graph database capabilities using the Cypher query language.

Store and query graph data directly in SQLite—combining the simplicity of a single-file, zero-config embedded database with Cypher's expressive power for modeling relationships.

Installation

bash
brew install graphqlite       # macOS/Linux (Homebrew)
pip install graphqlite        # Python
cargo add graphqlite          # Rust

Quick Start

python
from graphqlite import Graph

g = Graph(":memory:")
g.upsert_node("alice", {"name": "Alice", "age": 30}, label="Person")
g.upsert_node("bob", {"name": "Bob", "age": 25}, label="Person")
g.upsert_edge("alice", "bob", {"since": 2020}, rel_type="KNOWS")

# Query with Cypher
results = g.query("MATCH (a:Person)-[:KNOWS]->(b) RETURN a.name, b.name")

# Built-in graph algorithms
g.pagerank()
g.louvain()
g.dijkstra("alice", "bob")

Features

  • Cypher queries — MATCH, CREATE, MERGE, SET, DELETE, WITH, UNWIND, RETURN
  • Graph algorithms — PageRank, Louvain, Dijkstra, BFS/DFS, connected components, and more
  • Zero configuration — Works with any SQLite database, no server required
  • Multiple bindings — Python, Rust, and raw SQL interfaces

openCypher Conformance

GraphQLite is validated against the official openCypher Technology Compatibility Kit (TCK) — the canonical conformance suite for the Cypher query language. Current coverage:

Area Scenarios Passing
Overall 3,876 97.7%
Expressions (temporal, lists, maps, comparison, literals, …) 2,599 98.0%
Clauses (MATCH, WITH, MERGE, CREATE, SET, DELETE, UNWIND, …) 1,247 97.2%
Use cases (triadic selection, subgraph counting) 30 100%

Run it yourself with angreal test tck. The remaining gaps are tracked in docs/testing/semantic-coverage-matrix.md and concentrate in a few deep areas (DST-aware timezone arithmetic, nested existential subqueries, multi-row MERGE). Booleans, strings, null handling, CREATE/SET/DELETE/REMOVE, UNION, and SKIP/LIMIT are at 100%.

Documentation

Full Documentation — Tutorials, how-to guides, and API reference

Examples

bash
# SQL tutorials
sqlite3 < examples/sql/01_getting_started.sql

# GraphRAG with HotpotQA dataset
cd examples/llm-graphrag
uv sync && uv run python ingest.py
uv run python rag.py "Were Scott Derrickson and Ed Wood of the same nationality?"

License

MIT

Issues· 2 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Ccommunity-detectioncyphergraph-analyticsgraph-database

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类数据库
定价开源

> 相关工具

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库