vesoft-inc / nebula

A distributed, fast open-source graph database featuring horizontal scalability and high availability
https://nebula-graph.io
Apache License 2.0
10.8k stars 1.2k forks source link

Can nGQL provide ANTLR syntax file? #3418

Open melin opened 2 years ago

melin commented 2 years ago

Can nGQL provide ANTLR syntax file? Convenient custom platform to do some SQL processing

For big data applications, mainly Java technology, antlr is relatively simple for developers to understand. The syntax file is submitted here: https://github.com/antlr/grammars-v4

cangfengzhs commented 2 years ago

I am not very clear about the purpose of providing antlr files. Is it just for developers to understand ngql syntax or will you use antlr to parse ngql?

melin commented 2 years ago

I am not very clear about the purpose of providing antlr files. Is it just for developers to understand ngql syntax or will you use antlr to parse ngql?

use antlr to parse ngql

Shylock-Hg commented 2 years ago

I don't know the purpose to parse nGQL. Could you detail the scene.

mahpate commented 2 years ago

I am looking for same is to write a service which initially parse user nGQL statements to parse errors etc. beforehand. I want to limit exposer by allowing only limited nGQL keywords to end user. In this way I can separate out the DB layer and interface which I want to expose to end users.

wey-gu commented 2 years ago

I am looking for same is to write a service which initially parse user nGQL statements to parse errors etc. beforehand. I want to limit exposer by allowing only limited nGQL keywords to end user. In this way I can separate out the DB layer and interface which I want to expose to end users.

Dear Mahpate, I wonder if leveraging RBAC to provide users in roles with limited permission can fulfill your requirement?

mahpate commented 2 years ago

We have different RBAC service responsible for RBAC and access control, our control plane kind of common for underlying stores, currently we are already supporting columnar store, we want to reuse that layer of interface and plugin new graph store undelying.

jievince commented 2 years ago

Since nebula itself is mostly written in C + + , it's unlikely that Nebula will introduce third-party dependencies in the Java family of Antlr. If you want to use Antlr in your application, you can write your own antlr parser, after all, the current syntax of ngql is very simple.