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

Suggest to update the match grammar #845

Closed
study-day opened this issue Aug 17, 2021 · 4 comments
Closed

Suggest to update the match grammar #845

study-day opened this issue Aug 17, 2021 · 4 comments

Comments

@study-day
Copy link
Collaborator

https://docs.nebula-graph.com.cn/master/3.ngql-guide/7.general-query-statements/2.match/

MATCH <pattern> [<WHERE clause>] RETURN <output>

https://docs.nebula-graph.com.cn/2.0.1/3.ngql-guide/8.clauses-and-options/with/
example2

 MATCH p=(v:player{name:"Tim Duncan"})--() \
        WITH nodes(p) AS n \
        UNWIND n AS n1 \
        RETURN DISTINCT n1;

In Example2 'with', 'unwind' is not a part of pattern, so should the syntax of match be added?

@whitewum
Copy link
Contributor

WITH is not a part of MATCH

@study-day
Copy link
Collaborator Author

study-day commented Aug 18, 2021

https://docs.nebula-graph.com.cn/master/3.ngql-guide/1.nGQL-overview/3.graph-patterns/
根据文档 WITH 和UNWIND 不是 patterns 的一部分,如果是的话请在3.graph-patterns中补充。所以在应该在match的语法中表示出来,说明应该怎么用,不然后面大家都不知道为什么下面这段官方查询示例时合法的

 MATCH p=(v:player{name:"Tim Duncan"})--() \
        WITH nodes(p) AS n \
        UNWIND n AS n1 \
        RETURN DISTINCT n1;

@study-day study-day reopened this Aug 18, 2021
@study-day
Copy link
Collaborator Author

This is just a suggestion, it’s up to you to decide what to do

@whitewum
Copy link
Contributor

WITH 和UNWIND 不是graph patterns的一部分,它们是语法结构的一部分。

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

No branches or pull requests

2 participants