public final class CCJSqlParserUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static CCJSqlParser |
newParser(InputStream is) |
static CCJSqlParser |
newParser(InputStream is,
String encoding) |
static CCJSqlParser |
newParser(String sql) |
static Statement |
parse(InputStream is) |
static Statement |
parse(InputStream is,
String encoding) |
static Statement |
parse(Reader statementReader) |
static Statement |
parse(String sql) |
static Statement |
parse(String sql,
Consumer<CCJSqlParser> consumer)
Parses an sql statement while allowing via consumer to configure the used parser before.
|
static Node |
parseAST(String sql) |
static Expression |
parseCondExpression(String condExpr)
Parse an conditional expression.
|
static Expression |
parseCondExpression(String condExpr,
boolean allowPartialParse)
Parse an conditional expression.
|
static Expression |
parseExpression(String expression) |
static Expression |
parseExpression(String expression,
boolean allowPartialParse) |
static Statement |
parseStatement(CCJSqlParser parser) |
static Statements |
parseStatements(CCJSqlParser parser) |
static Statements |
parseStatements(String sqls)
Parse a statement list.
|
static void |
streamStatements(StatementListener listener,
InputStream is,
String encoding) |
public static Statement parse(Reader statementReader) throws JSQLParserException
JSQLParserExceptionpublic static Statement parse(String sql) throws JSQLParserException
JSQLParserExceptionpublic static Statement parse(String sql, Consumer<CCJSqlParser> consumer) throws JSQLParserException
CCJSqlParserUtil.parse("select * from [mytable]", parser -> parser.withSquareBracketQuotation(true));
sql - consumer - JSQLParserExceptionpublic static CCJSqlParser newParser(String sql)
public static CCJSqlParser newParser(InputStream is) throws IOException
IOExceptionpublic static CCJSqlParser newParser(InputStream is, String encoding) throws IOException
IOExceptionpublic static Node parseAST(String sql) throws JSQLParserException
JSQLParserExceptionpublic static Statement parse(InputStream is) throws JSQLParserException
JSQLParserExceptionpublic static Statement parse(InputStream is, String encoding) throws JSQLParserException
JSQLParserExceptionpublic static Expression parseExpression(String expression) throws JSQLParserException
JSQLParserExceptionpublic static Expression parseExpression(String expression, boolean allowPartialParse) throws JSQLParserException
JSQLParserExceptionpublic static Expression parseCondExpression(String condExpr) throws JSQLParserException
condExpr - JSQLParserExceptionparseCondExpression(String, boolean)public static Expression parseCondExpression(String condExpr, boolean allowPartialParse) throws JSQLParserException
condExpr - allowPartialParse - false: needs the whole string to be processed.JSQLParserExceptionparseCondExpression(String)public static Statement parseStatement(CCJSqlParser parser) throws JSQLParserException
parser - JSQLParserExceptionpublic static Statements parseStatements(String sqls) throws JSQLParserException
JSQLParserExceptionpublic static Statements parseStatements(CCJSqlParser parser) throws JSQLParserException
parser - JSQLParserExceptionpublic static void streamStatements(StatementListener listener, InputStream is, String encoding) throws JSQLParserException
JSQLParserExceptionCopyright © 2004–2021 JSQLParser. All rights reserved.