Show HN: SQLite Graph Ext – Graph database with Cypher queries (alpha) https://ift.tt/eSW3UTk
Show HN: SQLite Graph Ext – Graph database with Cypher queries (alpha) I've been working on adding graph database capabilities to SQLite with support for the Cypher query language. As of this week, both CREATE and MATCH operations work with full relationship support. Here's what it looks like: import sqlite3 conn = sqlite3.connect(":memory:") conn.load_extension("./libgraph.so") conn.execute("CREATE VIRTUAL TABLE graph USING graph()") # Create a social network conn.execute("""SELECT cypher_execute(' CREATE (alice:Person {name: "Alice", age: 30}), (bob:Person {name: "Bob", age: 25}), (alice)-[:KNOWS {since: 2020}]->(bob) ')""") # Query the graph with relationship patterns conn.execute("""SELECT cypher_execute(' MATCH (a:Person)-[r:KNOWS]->(b:Person) WHERE a.age > 25 RETURN a, r, b ')""") The interesting part was building the complete execution pi...