Skip to content

salamaaya/extended-sql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Extended SQL

A simple query processor for EMF Queries, allowing aggregation over the same group.

Usage

  • Install requirements:
pip install -r requirements.txt
  • To run an ESQL query:
python run.py [-v] [-o outputfile.table] [example.esql]
  • If the -v option is provided, verbose output will be printed, such as lexing and parsing.

  • If the -o option is provided, you must give an output file name, and the generated table will be written to the file, rather than stdout.

  • example.esql is an optional argument, if it is provided, input will be read from the file. Otherwise, you are asked to provide valid esql input. To terminate input, simply type "done".

  • If no file is provided as argument, you will get the following output when run:

1. ESQL
2. Phi Operator

If you choose 1, type the ESQL query and type "done" when you're done. This is equivalent to putting the query in a .esql file. If you press 2, you will be asked to provide the 6 differen arguments to Phi.

  • Note: taking in ESQL input is preferred and heavily tested.

Testing

cd test
./test.sh
  • Note: ESQl and SQL examples can be found under the examples/ folder.

References

The lexer and parser were inspired by the examples at https://www.dabeaz.com/ply/ply.html#ply_nn9

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published