How to use it¶
Compile from Source Code¶
You will need to have JDK 8
or JDK 11
installed.
Build Dependencies¶
Parse a SQL Statements¶
Parse the SQL Text into Java Objects:
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);