Skip to content

feat: extend parameterized queries and close out dialect parity#20

Merged
dylanbstorey merged 6 commits intomainfrom
feature/bug-tranche
Feb 7, 2026
Merged

feat: extend parameterized queries and close out dialect parity#20
dylanbstorey merged 6 commits intomainfrom
feature/bug-tranche

Conversation

@dylanbstorey
Copy link
Contributor

Summary

  • Extend parameter binding to the generic transform path (OPTIONAL MATCH, WITH, UNWIND)
  • Add support for array/object JSON values in parameter parsing and binding
  • Add optional params argument to Python Graph.query() method
  • New functional tests for generic path params, list/map params, booleans, and floats
  • Update Metis project state (backlog triage, archive stale tasks)

Issues

Dylan Bobby Storey added 6 commits February 7, 2026 08:19
Replace cypher_with_params()/query_with_params() with a fluent builder
API (cypher_builder()/query_builder()) that supports individual .param()
calls and bulk .params() from JSON objects. Old methods are deprecated
with #[deprecated(since = "0.4.0")].
Neo4j and Memgraph accept optional trailing semicolons on queries.
Add two productions to the stmt rule so GraphQLite does the same.
Refactor the expression grammar to support three Cypher dialect features:

- Backtick-quoted property keys: n.`special-key`, n.`with spaces`
- Nested dot access on JSON properties: n.metadata.name, n.data.a.b.c
- Bracket chaining with string keys: n['status'], n['a']['b']
- Mixed patterns: n['metadata'].name

Grammar: move dot/bracket access from primary_expr to expr rule as
left-recursive productions (expr '.' IDENT, expr '.' BQIDENT,
expr '[' expr ']'). Remove five now-redundant primary_expr rules.
Add BQIDENT variants to remove_item for REMOVE n.`key`.

Transform: extend transform_property_access() to handle nested
AST_NODE_PROPERTY and AST_NODE_SUBSCRIPT base expressions via
json_extract(). Add string-key-to-property normalization in the
AST_NODE_SUBSCRIPT case so n['key'] maps to n.key.

Nested/bracket access is read-only (RETURN, WHERE, WITH contexts).
The angreal test python task hardcoded python3.11 which breaks on
systems using uv for Python management. Now auto-detects uv.lock in
the bindings directory and runs via `uv run python -m pytest` directly.
Falls back to python3 when uv is not present. The --python flag still
works for explicit overrides. Also update Makefile default to python3.
…on bindings

Add parameter binding for OPTIONAL MATCH, WITH, and UNWIND execution
paths. Support array/object JSON values in parameter parsing and binding.
Add optional params argument to Python Graph.query() method.

Closes #15
Refs #13
@dylanbstorey dylanbstorey merged commit a5d8e85 into main Feb 7, 2026
15 checks passed
@dylanbstorey dylanbstorey deleted the feature/bug-tranche branch February 7, 2026 16:41
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.

Parameterized Cypher API

1 participant