public class SqlParser extends Object implements SqlParserConstants
Modifier and Type | Field and Description |
---|---|
Token |
jj_nt
Next token.
|
Token |
token
Current token.
|
SqlParserTokenManager |
token_source
Generated Token Manager.
|
ADD, ALL, ALTER, AND, AS, ASC, ASSIGN, ASTERISK, AVG, BETWEEN, BIGINT, BIT, BLOB, BOOLEAN, BY, CALL, CHAR, CLOB, CLOSEBRACKET, CLOSEBRAKET, CLOSEPAREN, COLLECTION_CONTAINS, COMMIT, CONCAT, COUNT, CREATE, DATE, DATE_LITERAL, DATETIME, DECIMAL, DEFAULT, DEFAULT_NULL, DELETE, DESC, DIGIT, DISTINCT, DOT, DOUBLE, DROP, EMPTY_BLOB, EMPTY_CLOB, END, EOF, EQUAL, ESC_IDENTIFIER, EXCEPTION, EXPONENT, FALSE, FLOAT, FLOATING_POINT_LITERAL, FOR_UPDATE, FROM, GREATER, GREATEREQUAL, GROUP, IDENTIFIER, IN, INDEX, INSERT, INT, INTEGER, INTEGER_LITERAL, INTO, IS, JOINPLUS, LESS, LESSEQUAL, LETTER, LIKE, LOB, LONG, LONG_LITERAL, LONGVARCHAR, MAX, MIN, MINUS, NOT, NOTEQUAL, NOTEQUAL2, NULL, NULLS_FIRST, NULLS_LAST, NUMBER, NUMERIC, OPENBRACKET, OPENBRAKET, OPENPAREN, OR, ORDER, PARTITION_BY, PLUS, PRIMARY_KEY, QUESTIONMARK, REAL, RELATION, RLIKE, ROLLBACK, ROWNUM, ROWTYPE, SELECT, SEMICOLON, SET, SLASH, SMALLINT, STRING_LITERAL, SUBSTR, SUM, SYSDATE, TABLE, TILDE, TIME, TIMESTAMP, TINYINT, tokenImage, TRUE, UID, UNION, UPDATE, USING, VALUES, VARCHAR, VARCHAR2, WHERE
Constructor and Description |
---|
SqlParser(InputStream stream)
Constructor with InputStream.
|
SqlParser(InputStream stream,
String encoding)
Constructor with InputStream and supplied encoding
|
SqlParser(Reader stream)
Constructor.
|
SqlParser(SqlParserTokenManager tm)
Constructor with generated Token Manager.
|
public SqlParserTokenManager token_source
public Token token
public Token jj_nt
public SqlParser(InputStream stream)
public SqlParser(InputStream stream, String encoding)
public SqlParser(Reader stream)
public SqlParser(SqlParserTokenManager tm)
public static void main(String[] args) throws ParseException
ParseException
public void reset(Reader reader)
public final Query parseStatement() throws ParseException
ParseException
public final Query selectSql() throws ParseException
ParseException
public final AbstractDMLQuery readMultipleQuery() throws ParseException
ParseException
public final SelectQuery selectSqlQuery() throws ParseException
ParseException
public final DeleteQuery deleteSqlQuery() throws ParseException
ParseException
public final SelectQuery countSqlQuery() throws ParseException
ParseException
public final Query deleteSql() throws ParseException
ParseException
public final Query updateSql() throws ParseException
ParseException
public final Query insertSql() throws ParseException
ParseException
public final Query createTable() throws ParseException
ParseException
public final Query dropTable() throws ParseException
ParseException
public final Query alterTable() throws ParseException
ParseException
public final Query commit() throws ParseException
ParseException
public final ProcedureQuery executeProcedure() throws ParseException
ParseException
public final void setQuantifier(SelectQuery query) throws ParseException
ParseException
public final void columnList(AbstractDMLQuery query) throws ParseException
ParseException
public final void selectColumnList(SelectQuery query) throws ParseException
ParseException
public final void columnListWithValues(UpdateQuery query) throws ParseException
ParseException
public final void setColumnValue(UpdateQuery updateQuery, ArrayList<LiteralNode> newValues) throws ParseException
ParseException
public final void function(SelectQuery query) throws ParseException
ParseException
public final ColumnNode createColumnNode(AbstractDMLQuery query, String columnFunc) throws ParseException
ParseException
public final List createFunctionParams() throws ParseException
ParseException
public final Object param() throws ParseException
ParseException
public final void selectTableList(SelectQuery query) throws ParseException
ParseException
public final void tableNameWithOptionalAlias(AbstractDMLQuery query) throws ParseException
ParseException
public final void tableName(AbstractDMLQuery query) throws ParseException
ParseException
public final void insertValuesList(InsertQuery insertQuery) throws ParseException
ParseException
public final void groupBy(SelectQuery query) throws ParseException
ParseException
public final void orderBy(SelectQuery query) throws ParseException
ParseException
public final OrderColumn createOrderColumn(AbstractDMLQuery query) throws ParseException
ParseException
public final SelectColumn getSelectColumn(AbstractDMLQuery query) throws ParseException
ParseException
public final ExpNode SqlExpression(AbstractDMLQuery query) throws ParseException
ParseException
public final ExpNode SqlAndExpression(AbstractDMLQuery query) throws ParseException
ParseException
public final ExpNode SqlSimpleExpression(AbstractDMLQuery query) throws ParseException
ParseException
public final ExpNode SqlContainsItemExpression(AbstractDMLQuery query) throws ParseException
ParseException
public final ExpNode SqlContainsItemSimpleExpression(AbstractDMLQuery query) throws ParseException
ParseException
public final ExpNode containtsItemSimpleCondition(AbstractDMLQuery query) throws ParseException
ParseException
public final ExpNode containtsItemSimpleConditionImpl(AbstractDMLQuery query, StringBuilder columnPath, ColumnNode columnNode1, boolean insideInternalContains) throws ParseException
ParseException
public final ExpNode SqlInClause(AbstractDMLQuery query) throws ParseException
ParseException
public final String className() throws ParseException
ParseException
public final String sqlType() throws ParseException
ParseException
public final Token id() throws ParseException
ParseException
public final ExpNode condition(AbstractDMLQuery query) throws ParseException
ParseException
public final ExpNode relationNode(AbstractDMLQuery query, ColumnNode columnNode) throws ParseException
ParseException
public final ExpNode conditionNode(AbstractDMLQuery query, ColumnNode columnNode1) throws ParseException
ParseException
public final ExpNode isNullNode(AbstractDMLQuery query, ColumnNode columnNode1) throws ParseException
ParseException
public final AndNode betweenNode(AbstractDMLQuery query, ColumnNode columnNode1) throws ParseException
ParseException
public final ExpNode containsSimpleItemNode(AbstractDMLQuery query, ColumnNode columnNode1, StringBuilder columnPath, boolean insideInternalContains) throws ParseException
ParseException
public final AndNode containsBetweenItemNode(AbstractDMLQuery query, ColumnNode columnNode1, StringBuilder columnPath) throws ParseException
ParseException
public final ExpNode containsInItemNode(AbstractDMLQuery query, ColumnNode columnNode1, StringBuilder columnPath) throws ParseException
ParseException
public final AndNode containsBetweenNode(AbstractDMLQuery query, ColumnNode columnNode1, String column) throws ParseException
ParseException
public final ExpNode containsSimpleNode(AbstractDMLQuery query, ColumnNode columnNode1, String column) throws ParseException
ParseException
public final ExpNode containsInNode(AbstractDMLQuery query, ColumnNode columnNode1, String column) throws ParseException
ParseException
public final ExpNode containsNode(AbstractDMLQuery query, ColumnNode columnNode1) throws ParseException
ParseException
public final ExpNode containsIsNullNode(AbstractDMLQuery query, ColumnNode columnNode1, String columnPath) throws ParseException
ParseException
public final ExpNode containsIsNotNullNode(AbstractDMLQuery query, ColumnNode columnNode1, String columnPath) throws ParseException
ParseException
public final ExpNode containsMultipleNode(AbstractDMLQuery query, ColumnNode columnNode1, String columnPath) throws ParseException
ParseException
public final ExpNode containsSingleNode(AbstractDMLQuery query, ColumnNode columnNode1, String column) throws ParseException
ParseException
public final ValueNode valueNode(AbstractDMLQuery query) throws ParseException
ParseException
public final ExpNode inExprOrList(AbstractDMLQuery query, boolean isNot) throws ParseException
ParseException
public final LiteralNode parseInValue(AbstractDMLQuery query) throws ParseException
ParseException
public final HashSet<LiteralNode> inValueList(AbstractDMLQuery query) throws ParseException
ParseException
public final ValueNode getBetweenValueNode(AbstractDMLQuery query) throws ParseException
ParseException
public void ReInit(InputStream stream)
public void ReInit(InputStream stream, String encoding)
public void ReInit(Reader stream)
public void ReInit(SqlParserTokenManager tm)
public final Token getNextToken()
public final Token getToken(int index)
public ParseException generateParseException()
public final void enable_tracing()
public final void disable_tracing()
Copyright © GigaSpaces.