docs: the bare pattern shorthand takes what a MATCH pattern takes - #1756
Draft
imilinovic wants to merge 1 commit into
Draft
docs: the bare pattern shorthand takes what a MATCH pattern takes#1756imilinovic wants to merge 1 commit into
imilinovic wants to merge 1 commit into
Conversation
The page stated two rules that no longer hold: that the shorthand's pattern cannot introduce names of its own, and that it holds a pattern and nothing else so a filter needs the `MATCH` form. It now takes a variable it declares itself, a trailing `WHERE`, a comma-separated list, a named path and a lone node. The worked example is the filter the old text used to send to the `MATCH` form, written as the shorthand, with output from the page's own dataset. `COLLECT` still has no shorthand.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Release note
The bare pattern shorthand of
EXISTS { }andCOUNT { }now accepts everything aMATCHpatternaccepts — a variable it declares itself, a trailing
WHERE, a comma-separated pattern list, a namedpath, and a pattern holding only a node. The page previously stated the opposite on both counts.
Related product PRs
memgraph/memgraph#4707
Checklist:
bugfixorfeaturelabel, based on the product PR type you're documentingquerying/subquery-expressionsneeded changing. The Patterns in expressions passagein
querying/differences-in-cypher-implementationssays only that the constructs "accept abare pattern", which stays true, so it is untouched.
Notes for the reviewer
Two sentences in The bare pattern shorthand were false as written:
MATCHform"The worked example is the very filter the old text sent to the
MATCHform, rewritten as theshorthand. Its output was produced by running the query against this page's own Dataset queries
block on a build of memgraph/memgraph#4707, and the page's pre-existing example was re-run against
the same dataset to confirm its documented output is unchanged.
Base is
main, notrelease/3.13.pages/querying/subquery-expressions.mdxexists onmainand not on
release/3.13, so a PR against the release branch would create the file rather thancorrect the live text. There is no
release/3.14branch.