Drop drivine_contains at the spec bump that refuses parameter maps in matched patterns

Open Beginner friendly
#504 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
76/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Active
Tech stack
python
Domain
backend

Research direction

Read the listed definitions in drivine/backend/sqlite/sqlite_graph.py, sqlite_cypher_functions.py, and sqlite_cypher_values.py, then find tests that call drivine_contains or contains. Remove the constant, registration, function, documentation line, and any now-unused value helper or tests. Done when no references remain and the shared spec sync handles the matched-pattern refusal.

Written by the indexing model from the issue text.

Description

Follows liberation-data/drivine-cypher-spec#194, which makes the compiler refuse a parameter's map as a matched pattern's properties (MATCH (n $props)), as Neo4j does. That was the only Cypher that compiled to drivine_contains, so once this library takes the spec release with #194, nothing calls the function.

What to drop at that bump:

  • CONTAINS = "drivine_contains" in drivine/backend/sqlite/sqlite_graph.py:36
  • add(g.CONTAINS, 2, contains) and def contains in drivine/backend/sqlite/sqlite_cypher_functions.py:64 and :103, and the doc line at :8
  • contains in drivine/backend/sqlite/sqlite_cypher_values.py:214, if nothing else calls it
  • any test that calls them

Nothing to port: the refusal is the shared compiler's, and its refusals.yaml case "Parameter map in a matched pattern" comes with the spec sync.

Dominant language
Python
Stars
2
Forks
0
Avg merge
3h 40m
Merged PRs (30d)
219

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from liberation-data/drivine-python

All issues in liberation-data/drivine-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.