Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow LIMIT subclause on all read-only clauses #194

Open
Mats-SX opened this issue Mar 1, 2017 · 0 comments
Open

Allow LIMIT subclause on all read-only clauses #194

Mats-SX opened this issue Mar 1, 2017 · 0 comments

Comments

@Mats-SX
Copy link
Member

Mats-SX commented Mar 1, 2017

CIR-2017-194

Cypher's LIMIT subclause is currently applicable to the WITH and RETURN clauses only. It would be a nice feature to be able to support LIMIT directly on MATCH as well, reducing the currently mandated WITH * to be inserted in between. Compare the following two queries for an example:

MATCH (s:Source)
WITH * LIMIT 10
CREATE (s)-[:T]->(:Target)

vs

MATCH (s:Source)
LIMIT 10
CREATE (s)-[:T]->(:Target)

I see little reason to not extend this to UNWIND as well, in order to more easily define the rule that determines where LIMIT is allowed: all read-only clauses.

LIMIT will not affect the side effects of preceding updating clauses, which makes it unfit as a subclause for them. Allowing LIMIT on all read-only clauses could make this semantics more visible.

An extension of this CIR could be to define the same rule for SKIP.

@Mats-SX Mats-SX added the CIR label Mar 1, 2017
Mats-SX added a commit to Mats-SX/openCypher that referenced this issue Mar 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants