Commit be27246
Feature/backlog work (#2)
* Add Dijkstra shortest path and degree centrality graph algorithms
- dijkstra(source, target) finds shortest path between nodes
- degreeCentrality() calculates in/out/total degree for all nodes
- Modularize graph algorithm code into separate files for maintainability
- Add Python and Rust bindings with full test coverage
* Add Leiden community detection to Python bindings
- leiden_communities() method uses graspologic for high-quality community detection
- to_rustworkx() method exports graph to rustworkx PyDiGraph format
- Optional dependencies: pip install graphqlite[leiden] or graphqlite[rustworkx]
* Add graph algorithms, fix OPTIONAL MATCH transformation, add modulo operator
Graph Algorithms:
- Eigenvector centrality with power iteration
- Betweenness centrality
- Closeness centrality
- Triangle counting and clustering coefficient
- Connected components (weak and strong)
- All-pairs shortest path (Floyd-Warshall)
- A* pathfinding with heuristics
- K-nearest neighbors
- Louvain community detection
- Graph similarity (Jaccard, cosine, overlap)
- BFS/DFS traversal
Bug Fixes:
- Fix OPTIONAL MATCH transformation generating duplicate LEFT JOINs by checking
sql_builder.from_clause and join_clauses in addition to sql_buffer
- Fix eigenvector centrality test using symmetric graph that produces uniform scores
New Features:
- Add modulo operator (%) support to Cypher expressions
Bindings:
- Refactor Python bindings into modular graph/ and algorithms/ packages
- Refactor Rust bindings into modular graph/ and algorithms/ modules
- Add comprehensive test coverage for new algorithms
* Implement REMOVE clause for property and label removal
Add executor support for REMOVE clause operations:
- Remove node properties (REMOVE n.prop)
- Remove multiple properties (REMOVE n.a, n.b)
- Remove node labels (REMOVE n:Label)
- Remove edge properties (REMOVE r.prop)
Includes schema functions for property/label deletion and
comprehensive tests across CUnit, functional SQL, Rust, and
Python bindings.
* Return empty array for zero-row MATCH results
MATCH queries with no matching rows now return [] instead of a
success message, aligning with standard Cypher semantics. Modification
queries (CREATE, DELETE, etc.) without RETURN clauses continue to
show statistics.
Also fixes REMOVE tests to check for null string values rather than
NULL pointers.
* Implement IN membership operator for list checking
Add support for `expr IN [list]` syntax to check if a value exists
in a list:
- `5 IN [1, 2, 5, 10]` returns true
- `'x' IN ['a', 'b', 'c']` returns false
- `MATCH (n) WHERE n.status IN ['active', 'pending'] RETURN n`
Uses %dprec to disambiguate between IN operator in list literals
vs list comprehension syntax `[x IN list]`.
Includes tests for Python and Rust bindings.
* Implement STARTS WITH, ENDS WITH, CONTAINS string operators
Add infix string matching operators as specified by OpenCypher:
- STARTS WITH: checks if string begins with prefix
- ENDS WITH: checks if string ends with suffix
- CONTAINS: checks if string contains substring
Transform to SQL:
- STARTS WITH → str LIKE prefix || '%'
- ENDS WITH → str LIKE '%' || suffix
- CONTAINS → INSTR(str, substr) > 0
Also supports function call syntax (contains(), startsWith(), endsWith())
for backward compatibility.
* Fix OPTIONAL MATCH, UNWIND+CREATE, and array index bugs
- OPTIONAL MATCH now correctly uses LEFT JOIN semantics instead of
producing cartesian products. Routes multi-MATCH queries through
the transform pipeline to properly process all clauses.
- UNWIND+CREATE now iterates correctly over list elements instead
of only creating a single node.
- Array index syntax (list[0]) now supported in expressions via
new subscript operator handling in the parser and transform.
- Added comprehensive test files for expanded Cypher coverage
(expressions, clauses, patterns, functions, predicates).
* Bump version to 0.1.0-beta.4
---------
Co-authored-by: Dylan Storey <dstorey@gmail.com>1 parent b6c9dd7 commit be27246
File tree
152 files changed
+20497
-2113
lines changed- .metis
- archived
- backlog
- bugs
- features
- tech-debt
- strategies/NULL/initiatives
- GQLITE-I-0010
- GQLITE-I-0011
- GQLITE-I-0014
- GQLITE-I-0016
- GQLITE-I-0017
- GQLITE-I-0021
- backlog
- bugs
- features
- tech-debt
- strategies/NULL/initiatives/GQLITE-I-0022
- bindings
- python
- src/graphqlite
- algorithms
- graph
- tests
- rust
- src
- algorithms
- graph
- tests
- src
- backend
- executor
- parser
- transform
- include
- executor
- parser
- tests
- functional
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
152 files changed
+20497
-2113
lines changedLines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
47 | 49 | | |
48 | 50 | | |
49 | 51 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| 71 | + | |
| 72 | + | |
71 | 73 | | |
72 | 74 | | |
73 | 75 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
45 | 47 | | |
46 | 48 | | |
47 | 49 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
45 | 47 | | |
46 | 48 | | |
47 | 49 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
45 | 47 | | |
46 | 48 | | |
47 | 49 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
45 | 47 | | |
46 | 48 | | |
47 | 49 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
45 | 47 | | |
46 | 48 | | |
47 | 49 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
45 | 47 | | |
46 | 48 | | |
47 | 49 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| 75 | + | |
| 76 | + | |
75 | 77 | | |
76 | 78 | | |
77 | 79 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
| 62 | + | |
61 | 63 | | |
62 | 64 | | |
63 | 65 | | |
| |||
0 commit comments