Skip to content

feat: address downstream API feedback and fix binding bugs#30

Merged
dylanbstorey merged 2 commits intomainfrom
feature/investigate-issues
Mar 17, 2026
Merged

feat: address downstream API feedback and fix binding bugs#30
dylanbstorey merged 2 commits intomainfrom
feature/investigate-issues

Conversation

@dylanbstorey
Copy link
Contributor

Summary

Implements 6 feature requests from downstream consumer feedback (Clotho graph layer) and fixes 3 bugs discovered during deep investigation of Rust/Python binding parity.

Parser & Core (C)

  • Bare undirected match syntax: (a)--(b), -->, <-- now parse and execute correctly
  • Undirected match direction fix: -[]- and -- now query both edge directions (was silently forward-only)
  • Leading-zero string preservation: "02134" stored as text no longer coerced to integer 2134 on RETURN

Rust Bindings

  • PropertyValue enum: Typed upsert API — upsert_node("n", [("score", PropertyValue::Float(0.87))], "T") — backward-compatible with &str pairs
  • Value accessors: .get(key), .get_index(i), Index<&str> for ergonomic Object/Array access
  • Edge query helpers: get_edges_from(), get_edges_to(), get_edges_by_type(), get_node_edges()
  • Graph::query_params(): One-liner parameterized query convenience method
  • GraphStats rename: nodes/edgesnode_count/edge_count (breaking)

Python Bindings

  • Edge query helpers: get_edges_from(), get_edges_to(), get_edges_by_type()
  • BFS/DFS fix: Was returning empty [] — missing extract_algo_array() unwrap
  • APSP fix: Same column_0 unwrap bug
  • Stats rename: Keys updated to node_count/edge_count

Breaking Changes

  • GraphStats.nodesGraphStats.node_count, GraphStats.edgesGraphStats.edge_count (Rust)
  • Python stats() dict keys: "nodes""node_count", "edges""edge_count"
  • PropertyValue replaces AsRef<str> bound on upsert value generics (source-compatible for &str callers)

Test plan

  • 849/849 C unit tests pass
  • 226/226 Python tests pass (6 skipped — optional deps)
  • 14/14 Rust unit + 173/173 integration + 26/26 doc tests pass
  • New functional test: tests/functional/100_undirected_match_test.sql
  • Regression: subtraction expressions, numeric comparisons still work
  • Scanner conflicts unchanged: 4 S/R, 3 R/R

Dylan Bobby Storey added 2 commits March 17, 2026 09:05
Implements 6 feature requests from downstream consumer (Clotho) and fixes
3 bugs discovered during deep investigation of Rust/Python binding parity.

Parser & Transform:
- Add bare undirected match syntax: (a)--(b), -->, <--
- Fix undirected match to query both edge directions (was forward-only)
- Remove `-` from scanner operator regex so `--` tokenizes correctly
- Fix leading-zero string coercion in create_property_agtype_value()

Rust bindings:
- Add PropertyValue enum for typed upsert (backward-compatible with &str)
- Add Value::get(key), get_index(i), Index<&str> for ergonomic access
- Add get_edges_from/to/by_type/node_edges edge query helpers
- Add Graph::query_params() one-liner convenience method
- Rename GraphStats fields: nodes->node_count, edges->edge_count

Python bindings:
- Add get_edges_from/to/by_type edge query helpers
- Fix BFS/DFS returning empty (missing extract_algo_array unwrap)
- Fix APSP returning empty (same column_0 unwrap bug)
- Rename stats() keys to node_count/edge_count
- Remap cache status keys for consistency

All tests pass: 849 C unit, 226 Python, 213 Rust.
@dylanbstorey dylanbstorey merged commit f2baa24 into main Mar 17, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant