类 SqlGeneratorBase
- java.lang.Object
-
- antlr.TreeParser
-
- org.hibernate.hql.internal.antlr.SqlGeneratorBase
-
- 所有已实现的接口:
SqlTokenTypes
- 直接已知子类:
SqlGenerator
public class SqlGeneratorBase extends antlr.TreeParser implements SqlTokenTypes
SQL Generator Tree Parser, providing SQL rendering of SQL ASTs produced by the previous phase, HqlSqlWalker. All syntax decoration such as extra spaces, lack of spaces, extra parens, etc. should be added by this class.
This grammar processes the HQL/SQL AST and produces an SQL string. The intent is to move dialect-specific code into a sub-class that will override some of the methods, just like the other two grammars in this system.- 作者:
- Joshua Davis (joshua@hibernate.org)
-
-
字段概要
字段 修饰符和类型 字段 说明 static String[]_tokenNamesstatic antlr.collections.impl.BitSet_tokenSet_0static antlr.collections.impl.BitSet_tokenSet_1static antlr.collections.impl.BitSet_tokenSet_2static antlr.collections.impl.BitSet_tokenSet_3static antlr.collections.impl.BitSet_tokenSet_4static antlr.collections.impl.BitSet_tokenSet_5protected List<StringBuilder>exprs-
从类继承的字段 antlr.TreeParser
_retTree, astFactory, ASTNULL, inputState, returnAST, tokenNames, traceDepth
-
从接口继承的字段 org.hibernate.hql.internal.antlr.SqlTokenTypes
AGGREGATE, ALIAS, ALIAS_REF, ALL, AND, ANY, AS, ASCENDING, AVG, BETWEEN, BOGUS, BOTH, CASE, CASE2, CAST, CLASS, CLOSE, CLOSE_BRACKET, COLON, COMMA, CONCAT, CONSTANT, CONSTRUCTOR, COUNT, DELETE, DESCENDING, DISTINCT, DIV, DOT, ELEMENTS, ELSE, EMPTY, END, ENTITY_JOIN, ENTRY, EOF, EQ, ESCAPE, ESCqs, EXISTS, EXPONENT, EXPR_LIST, FALSE, FETCH, FILTER_ENTITY, FILTERS, FIRST, FLOAT_SUFFIX, FROM, FROM_FRAGMENT, FULL, GE, GROUP, GT, HAVING, HEX_DIGIT, ID_LETTER, ID_START_LETTER, IDENT, IMPLIED_FROM, IN, IN_LIST, INDEX_OP, INDICES, INNER, INSERT, INTO, IS, IS_NOT_NULL, IS_NULL, JAVA_CONSTANT, JOIN, JOIN_FRAGMENT, KEY, LAST, LE, LEADING, LEFT, LEFT_OUTER, LIKE, LITERAL_ascending, LITERAL_by, LITERAL_descending, LT, MAX, MEMBER, METHOD_CALL, METHOD_NAME, MIN, MINUS, MOD, NAMED_PARAM, NE, NEW, NOT, NOT_BETWEEN, NOT_IN, NOT_LIKE, NULL, NULL_TREE_LOOKAHEAD, NULLS, NUM_BIG_DECIMAL, NUM_BIG_INTEGER, NUM_DOUBLE, NUM_FLOAT, NUM_INT, NUM_LONG, OBJECT, OF, ON, OPEN, OPEN_BRACKET, OR, ORDER, ORDER_ELEMENT, OUTER, PARAM, PLUS, PROPERTIES, PROPERTY_REF, QUERY, QUOTED_STRING, RANGE, RESULT_VARIABLE_REF, RIGHT, RIGHT_OUTER, ROW_STAR, SELECT, SELECT_CLAUSE, SELECT_COLUMNS, SELECT_EXPR, SELECT_FROM, SET, SOME, SQL_NE, SQL_NODE, SQL_TOKEN, STAR, SUM, THEN, THETA_JOINS, TRAILING, TRUE, UNARY_MINUS, UNARY_PLUS, UPDATE, VALUE, VECTOR_EXPR, VERSIONED, WEIRD_IDENT, WHEN, WHERE, WITH, WS
-
-
构造器概要
构造器 构造器 说明 SqlGeneratorBase()
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidadditiveExpr(antlr.collections.AST _t)voidaddrExpr(antlr.collections.AST _t)voidaggregate(antlr.collections.AST _t)voidarguments(antlr.collections.AST _t)voidarithmeticExpr(antlr.collections.AST _t)protected voidbeginFunctionTemplate(antlr.collections.AST m, antlr.collections.AST i)protected voidbetweenFunctionArguments()voidbinaryComparisonExpression(antlr.collections.AST _t)voidbooleanExpr(antlr.collections.AST _t, boolean parens)voidbooleanOp(antlr.collections.AST _t, boolean parens)protected voidcaptureExpressionFinish()protected voidcaptureExpressionStart()voidcaseExpr(antlr.collections.AST _t)voidcastExpression(antlr.collections.AST _t)voidcastTargetType(antlr.collections.AST _t)voidcomparisonExpr(antlr.collections.AST _t, boolean parens)voidconditionList(antlr.collections.AST _t)voidconstant(antlr.collections.AST _t)voidcount(antlr.collections.AST _t)voidcountExpr(antlr.collections.AST _t)voiddeleteStatement(antlr.collections.AST _t)voiddistinctOrAll(antlr.collections.AST _t)protected voidendFunctionTemplate(antlr.collections.AST m)voidexoticComparisonExpression(antlr.collections.AST _t)voidexpr(antlr.collections.AST _t)voidfilters(antlr.collections.AST _t)voidfrom(antlr.collections.AST _t)protected voidfromFragmentSeparator(antlr.collections.AST a)voidfromTable(antlr.collections.AST _t)protected intgetLastChar()Returns the last character written to the output, or -1 if there isn't one.protected StringBuildergetStringBuilder()voidgroupExprs(antlr.collections.AST _t)protected booleanhasText(antlr.collections.AST a)voidinList(antlr.collections.AST _t)voidinsertStatement(antlr.collections.AST _t)voidlikeEscape(antlr.collections.AST _t)voidmapComponentReference(antlr.collections.AST _t)voidmethodCall(antlr.collections.AST _t)voidmultiplicativeExpr(antlr.collections.AST _t)voidnestedExpr(antlr.collections.AST _t)voidnestedExprAfterMinusDiv(antlr.collections.AST _t)protected voidnestedFromFragment(antlr.collections.AST d, antlr.collections.AST parent)StringnullOrdering(antlr.collections.AST _t)voidnullPrecedence(antlr.collections.AST _t)protected voidnyi(antlr.collections.AST n)protected voidoptionalSpace()Add a aspace if the previous token was not a space or a parenthesis.voidorderDirection(antlr.collections.AST _t)voidorderExprs(antlr.collections.AST _t)protected voidout(antlr.collections.AST n)protected voidout(String s)voidparameter(antlr.collections.AST _t)voidparenSelect(antlr.collections.AST _t)voidquantified(antlr.collections.AST _t)protected StringrenderOrderByElement(String expression, String order, String nulls)Implementation note: This is just a stub.protected StringresetCapture()voidselectAtom(antlr.collections.AST _t)voidselectBooleanExpr(antlr.collections.AST _t, boolean parens)voidselectClause(antlr.collections.AST _t)voidselectColumn(antlr.collections.AST _t)voidselectExpr(antlr.collections.AST _t)voidselectStatement(antlr.collections.AST _t)protected voidseparator(antlr.collections.AST n, String sep)voidsetClause(antlr.collections.AST _t)voidsimpleExpr(antlr.collections.AST _t)voidsimpleExprList(antlr.collections.AST _t)voidsimpleOrTupleExpr(antlr.collections.AST _t)voidsqlToken(antlr.collections.AST _t)voidstatement(antlr.collections.AST _t)voidtableJoin(antlr.collections.AST _t, antlr.collections.AST parent)voidthetaJoins(antlr.collections.AST _t)voidtupleExpr(antlr.collections.AST _t)voidupdateStatement(antlr.collections.AST _t)voidwhereClause(antlr.collections.AST _t)voidwhereClauseExpr(antlr.collections.AST _t)voidwhereExpr(antlr.collections.AST _t)
-
-
-
字段详细资料
-
exprs
protected List<StringBuilder> exprs
-
_tokenNames
public static final String[] _tokenNames
-
_tokenSet_0
public static final antlr.collections.impl.BitSet _tokenSet_0
-
_tokenSet_1
public static final antlr.collections.impl.BitSet _tokenSet_1
-
_tokenSet_2
public static final antlr.collections.impl.BitSet _tokenSet_2
-
_tokenSet_3
public static final antlr.collections.impl.BitSet _tokenSet_3
-
_tokenSet_4
public static final antlr.collections.impl.BitSet _tokenSet_4
-
_tokenSet_5
public static final antlr.collections.impl.BitSet _tokenSet_5
-
-
方法详细资料
-
out
protected void out(String s)
-
getLastChar
protected int getLastChar()
Returns the last character written to the output, or -1 if there isn't one.
-
optionalSpace
protected void optionalSpace()
Add a aspace if the previous token was not a space or a parenthesis.
-
out
protected void out(antlr.collections.AST n)
-
separator
protected void separator(antlr.collections.AST n, String sep)
-
hasText
protected boolean hasText(antlr.collections.AST a)
-
fromFragmentSeparator
protected void fromFragmentSeparator(antlr.collections.AST a)
-
nestedFromFragment
protected void nestedFromFragment(antlr.collections.AST d, antlr.collections.AST parent)
-
getStringBuilder
protected StringBuilder getStringBuilder()
-
nyi
protected void nyi(antlr.collections.AST n)
-
beginFunctionTemplate
protected void beginFunctionTemplate(antlr.collections.AST m, antlr.collections.AST i)
-
endFunctionTemplate
protected void endFunctionTemplate(antlr.collections.AST m)
-
betweenFunctionArguments
protected void betweenFunctionArguments()
-
captureExpressionStart
protected void captureExpressionStart()
-
captureExpressionFinish
protected void captureExpressionFinish()
-
resetCapture
protected String resetCapture()
-
renderOrderByElement
protected String renderOrderByElement(String expression, String order, String nulls)
Implementation note: This is just a stub. SqlGenerator contains the effective implementation.
-
statement
public final void statement(antlr.collections.AST _t) throws antlr.RecognitionException- 抛出:
antlr.RecognitionException
-
selectStatement
public final void selectStatement(antlr.collections.AST _t) throws antlr.RecognitionException- 抛出:
antlr.RecognitionException
-
updateStatement
public final void updateStatement(antlr.collections.AST _t) throws antlr.RecognitionException- 抛出:
antlr.RecognitionException
-
deleteStatement
public final void deleteStatement(antlr.collections.AST _t) throws antlr.RecognitionException- 抛出:
antlr.RecognitionException
-
insertStatement
public final void insertStatement(antlr.collections.AST _t) throws antlr.RecognitionException- 抛出:
antlr.RecognitionException
-
selectClause
public final void selectClause(antlr.collections.AST _t) throws antlr.RecognitionException- 抛出:
antlr.RecognitionException
-
from
public final void from(antlr.collections.AST _t) throws antlr.RecognitionException- 抛出:
antlr.RecognitionException
-
whereExpr
public final void whereExpr(antlr.collections.AST _t) throws antlr.RecognitionException- 抛出:
antlr.RecognitionException
-
groupExprs
public final void groupExprs(antlr.collections.AST _t) throws antlr.RecognitionException- 抛出:
antlr.RecognitionException
-
booleanExpr
public final void booleanExpr(antlr.collections.AST _t, boolean parens) throws antlr.RecognitionException- 抛出:
antlr.RecognitionException
-
orderExprs
public final void orderExprs(antlr.collections.AST _t) throws antlr.RecognitionException- 抛出:
antlr.RecognitionException
-
fromTable
public final void fromTable(antlr.collections.AST _t) throws antlr.RecognitionException- 抛出:
antlr.RecognitionException
-
setClause
public final void setClause(antlr.collections.AST _t) throws antlr.RecognitionException- 抛出:
antlr.RecognitionException
-
whereClause
public final void whereClause(antlr.collections.AST _t) throws antlr.RecognitionException- 抛出:
antlr.RecognitionException
-
comparisonExpr
public final void comparisonExpr(antlr.collections.AST _t, boolean parens) throws antlr.RecognitionException- 抛出:
antlr.RecognitionException
-
whereClauseExpr
public final void whereClauseExpr(antlr.collections.AST _t) throws antlr.RecognitionException- 抛出:
antlr.RecognitionException
-
conditionList
public final void conditionList(antlr.collections.AST _t) throws antlr.RecognitionException- 抛出:
antlr.RecognitionException
-
expr
public final void expr(antlr.collections.AST _t) throws antlr.RecognitionException- 抛出:
antlr.RecognitionException
-
orderDirection
public final void orderDirection(antlr.collections.AST _t) throws antlr.RecognitionException- 抛出:
antlr.RecognitionException
-
nullOrdering
public final String nullOrdering(antlr.collections.AST _t) throws antlr.RecognitionException
- 抛出:
antlr.RecognitionException
-
nullPrecedence
public final void nullPrecedence(antlr.collections.AST _t) throws antlr.RecognitionException- 抛出:
antlr.RecognitionException
-
filters
public final void filters(antlr.collections.AST _t) throws antlr.RecognitionException- 抛出:
antlr.RecognitionException
-
thetaJoins
public final void thetaJoins(antlr.collections.AST _t) throws antlr.RecognitionException- 抛出:
antlr.RecognitionException
-
sqlToken
public final void sqlToken(antlr.collections.AST _t) throws antlr.RecognitionException- 抛出:
antlr.RecognitionException
-
distinctOrAll
public final void distinctOrAll(antlr.collections.AST _t) throws antlr.RecognitionException- 抛出:
antlr.RecognitionException
-
selectColumn
public final void selectColumn(antlr.collections.AST _t) throws antlr.RecognitionException- 抛出:
antlr.RecognitionException
-
selectExpr
public final void selectExpr(antlr.collections.AST _t) throws antlr.RecognitionException- 抛出:
antlr.RecognitionException
-
selectAtom
public final void selectAtom(antlr.collections.AST _t) throws antlr.RecognitionException- 抛出:
antlr.RecognitionException
-
mapComponentReference
public final void mapComponentReference(antlr.collections.AST _t) throws antlr.RecognitionException- 抛出:
antlr.RecognitionException
-
count
public final void count(antlr.collections.AST _t) throws antlr.RecognitionException- 抛出:
antlr.RecognitionException
-
methodCall
public final void methodCall(antlr.collections.AST _t) throws antlr.RecognitionException- 抛出:
antlr.RecognitionException
-
aggregate
public final void aggregate(antlr.collections.AST _t) throws antlr.RecognitionException- 抛出:
antlr.RecognitionException
-
constant
public final void constant(antlr.collections.AST _t) throws antlr.RecognitionException- 抛出:
antlr.RecognitionException
-
arithmeticExpr
public final void arithmeticExpr(antlr.collections.AST _t) throws antlr.RecognitionException- 抛出:
antlr.RecognitionException
-
selectBooleanExpr
public final void selectBooleanExpr(antlr.collections.AST _t, boolean parens) throws antlr.RecognitionException- 抛出:
antlr.RecognitionException
-
parameter
public final void parameter(antlr.collections.AST _t) throws antlr.RecognitionException- 抛出:
antlr.RecognitionException
-
countExpr
public final void countExpr(antlr.collections.AST _t) throws antlr.RecognitionException- 抛出:
antlr.RecognitionException
-
simpleExpr
public final void simpleExpr(antlr.collections.AST _t) throws antlr.RecognitionException- 抛出:
antlr.RecognitionException
-
tableJoin
public final void tableJoin(antlr.collections.AST _t, antlr.collections.AST parent) throws antlr.RecognitionException- 抛出:
antlr.RecognitionException
-
booleanOp
public final void booleanOp(antlr.collections.AST _t, boolean parens) throws antlr.RecognitionException- 抛出:
antlr.RecognitionException
-
binaryComparisonExpression
public final void binaryComparisonExpression(antlr.collections.AST _t) throws antlr.RecognitionException- 抛出:
antlr.RecognitionException
-
exoticComparisonExpression
public final void exoticComparisonExpression(antlr.collections.AST _t) throws antlr.RecognitionException- 抛出:
antlr.RecognitionException
-
likeEscape
public final void likeEscape(antlr.collections.AST _t) throws antlr.RecognitionException- 抛出:
antlr.RecognitionException
-
inList
public final void inList(antlr.collections.AST _t) throws antlr.RecognitionException- 抛出:
antlr.RecognitionException
-
quantified
public final void quantified(antlr.collections.AST _t) throws antlr.RecognitionException- 抛出:
antlr.RecognitionException
-
parenSelect
public final void parenSelect(antlr.collections.AST _t) throws antlr.RecognitionException- 抛出:
antlr.RecognitionException
-
simpleExprList
public final void simpleExprList(antlr.collections.AST _t) throws antlr.RecognitionException- 抛出:
antlr.RecognitionException
-
simpleOrTupleExpr
public final void simpleOrTupleExpr(antlr.collections.AST _t) throws antlr.RecognitionException- 抛出:
antlr.RecognitionException
-
tupleExpr
public final void tupleExpr(antlr.collections.AST _t) throws antlr.RecognitionException- 抛出:
antlr.RecognitionException
-
addrExpr
public final void addrExpr(antlr.collections.AST _t) throws antlr.RecognitionException- 抛出:
antlr.RecognitionException
-
additiveExpr
public final void additiveExpr(antlr.collections.AST _t) throws antlr.RecognitionException- 抛出:
antlr.RecognitionException
-
multiplicativeExpr
public final void multiplicativeExpr(antlr.collections.AST _t) throws antlr.RecognitionException- 抛出:
antlr.RecognitionException
-
nestedExprAfterMinusDiv
public final void nestedExprAfterMinusDiv(antlr.collections.AST _t) throws antlr.RecognitionException- 抛出:
antlr.RecognitionException
-
caseExpr
public final void caseExpr(antlr.collections.AST _t) throws antlr.RecognitionException- 抛出:
antlr.RecognitionException
-
nestedExpr
public final void nestedExpr(antlr.collections.AST _t) throws antlr.RecognitionException- 抛出:
antlr.RecognitionException
-
arguments
public final void arguments(antlr.collections.AST _t) throws antlr.RecognitionException- 抛出:
antlr.RecognitionException
-
castExpression
public final void castExpression(antlr.collections.AST _t) throws antlr.RecognitionException- 抛出:
antlr.RecognitionException
-
castTargetType
public final void castTargetType(antlr.collections.AST _t) throws antlr.RecognitionException- 抛出:
antlr.RecognitionException
-
-