pg-format / pgraphs

Property Graph Exchange Format (PG) converter
MIT License
18 stars 2 forks source link

Convert to/from RQL INSERT #32

Open nichtich opened 1 week ago

nichtich commented 1 week ago

Similar to Cypher CREATE. See RQL documentation.

nichtich commented 1 week ago

Here is the relevant subset of RQL grammar to express raw data (everything but: select, delete, update, restriction, functions, complex expressions):

insert     ::= 'INSERT' variables ( ':' relations)?
variables  ::= E_TYPE VARIABLE (',' E_TYPE VARIABLE)*
relations  ::= relation (',' relation)*
relation   ::= VARIABLE R_TYPE expression
expression ::= VARIABLE | constant
constant   ::= KEYWORD | STRING | FLOAT | INT
VARIABLE   ::= '[A-Z][A-Z0-9]*'
E_TYPE     ::= '[A-Z]\w*'
R_TYPE     ::= '[a-z_]+'
KEYWORD    ::= 'TRUE' | 'FALSE' | 'NULL'
STRING     ::= "'([^'\]|\\.)*'" |'"([^\"]|\\.)*\"'
FLOAT      ::= '\d+\.\d*'
INT        ::= '\d+'
nchauvat commented 6 days ago

thank you for taking a look at https://www.cubicweb.org and its Relation Query Language (RQL) !

A mapping to Cypher sounds interesting. Let me know if I can help.