public class SqlParserImpl extends SqlAbstractParserImpl implements SqlParserImplConstants
The public wrapper for this parser is SqlParser.
SqlAbstractParserImpl.ExprContext, SqlAbstractParserImpl.Metadata, SqlAbstractParserImpl.MetadataImpl| Modifier and Type | Field and Description |
|---|---|
static SqlParserImplFactory |
FACTORY
SqlParserImplFactory implementation for creating parser. |
Token |
jj_nt |
boolean |
lookingAhead |
Token |
token |
SqlParserImplTokenManager |
token_source |
nDynamicParams, opTabA, ABS, ABSOLUTE, ACTION, ADA, ADD, ADMIN, AFTER, ALL, ALLOCATE, ALLOW, ALTER, ALWAYS, AND, ANY, APPROX_NUMERIC_LITERAL, ARE, ARRAY, AS, ASC, ASENSITIVE, ASSERTION, ASSIGNMENT, ASYMMETRIC, AT, ATOMIC, ATTRIBUTE, ATTRIBUTES, AUTHORIZATION, AVG, BACK_QUOTED_IDENTIFIER, BEFORE, BEGIN, BEL, BERNOULLI, BETWEEN, BIGINT, BINARY, BINARY_STRING_LITERAL, BIT, BLOB, BOOLEAN, BOTH, BRACKET_QUOTED_IDENTIFIER, BREADTH, BTID, BY, C, CALL, CALLED, CARDINALITY, CASCADE, CASCADED, CASE, CAST, CATALOG, CATALOG_NAME, CEIL, CEILING, CHAIN, CHAR, CHAR_LENGTH, CHARACTER, CHARACTER_LENGTH, CHARACTER_SET_CATALOG, CHARACTER_SET_NAME, CHARACTER_SET_SCHEMA, CHARACTERISTICS, CHARACTERS, CHARSETNAME, CHECK, CLASS_ORIGIN, CLOB, CLOSE, COALESCE, COBOL, COLLATE, COLLATION, COLLATION_CATALOG, COLLATION_ID, COLLATION_NAME, COLLATION_SCHEMA, COLLECT, COLON, COLUMN, COLUMN_NAME, COMMA, COMMAND_FUNCTION, COMMAND_FUNCTION_CODE, COMMIT, COMMITTED, CONCAT, CONDITION, CONDITION_NUMBER, CONNECT, CONNECTION, CONNECTION_NAME, CONSTRAINT, CONSTRAINT_CATALOG, CONSTRAINT_NAME, CONSTRAINT_SCHEMA, CONSTRAINTS, CONSTRUCTOR, CONTAINS, CONTINUE, CONVERT, CORR, CORRESPONDING, COUNT, COVAR_POP, COVAR_SAMP, CREATE, CROSS, CUBE, CUME_DIST, CURRENT, CURRENT_CATALOG, CURRENT_DATE, CURRENT_DEFAULT_TRANSFORM_GROUP, CURRENT_PATH, CURRENT_ROLE, CURRENT_SCHEMA, CURRENT_TIME, CURRENT_TIMESTAMP, CURRENT_TRANSFORM_GROUP_FOR_TYPE, CURRENT_USER, CURSOR, CURSOR_NAME, CYCLE, DATA, DATE, DATETIME_INTERVAL_CODE, DATETIME_INTERVAL_PRECISION, DAY, DEALLOCATE, DEC, DECIMAL, DECIMAL_NUMERIC_LITERAL, DECLARE, DEFAULT, DEFAULT_KW, DEFAULTS, DEFERRABLE, DEFERRED, DEFINED, DEFINER, DEGREE, DELETE, DENSE_RANK, DEPTH, DEREF, DERIVED, DESC, DESCRIBE, DESCRIPTION, DESCRIPTOR, DETERMINISTIC, DIAGNOSTICS, DIGIT, DISALLOW, DISCONNECT, DISPATCH, DISTINCT, DOMAIN, DOT, DOUBLE, DOUBLE_PERIOD, DQID, DROP, DYNAMIC, DYNAMIC_FUNCTION, DYNAMIC_FUNCTION_CODE, EACH, ELEMENT, ELSE, END, END_EXEC, EOF, EQ, EQUALS, ESCAPE, EVERY, EXCEPT, EXCEPTION, EXCLUDE, EXCLUDING, EXEC, EXECUTE, EXISTS, EXP, EXPLAIN, EXPONENT, EXTEND, EXTERNAL, EXTRACT, FALSE, FETCH, FILTER, FINAL, FIRST, FIRST_VALUE, FLOAT, FLOOR, FOLLOWING, FOR, FOREIGN, FORMAL_COMMENT, FORTRAN, FOUND, FREE, FROM, FULL, FUNCTION, FUSION, G, GE, GENERAL, GENERATED, GET, GLOBAL, GO, GOTO, GRANT, GRANTED, GROUP, GROUPING, GT, HAVING, HEXDIGIT, HIERARCHY, HOLD, HOOK, HOUR, IDENTIFIER, IDENTITY, IMMEDIATE, IMPLEMENTATION, IMPORT, IN, IN_FORMAL_COMMENT, IN_MULTI_LINE_COMMENT, IN_SINGLE_LINE_COMMENT, INCLUDING, INCREMENT, INDICATOR, INITIALLY, INNER, INOUT, INPUT, INSENSITIVE, INSERT, INSTANCE, INSTANTIABLE, INT, INTEGER, INTERSECT, INTERSECTION, INTERVAL, INTO, INVOKER, IS, ISOLATION, JAVA, JOIN, K, KEY, KEY_MEMBER, KEY_TYPE, LABEL, LANGUAGE, LARGE, LAST, LAST_VALUE, LATERAL, LBRACE, LBRACE_D, LBRACE_FN, LBRACE_T, LBRACE_TS, LBRACKET, LE, LEADING, LEFT, LENGTH, LETTER, LEVEL, LIBRARY, LIKE, LIMIT, LN, LOCAL, LOCALTIME, LOCALTIMESTAMP, LOCATOR, LOWER, LPAREN, LT, M, MAP, MATCH, MATCHED, MAX, MAXVALUE, MEMBER, MERGE, MESSAGE_LENGTH, MESSAGE_OCTET_LENGTH, MESSAGE_TEXT, METHOD, MIN, MINUS, MINUTE, MINVALUE, MOD, MODIFIES, MODULE, MONTH, MORE_KW, MULTI_LINE_COMMENT, MULTISET, MUMPS, NAME, NAMES, NATIONAL, NATURAL, NCHAR, NCLOB, NE, NESTING, NEW, NEXT, NO, NONE, NORMALIZE, NORMALIZED, NOT, NULL, NULLABLE, NULLIF, NULLS, NUMBER, NUMERIC, OBJECT, OCTET_LENGTH, OCTETS, OF, OFFSET, OLD, ON, ONLY, OPEN, OPTION, OPTIONS, OR, ORDER, ORDERING, ORDINALITY, OTHERS, OUT, OUTER, OUTPUT, OVER, OVERLAPS, OVERLAY, OVERRIDING, PAD, PARAMETER, PARAMETER_MODE, PARAMETER_NAME, PARAMETER_ORDINAL_POSITION, PARAMETER_SPECIFIC_CATALOG, PARAMETER_SPECIFIC_NAME, PARAMETER_SPECIFIC_SCHEMA, PARTIAL, PARTITION, PASCAL, PASSTHROUGH, PATH, PERCENT_RANK, PERCENTILE_CONT, PERCENTILE_DISC, PLACING, PLAN, PLI, PLUS, POSITION, POWER, PRECEDING, PRECISION, PREFIXED_STRING_LITERAL, PREPARE, PRESERVE, PRIMARY, PRIOR, PRIVILEGES, PROCEDURE, PUBLIC, QUOTE, QUOTED_IDENTIFIER, QUOTED_STRING, RANGE, RANK, RBRACE, RBRACKET, READ, READS, REAL, RECURSIVE, REF, REFERENCES, REFERENCING, REGR_AVGX, REGR_AVGY, REGR_COUNT, REGR_INTERCEPT, REGR_R2, REGR_SLOPE, REGR_SXX, REGR_SXY, REGR_SYY, RELATIVE, RELEASE, REPEATABLE, RESTART, RESTRICT, RESULT, RETURN, RETURNED_CARDINALITY, RETURNED_LENGTH, RETURNED_OCTET_LENGTH, RETURNED_SQLSTATE, RETURNS, REVOKE, RIGHT, ROLE, ROLLBACK, ROLLUP, ROUTINE, ROUTINE_CATALOG, ROUTINE_NAME, ROUTINE_SCHEMA, ROW, ROW_COUNT, ROW_NUMBER, ROWS, RPAREN, SAVEPOINT, SCALE, SCHEMA, SCHEMA_NAME, SCOPE, SCOPE_CATALOGS, SCOPE_NAME, SCOPE_SCHEMA, SCROLL, SEARCH, SECOND, SECTION, SECURITY, SELECT, SELF, SEMICOLON, SENSITIVE, SEQUENCE, SERIALIZABLE, SERVER, SERVER_NAME, SESSION, SESSION_USER, SET, SETS, SIMILAR, SIMPLE, SINGLE_LINE_COMMENT, SIZE, SLASH, SMALLINT, SOME, SOURCE, SPACE, SPECIFIC, SPECIFIC_NAME, SPECIFICTYPE, SQL, SQLEXCEPTION, SQLSTATE, SQLWARNING, SQRT, STAR, START, STATE, STATEMENT, STATIC, STDDEV_POP, STDDEV_SAMP, STREAM, STRUCTURE, STYLE, SUBCLASS_ORIGIN, SUBMULTISET, SUBSTITUTE, SUBSTRING, SUM, SYMMETRIC, SYSTEM, SYSTEM_USER, TABLE, TABLE_NAME, TABLESAMPLE, TEMPORARY, THEN, TIES, TIME, TIMESTAMP, TIMEZONE_HOUR, TIMEZONE_MINUTE, TINYINT, TO, tokenImage, TOP_LEVEL_COUNT, TRAILING, TRANSACTION, TRANSACTIONS_ACTIVE, TRANSACTIONS_COMMITTED, TRANSACTIONS_ROLLED_BACK, TRANSFORM, TRANSFORMS, TRANSLATE, TRANSLATION, TREAT, TRIGGER, TRIGGER_CATALOG, TRIGGER_NAME, TRIGGER_SCHEMA, TRIM, TRUE, TYPE, UESCAPE, UNBOUNDED, UNCOMMITTED, UNDER, UNICODE_QUOTED_ESCAPE_CHAR, UNICODE_QUOTED_IDENTIFIER, UNICODE_STRING_LITERAL, UNION, UNIQUE, UNKNOWN, UNNAMED, UNNEST, UNSIGNED_INTEGER_LITERAL, UPDATE, UPPER, UPSERT, USAGE, USER, USER_DEFINED_TYPE_CATALOG, USER_DEFINED_TYPE_CODE, USER_DEFINED_TYPE_NAME, USER_DEFINED_TYPE_SCHEMA, USING, VALUE, VALUES, VAR_POP, VAR_SAMP, VARBINARY, VARCHAR, VARYING, VERSION, VIEW, WHEN, WHENEVER, WHERE, WHITESPACE, WIDTH_BUCKET, WINDOW, WITH, WITHIN, WITHOUT, WORK, WRAPPER, WRITE, XML, YEAR, ZONE| Constructor and Description |
|---|
SqlParserImpl(InputStream stream) |
SqlParserImpl(InputStream stream,
String encoding) |
SqlParserImpl(Reader stream) |
SqlParserImpl(SqlParserImplTokenManager tm) |
| Modifier and Type | Method and Description |
|---|---|
SqlNode |
ArrayConstructor()
Parses an ARRAY constructor
|
SqlNode |
AtomicRowExpression()
Parses an atomic row expression.
|
SqlBinaryOperator |
BinaryMultisetOperator()
Parses a binary multiset operator.
|
SqlBinaryOperator |
BinaryQueryOperator()
Parses a binary query operator like UNION.
|
SqlBinaryOperator |
BinaryRowOperator()
Parses a binary row operator like AND.
|
SqlNode |
BuiltinFunctionCall()
Parses a call to a builtin function with special syntax.
|
SqlNode |
CaseExpression() |
SqlCollation |
CollateClause()
Parses a COLLATE clause
|
SqlIdentifier |
CollectionsTypeName() |
void |
ColumnType(List<SqlNode> list) |
String |
CommonNonReservedKeyWord()
Parses a non-reserved keyword for use as an identifier.
|
SqlIdentifier |
CompoundIdentifier()
Parses a compound identifier.
|
SqlIdentifier |
ContextVariable() |
SqlNode |
CursorExpression(SqlAbstractParserImpl.ExprContext exprContext)
Parses a CURSOR(query) expression.
|
SqlDataTypeSpec |
DataType() |
SqlLiteral |
DateTimeLiteral()
Parses a date/time literal.
|
void |
disable_tracing() |
SqlDynamicParam |
DynamicParam()
Parses a dynamic parameter marker.
|
void |
enable_tracing() |
SqlExplain.Depth |
ExplainDepth()
Parses WITH TYPE | WITH IMPLEMENTATION | WITHOUT IMPLEMENTATION modifier for
EXPLAIN PLAN.
|
SqlExplainLevel |
ExplainDetailLevel()
Parses INCLUDING ALL ATTRIBUTES modifier for EXPLAIN PLAN.
|
SqlNode |
ExplicitTable(SqlParserPos pos)
Parses an explicit TABLE t reference.
|
SqlNode |
Expression(SqlAbstractParserImpl.ExprContext exprContext)
Parses a row expression or a parenthesized expression of any kind.
|
List<Object> |
Expression2(SqlAbstractParserImpl.ExprContext exprContext)
Parses a binary row expression, or a parenthesized expression of any
kind.
|
SqlNode |
Expression3(SqlAbstractParserImpl.ExprContext exprContext)
Parses a unary row expression, or a parenthesized expression of any
kind.
|
SqlNodeList |
ExpressionCommaList(SqlParserPos pos,
SqlAbstractParserImpl.ExprContext exprContext)
Parses a list of expressions separated by commas.
|
SqlNode |
ExtendedBuiltinFunctionCall() |
SqlNode |
ExtendedTableRef()
Allows parser to be extended with new types of table references.
|
SqlNodeList |
ExtendList() |
SqlNode |
FloorCeilOptions(SqlParserPos pos,
boolean floorFlag) |
SqlNode |
FromClause()
Parses the FROM clause a SELECT.
|
SqlIdentifier |
FunctionName()
Parses the name of a function (either a compound identifier or
a reserved word which can be used as a function name).
|
List |
FunctionParameterList(SqlAbstractParserImpl.ExprContext exprContext)
Parses function parameter lists including DISTINCT keyword recognition
|
ParseException |
generateParseException() |
SqlAbstractParserImpl.Metadata |
getMetadata()
Returns metadata about this parser: keywords, etc.
|
Token |
getNextToken() |
Token |
getToken(int index) |
SqlNodeList |
GroupByOpt()
Parses the optional GROUP BY clause for SELECT.
|
SqlNode |
GroupingElement() |
List<SqlNode> |
GroupingElementList() |
SqlNode |
HavingOpt()
Parses the optional HAVING clause for SELECT.
|
String |
Identifier()
Parses a simple identifier as a string.
|
SqlLiteral |
IntervalLiteral()
Parses an interval literal.
|
SqlIntervalQualifier |
IntervalQualifier() |
int |
IntLiteral() |
SqlNode |
JdbcFunctionCall()
Parses a function call expression with JDBC syntax.
|
SqlNode |
JoinTable(SqlNode e)
Matches "LEFT JOIN t ON ...", "RIGHT JOIN t USING ...", "JOIN t".
|
SqlLiteral |
JoinType() |
SqlNode |
LeafQuery(SqlAbstractParserImpl.ExprContext exprContext)
Parses a leaf in a query expression (SELECT, VALUES or TABLE).
|
SqlNode |
LeafQueryOrExpr(SqlAbstractParserImpl.ExprContext exprContext)
Parses either a row expression, a leaf query expression, or
a parenthesized expression of any kind.
|
SqlNode |
Literal()
Parses a literal expression, allowing continued string literals.
|
SqlNode |
MapConstructor()
Parses an MAP constructor
|
SqlNode |
MultisetConstructor()
Parses a MULTISET constructor
|
SqlNode |
NamedFunctionCall()
Parses a call to a named function (could be a builtin with regular
syntax, or else a UDF).
|
SqlNode |
NamedRoutineCall(SqlFunctionCategory routineType,
SqlAbstractParserImpl.ExprContext exprContext) |
SqlLiteral |
Natural() |
SqlNode |
NewSpecification()
Parses a NEW UDT(...) expression.
|
String |
NonReservedJdbcFunctionName()
Parses the name of a JDBC function that is a token but is not reserved.
|
String |
NonReservedKeyWord() |
SqlParseException |
normalizeException(Throwable ex)
Removes or transforms misleading information from a parse exception or
error, and converts to
SqlParseException. |
SqlLiteral |
NumericLiteral()
Parses a numeric literal (can be signed)
|
SqlNodeList |
OrderBy(boolean accept)
Parses an ORDER BY clause.
|
SqlNode |
OrderedQueryOrExpr(SqlAbstractParserImpl.ExprContext exprContext)
Parses either a row expression or a query expression with an optional
ORDER BY.
|
SqlNode |
OrderItem()
Parses one list item in an ORDER BY clause.
|
SqlNode |
ParenthesizedExpression(SqlAbstractParserImpl.ExprContext exprContext)
Parses a parenthesized query or single row expression.
|
SqlNodeList |
ParenthesizedQueryOrCommaList(SqlAbstractParserImpl.ExprContext exprContext)
Parses a parenthesized query or comma-list of row expressions.
|
SqlNodeList |
ParenthesizedSimpleIdentifierList()
List of simple identifiers in parentheses.
|
SqlNode |
parseSqlExpressionEof()
Parses a SQL expression ending with EOF and constructs a
parse tree.
|
SqlNode |
parseSqlStmtEof()
Parses a SQL statement ending with EOF and constructs a
parse tree.
|
SqlPostfixOperator |
PostfixRowOperator()
Parses a postfix row operator like IS NOT NULL.
|
SqlPrefixOperator |
PrefixRowOperator()
Parses a prefix row operator like NOT.
|
SqlNode |
QueryOrExpr(SqlAbstractParserImpl.ExprContext exprContext)
Parses either a row expression or a query expression without ORDER BY.
|
void |
ReInit(InputStream stream) |
void |
ReInit(InputStream stream,
String encoding) |
void |
ReInit(Reader stream)
Reinitializes parser with new input.
|
void |
ReInit(SqlParserImplTokenManager tm) |
SqlIdentifier |
ReservedFunctionName()
Parses a reserved word which is used as the name of a function.
|
SqlNode |
RowConstructor()
Parses a row constructor in the context of a VALUES expression.
|
SqlNodeList |
RowConstructorList(SqlParserPos pos)
Parses one or more rows in a VALUES expression.
|
String |
Scope() |
SqlNode |
SelectExpression()
Parses one unaliased expression in a select list.
|
SqlNode |
SelectItem()
Parses one item in a select list.
|
List<SqlNode> |
SelectList()
Parses the select list of a SELECT statement.
|
SqlCall |
SequenceExpression() |
void |
setIdentifierMaxLength(int identifierMaxLength)
Sets the maximum length for sql identifier.
|
void |
setQuotedCasing(Casing quotedCasing)
Sets the casing policy for quoted identifiers.
|
void |
setTabSize(int tabSize)
Sets the tab stop size.
|
void |
setUnquotedCasing(Casing unquotedCasing)
Sets the casing policy for unquoted identifiers.
|
SqlIdentifier |
SimpleIdentifier()
Parses a simple identifier as an SqlIdentifier.
|
SqlNodeList |
SimpleIdentifierCommaList()
Parses a comma-separated list of simple identifiers.
|
SqlLiteral |
SpecialLiteral()
Parse a special literal keyword
|
SqlNode |
SqlDelete()
Parses a DELETE statement.
|
SqlNode |
SqlExplain()
Parses an EXPLAIN PLAN statement.
|
SqlNode |
SqlExpressionEof()
Parses a SQL expression (such as might occur in a WHERE clause) followed by
the end-of-file symbol.
|
SqlNode |
SqlInsert()
Parses an INSERT statement.
|
void |
SqlInsertKeywords(List<SqlLiteral> keywords) |
SqlNode |
SqlMerge()
Parses a MERGE statement.
|
SqlNode |
SqlProcedureCall()
Parses a CALL statement.
|
SqlNode |
SqlQueryEof()
Parses a query (SELECT, UNION, INTERSECT, EXCEPT, VALUES, TABLE) followed by
the end-of-file symbol.
|
SqlSelect |
SqlSelect()
Parses a leaf SELECT expression without ORDER BY.
|
void |
SqlSelectKeywords(List<SqlLiteral> keywords) |
SqlSetOption |
SqlSetOption()
Parses an expression for setting a option in SQL, such as QUOTED_IDENTIFIERS,
or explain plan level (physical/logical).
|
SqlNode |
SqlStmt()
Parses an SQL statement.
|
SqlNode |
SqlStmtEof()
Parses an SQL statement followed by the end-of-file symbol.
|
SqlNode |
SqlUpdate()
Parses an UPDATE statement.
|
SqlNode |
StandardFloorCeilOptions(SqlParserPos pos,
boolean floorFlag) |
SqlNode |
StringLiteral()
Parses a string literal.
|
void |
switchTo(String stateName)
Change parser state.
|
SqlNode |
TableConstructor()
Parses a VALUES leaf query expression.
|
SqlNode |
TableFunctionCall(SqlParserPos pos) |
SqlNode |
TableOverOpt()
Allows an OVER clause following a table expression as an extension to
standard SQL syntax.
|
SqlNode |
TableRef()
Parses a table reference in a FROM clause.
|
TimeUnit |
TimeUnit() |
SqlIdentifier |
TypeName() |
int |
UnsignedIntLiteral() |
SqlNumericLiteral |
UnsignedNumericLiteral()
Parses a unsigned numeric literal
|
void |
UnusedExtension()
Defines a production which can never be accepted by the parser.
|
SqlUpdate |
WhenMatchedClause(SqlNode table,
SqlIdentifier alias) |
SqlInsert |
WhenNotMatchedClause(SqlNode table) |
SqlNode |
WhereOpt()
Parses the optional WHERE clause for SELECT, DELETE, and UPDATE.
|
SqlNodeList |
WindowOpt()
Parses the optional WINDOW clause for SELECT
|
SqlNode |
WindowRange() |
SqlWindow |
WindowSpecification()
Parses a window specification.
|
SqlWithItem |
WithItem() |
SqlNodeList |
WithList() |
createCall, getSql92ReservedWordspublic static final SqlParserImplFactory FACTORY
SqlParserImplFactory implementation for creating parser.public SqlParserImplTokenManager token_source
public Token token
public Token jj_nt
public boolean lookingAhead
public SqlParserImpl(InputStream stream)
public SqlParserImpl(InputStream stream, String encoding)
public SqlParserImpl(Reader stream)
public SqlParserImpl(SqlParserImplTokenManager tm)
public SqlParseException normalizeException(Throwable ex)
SqlAbstractParserImplSqlParseException.normalizeException in class SqlAbstractParserImplex - dirty excnpublic SqlAbstractParserImpl.Metadata getMetadata()
SqlAbstractParserImplgetMetadata in class SqlAbstractParserImplpublic void setTabSize(int tabSize)
SqlAbstractParserImplsetTabSize in class SqlAbstractParserImpltabSize - Tab stop sizepublic void switchTo(String stateName)
SqlAbstractParserImplswitchTo in class SqlAbstractParserImplstateName - new state.public void setQuotedCasing(Casing quotedCasing)
SqlAbstractParserImplsetQuotedCasing in class SqlAbstractParserImplquotedCasing - Casing to set.public void setUnquotedCasing(Casing unquotedCasing)
SqlAbstractParserImplsetUnquotedCasing in class SqlAbstractParserImplunquotedCasing - Casing to set.public void setIdentifierMaxLength(int identifierMaxLength)
SqlAbstractParserImplsetIdentifierMaxLength in class SqlAbstractParserImplpublic SqlNode parseSqlExpressionEof() throws Exception
SqlAbstractParserImplparseSqlExpressionEof in class SqlAbstractParserImplExceptionpublic SqlNode parseSqlStmtEof() throws Exception
SqlAbstractParserImplparseSqlStmtEof in class SqlAbstractParserImplExceptionpublic final String NonReservedKeyWord() throws ParseException
ParseExceptionpublic final SqlNode ExtendedTableRef() throws ParseException
ParseExceptionpublic final SqlNode TableOverOpt() throws ParseException
ParseExceptionpublic final void SqlSelectKeywords(List<SqlLiteral> keywords) throws ParseException
ParseExceptionpublic final void SqlInsertKeywords(List<SqlLiteral> keywords) throws ParseException
ParseExceptionpublic final SqlNode ExtendedBuiltinFunctionCall() throws ParseException
ParseExceptionpublic final SqlNode FloorCeilOptions(SqlParserPos pos, boolean floorFlag) throws ParseException
ParseExceptionpublic final SqlNode OrderedQueryOrExpr(SqlAbstractParserImpl.ExprContext exprContext) throws ParseException
Postgres syntax for limit: [ LIMIT { count | ALL } ] [ OFFSET start ]
SQL:2008 syntax for limit: [ OFFSET start { ROW | ROWS } ] [ FETCH { FIRST | NEXT } [ count ] { ROW | ROWS } ONLY ]
ParseExceptionpublic final SqlNode LeafQuery(SqlAbstractParserImpl.ExprContext exprContext) throws ParseException
ParseExceptionpublic final SqlNode ParenthesizedExpression(SqlAbstractParserImpl.ExprContext exprContext) throws ParseException
ParseExceptionpublic final SqlNodeList ParenthesizedQueryOrCommaList(SqlAbstractParserImpl.ExprContext exprContext) throws ParseException
REVIEW jvs 8-Feb-2004: There's a small hole in this production. It can be
used to construct something like
WHERE x IN (select count(*) from t where c=d,5),
which should be illegal. The above is interpreted as equivalent to
WHERE x IN ((select count(*) from t where c=d),5),
which is a legal use of a subquery. The only way to fix the hole is to be
able to remember whether a subexpression was parenthesized or not, which
means preserving parentheses in the SqlNode tree. This is probably
desirable anyway for use in purely syntactic parsing applications (e.g. SQL
pretty-printer). However, if this is done, it's important to also make
isA() on the paren node call down to its operand so that we can
always correctly discriminate a query from a row expression.
ParseExceptionpublic final List FunctionParameterList(SqlAbstractParserImpl.ExprContext exprContext) throws ParseException
This is pretty much the same as ParenthesizedQueryOrCommaList but allows the DISTINCT keyword to follow the left paren and not be followed by a comma.
ParseExceptionpublic final SqlNode SqlQueryEof() throws ParseException
ParseExceptionpublic final SqlNode SqlStmt() throws ParseException
ParseExceptionpublic final SqlNode SqlStmtEof() throws ParseException
ParseExceptionpublic final SqlSelect SqlSelect() throws ParseException
ParseExceptionpublic final SqlNode SqlExplain() throws ParseException
ParseExceptionpublic final SqlExplain.Depth ExplainDepth() throws ParseException
ParseExceptionpublic final SqlExplainLevel ExplainDetailLevel() throws ParseException
ParseExceptionpublic final SqlNode SqlProcedureCall() throws ParseException
ParseExceptionpublic final SqlNode NamedRoutineCall(SqlFunctionCategory routineType, SqlAbstractParserImpl.ExprContext exprContext) throws ParseException
ParseExceptionpublic final SqlNode SqlInsert() throws ParseException
ParseExceptionpublic final SqlNode SqlDelete() throws ParseException
ParseExceptionpublic final SqlNode SqlUpdate() throws ParseException
ParseExceptionpublic final SqlNode SqlMerge() throws ParseException
ParseExceptionpublic final SqlUpdate WhenMatchedClause(SqlNode table, SqlIdentifier alias) throws ParseException
ParseExceptionpublic final SqlInsert WhenNotMatchedClause(SqlNode table) throws ParseException
ParseExceptionpublic final List<SqlNode> SelectList() throws ParseException
ParseExceptionpublic final SqlNode SelectItem() throws ParseException
ParseExceptionpublic final SqlNode SelectExpression() throws ParseException
ParseExceptionpublic final SqlLiteral Natural() throws ParseException
ParseExceptionpublic final SqlLiteral JoinType() throws ParseException
ParseExceptionpublic final SqlNode JoinTable(SqlNode e) throws ParseException
ParseExceptionpublic final SqlNode FromClause() throws ParseException
ParseExceptionpublic final SqlNode TableRef() throws ParseException
ParseExceptionpublic final SqlNodeList ExtendList() throws ParseException
ParseExceptionpublic final void ColumnType(List<SqlNode> list) throws ParseException
ParseExceptionpublic final SqlNode TableFunctionCall(SqlParserPos pos) throws ParseException
ParseExceptionpublic final SqlNode ExplicitTable(SqlParserPos pos) throws ParseException
ParseExceptionpublic final SqlNode TableConstructor() throws ParseException
ParseExceptionpublic final SqlNodeList RowConstructorList(SqlParserPos pos) throws ParseException
ParseExceptionpublic final SqlNode RowConstructor() throws ParseException
ParseExceptionpublic final SqlNode WhereOpt() throws ParseException
ParseExceptionpublic final SqlNodeList GroupByOpt() throws ParseException
ParseExceptionpublic final List<SqlNode> GroupingElementList() throws ParseException
ParseExceptionpublic final SqlNode GroupingElement() throws ParseException
ParseExceptionpublic final SqlNodeList ExpressionCommaList(SqlParserPos pos, SqlAbstractParserImpl.ExprContext exprContext) throws ParseException
ParseExceptionpublic final SqlNode HavingOpt() throws ParseException
ParseExceptionpublic final SqlNodeList WindowOpt() throws ParseException
ParseExceptionpublic final SqlWindow WindowSpecification() throws ParseException
ParseExceptionpublic final SqlNode WindowRange() throws ParseException
ParseExceptionpublic final SqlNodeList OrderBy(boolean accept) throws ParseException
ParseExceptionpublic final SqlNode OrderItem() throws ParseException
ParseExceptionpublic final SqlNode SqlExpressionEof() throws ParseException
ParseExceptionpublic final SqlNode QueryOrExpr(SqlAbstractParserImpl.ExprContext exprContext) throws ParseException
ParseExceptionpublic final SqlNodeList WithList() throws ParseException
ParseExceptionpublic final SqlWithItem WithItem() throws ParseException
ParseExceptionpublic final SqlNode LeafQueryOrExpr(SqlAbstractParserImpl.ExprContext exprContext) throws ParseException
ParseExceptionpublic final SqlNode Expression(SqlAbstractParserImpl.ExprContext exprContext) throws ParseException
ParseExceptionpublic final List<Object> Expression2(SqlAbstractParserImpl.ExprContext exprContext) throws ParseException
The result is as a flat list of operators and operands. The top-level
call to get an expression should call Expression(org.apache.calcite.sql.parser.SqlAbstractParserImpl.ExprContext), but lower-level
calls should call this, to give the parser the opos to associate
operator calls.
For example 'a = b like c = d' should come out '((a = b) like c) = d' because LIKE and '=' have the same precedence, but tends to come out as '(a = b) like (c = d)' because (a = b) and (c = d) are parsed as separate expressions.
ParseExceptionpublic final SqlNode Expression3(SqlAbstractParserImpl.ExprContext exprContext) throws ParseException
ParseExceptionpublic final SqlCollation CollateClause() throws ParseException
ParseExceptionpublic final SqlNode AtomicRowExpression() throws ParseException
ParseExceptionpublic final SqlNode CaseExpression() throws ParseException
ParseExceptionpublic final SqlCall SequenceExpression() throws ParseException
ParseExceptionpublic final SqlSetOption SqlSetOption() throws ParseException
ParseExceptionpublic final String Scope() throws ParseException
ParseExceptionpublic final SqlNode Literal() throws ParseException
ParseExceptionpublic final SqlNumericLiteral UnsignedNumericLiteral() throws ParseException
ParseExceptionpublic final SqlLiteral NumericLiteral() throws ParseException
ParseExceptionpublic final SqlLiteral SpecialLiteral() throws ParseException
ParseExceptionpublic final SqlNode StringLiteral() throws ParseException
ParseExceptionSqlLiteral.unchain(SqlNode),
SqlLiteral.stringValue(SqlNode)public final SqlLiteral DateTimeLiteral() throws ParseException
ParseExceptionpublic final SqlNode MultisetConstructor() throws ParseException
ParseExceptionpublic final SqlNode ArrayConstructor() throws ParseException
ParseExceptionpublic final SqlNode MapConstructor() throws ParseException
ParseExceptionpublic final SqlLiteral IntervalLiteral() throws ParseException
ParseExceptionpublic final SqlIntervalQualifier IntervalQualifier() throws ParseException
ParseExceptionpublic final TimeUnit TimeUnit() throws ParseException
ParseExceptionpublic final SqlDynamicParam DynamicParam() throws ParseException
ParseExceptionpublic final String Identifier() throws ParseException
ParseExceptionpublic final SqlIdentifier SimpleIdentifier() throws ParseException
ParseExceptionpublic final SqlNodeList SimpleIdentifierCommaList() throws ParseException
ParseExceptionpublic final SqlNodeList ParenthesizedSimpleIdentifierList() throws ParseException
ParseExceptionpublic final SqlIdentifier CompoundIdentifier() throws ParseException
ParseExceptionpublic final SqlNode NewSpecification() throws ParseException
ParseExceptionpublic final int UnsignedIntLiteral()
throws ParseException
ParseExceptionpublic final int IntLiteral()
throws ParseException
ParseExceptionpublic final SqlDataTypeSpec DataType() throws ParseException
ParseExceptionpublic final SqlIdentifier TypeName() throws ParseException
ParseExceptionpublic final SqlIdentifier CollectionsTypeName() throws ParseException
ParseExceptionpublic final SqlNode CursorExpression(SqlAbstractParserImpl.ExprContext exprContext) throws ParseException
ParseExceptionpublic final SqlNode BuiltinFunctionCall() throws ParseException
ParseExceptionpublic final SqlNode NamedFunctionCall() throws ParseException
NOTE: every UDF has two names: an invocation name and a specific name. Normally, function calls are resolved via overload resolution and invocation names. The SPECIFIC prefix allows overload resolution to be bypassed. Note that usage of the SPECIFIC prefix in queries is non-standard; it is used internally by Farrago, e.g. in stored view definitions to permanently bind references to a particular function after the overload resolution performed by view creation.
TODO jvs 25-Mar-2005: Once we have SQL-Flagger support, flag SPECIFIC as non-standard.
ParseExceptionpublic final SqlNode StandardFloorCeilOptions(SqlParserPos pos, boolean floorFlag) throws ParseException
ParseExceptionpublic final String NonReservedJdbcFunctionName() throws ParseException
ParseExceptionpublic final SqlIdentifier FunctionName() throws ParseException
ParseExceptionpublic final SqlIdentifier ReservedFunctionName() throws ParseException
ParseExceptionpublic final SqlIdentifier ContextVariable() throws ParseException
ParseExceptionpublic final SqlNode JdbcFunctionCall() throws ParseException
ParseExceptionpublic final SqlBinaryOperator BinaryQueryOperator() throws ParseException
ParseExceptionpublic final SqlBinaryOperator BinaryMultisetOperator() throws ParseException
ParseExceptionpublic final SqlBinaryOperator BinaryRowOperator() throws ParseException
ParseExceptionpublic final SqlPrefixOperator PrefixRowOperator() throws ParseException
ParseExceptionpublic final SqlPostfixOperator PostfixRowOperator() throws ParseException
ParseExceptionpublic final String CommonNonReservedKeyWord() throws ParseException
When adding keywords to this list, be sure that they are not reserved by the SQL:2003 standard (see productions for "non-reserved word" and "reserved word" in reference below).
ParseExceptionpublic final void UnusedExtension()
throws ParseException
ParseExceptionpublic void ReInit(InputStream stream)
public void ReInit(InputStream stream, String encoding)
public void ReInit(Reader stream)
SqlAbstractParserImplReInit in class SqlAbstractParserImplstream - provides new inputpublic void ReInit(SqlParserImplTokenManager 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 © 2012–2015 The Apache Software Foundation. All rights reserved.