Thanks to visit codestin.com
Credit goes to github.com

Skip to content

A Modern SQL frontend based on SQL16 with extensions for streaming, graph, rich types, etc, including parser, resolver, rewriters, etc.

License

Notifications You must be signed in to change notification settings

manticore-projects/sql

 
 

Repository files navigation

Java SQL:2016 Language Frontend

Visit our Website.

Build Status Maven Central Javadocs

A Modern SQL frontend based on the SQL16 Standard with extensions for streaming, graph, rich types.

* Comprehensive support for statements:

	- QUERY: ``SELECT ...``
	- DML: ``INSERT ... INTO ...`` ``UPDATE ...`` ``MERGE ... INTO ...`` ``DELETE ... FROM ...``
	- DDL: ``CREATE ...`` ``ALTER ...`` ``DROP ...``

* Nested Expressions (e.g. Sub-Selects)
* ``WITH`` clauses
* De-Parser for a Statement AST Node, which writes a SQL from Java Objects
* Rewriter
* Linter

How to use it

  1. Maven Repository

    <dependency>
    		<groupId>com.facebook.presto</groupId>
    		<artifactId>presto-coresql</artifactId>
    		<version>0.1</version>
    </dependency>
  2. Parsing and Unparsing a SQL Statement

    import com.facebook.coresql.parser.AstNode;
    import com.facebook.coresql.parser.ParserHelper;
    import com.facebook.coresql.parser.Unparser;
    
    String sqlStr = "select 1 from dual where a=b";
    AstNode ast = ParserHelper.parseStatement(sqlStr);
    String unparsedSqlStr = Unparser.unparse(ast);
  3. Compile latest version from source

    git clone https://github.com/kaikalur/sql.git
    cd sql
    mvn install

About

A Modern SQL frontend based on SQL16 with extensions for streaming, graph, rich types, etc, including parser, resolver, rewriters, etc.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 67.8%
  • PLSQL 18.1%
  • CSS 4.9%
  • C++ 4.6%
  • XSLT 2.0%
  • Shell 0.9%
  • Other 1.7%