age
age copied to clipboard
Created support for `MATCH` and `RETURN` queries using backslash command
Changes
MATCH, WHERE, WITH, and RETURN queries are made able to be parsed.
- Modified tokens in 'cypher.l'
- Modified grammars in 'cypher.y' grammars
- Created headers, objects, and executables by making
Makefile
Instructions
- Have Posgres 15 installed
- Create a database and start the pgsql server
- From the age repo directory, run the following lines of code
export PATH={location of pgsql-15}/bin:$PATH
export PGDATA={location of pgsql-15}/bin/data
export USE_PGXS=TRUE
flex -b -Cfe -p -p -o 'cypher.c' cypher.l
bison -d cypher.y
make
- Run
./agesql - Enter a backslash
\followed by a newline to start typing in Cypher query - End each Cypher query with a semicolon
;
Example
MATCH (n:Person {age: 22}) RETURN n.name AS name; should return:
match = true
node {
alias = n
labels = Person
property {
identifier = age
expression = 22
}
}
return = true
item {
expression = n.name
alias = name
}
where = false
with = false