Repository navigation
Move to the Cypher compiler 0.56.0, and name a $-named CaseInsensitive property's lowercased copy as the lookup reads it (#615) - #620
Merged
Conversation
…r's name on SQLite and Oracle, read it where the node holds it in each fill, and fill it in again on each ensure (drivine-cypher-spec#355)
… (drivine-cypher-spec#355)
…functions' version 3, and the golden statements Drivine for TypeScript writes with it The compiler names a dollar-named property's lowercased copy on Postgres too (drivine-cypher-spec#539), so the two dollar-named tests that skipped Postgres run there.
…52, and give the dollar-named uniqueness test ids of its own The native SQLite extension refuses \R, which steps 6 and 17 of "A regular expression's escapes and classes" use. The uniqueness test's u1 was found, by id alone, by the patch test's look at what the store holds.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #615
Moves drivine-python to the Cypher compiler 0.56.0 and its spec. It also makes this library's half of liberation-data/drivine-cypher-spec#355, whose module half, the Postgres write function, ships in 0.56.0.
The #355 fix
A property named with a leading
$, such asAnnotated[str, GraphProperty("$mail"), CaseInsensitive()], is held as$$mailon the SQL stores. Every lookup, and the ignore-case index, reads its lowercased copy under the user's name,__drivine.lower.$mail. Before this change the copy wasn't written there:__drivine.lower.$$mail.lower_nodewas given the raw name, so it found no value and wrote no copy.Once an ignore-case index or constraint was ensured,
eq_ignore_caseon such a property found nothing, and a uniqueness constraint over it was never enforced.What changes:
user_keysits besideheld_keyand undoes it.lower_noderead the held key and name the copy for the user's name.lower_copies.of(property).LowerCopyCatalogleaves a$-named property out of the record the schema planner reads, so every ensure fills its copy in again. The sync mirror follows.docs/06and thelower_copies.ofdocstring are updated.The move to 0.56.0
drivine-cypher-compiler==0.56.0in every extra, anduv.lockchanges only the compiler.tests/cypheris the spec at v0.56.0 (scripts/sync_cypher_spec.py).tests/goldenis Drivine for TypeScript's at liberation-data/drivine@d193c87c, the merge of #921 (scripts/sync_golden.py).HOST_VERSIONinsqlite_extension.pyis now 3, or the load check would refuse the 0.56.0 extension. Its unit test follows.UNMERGED_539skips are gone from the dollar-named tests, since 0.56.0 carries drivine-cypher-spec#539.\R: steps 6 and 17 of "A regular expression's escapes and classes", new in v0.56.0, use\R, which the native SQLite extension refuses (drivine-cypher-spec#352). They're held on SQLite inHELD, so each is checked to fail as it does until the extension answers it.Checks
The whole suite ran through the lock:
uv run pytest -q, on Postgres, SQLite, Neo4j, Memgraph and FalkorDB: 10,675 passed, 835 skipped, 0 failed.ORACLE_TESTS=true uv run pytest -q -k oracle: 3,151 passed, 130 skipped, 0 failed.The container-free checks pass too: ruff, ruff format, pyright, the unasync check, and 3,258 unit tests.
Flagged, filed separately:
u1, and the file'sstored(pm, id)helper looks a node up by id across all labels. That test now has ids of its own. The helper itself is Value-layout tests' stored(pm, id) finds nodes of other labels with the same id, so the async and sync files fail when run together #618, and it already fails on main when the async and sync value-layout files run together.Review: 2 passes on the #355 port, last CLEAN; 1 pass on the repin, the hold and the test ids, CLEAN