亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? sql-gen.g

?? hibernate 開源框架的代碼 jar包希望大家能喜歡
?? G
字號:
header{//   $Id: sql-gen.g 10001 2006-06-08 21:08:04Z steve.ebersole@jboss.com $package org.hibernate.hql.antlr;import org.slf4j.Logger;import org.slf4j.LoggerFactory;}/** * 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. * <br> * 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. * @author Joshua Davis (joshua@hibernate.org) */class SqlGeneratorBase extends TreeParser;options {	// Note: importVocab and exportVocab cause ANTLR to share the token type numbers between the	// two grammars.  This means that the token type constants from the source tree are the same	// as those in the target tree.  If this is not the case, tree translation can result in	// token types from the *source* tree being present in the target tree.	importVocab=HqlSql;         // import definitions from "HqlSql"	exportVocab=Sql;            // Call the resulting definitions "Sql"	buildAST=false;             // Don't build an AST.}{	private static Logger log = LoggerFactory.getLogger(SqlGeneratorBase.class);   /** the buffer resulting SQL statement is written to */	private StringBuffer buf = new StringBuffer();	protected void out(String s) {		buf.append(s);	}	/**	 * Returns the last character written to the output, or -1 if there isn't one.	 */	protected int getLastChar() {		int len = buf.length();		if ( len == 0 )			return -1;		else			return buf.charAt( len - 1 );	}	/**	 * Add a aspace if the previous token was not a space or a parenthesis.	 */	protected void optionalSpace() {		// Implemented in the sub-class.	}	protected void out(AST n) {		out(n.getText());	}	protected void separator(AST n, String sep) {		if (n.getNextSibling() != null)			out(sep);	}	protected boolean hasText(AST a) {		String t = a.getText();		return t != null && t.length() > 0;	}	protected void fromFragmentSeparator(AST a) {		// moved this impl into the subclass...	}	protected void nestedFromFragment(AST d,AST parent) {		// moved this impl into the subclass...	}	protected StringBuffer getStringBuffer() {		return buf;	}	protected void nyi(AST n) {		throw new UnsupportedOperationException("Unsupported node: " + n);	}	protected void beginFunctionTemplate(AST m,AST i) {		// if template is null we just write the function out as it appears in the hql statement		out(i);		out("(");	}	protected void endFunctionTemplate(AST m) {	      out(")");	}	protected void commaBetweenParameters(String comma) {		out(comma);	}}statement	: selectStatement	| updateStatement	| deleteStatement	| insertStatement	;selectStatement	: #(SELECT { out("select "); }		selectClause		from		( #(WHERE { out(" where "); } whereExpr ) )?		( #(GROUP { out(" group by "); } groupExprs ( #(HAVING { out(" having "); } booleanExpr[false]) )? ) )?		( #(ORDER { out(" order by "); } orderExprs ) )?	)	;// Note: eats the FROM token node, as it is not valid in an update statement.// It's outlived its usefulness after analysis phase :)// TODO : needed to use conditionList directly here and deleteStatement, as whereExprs no longer works for this stuffupdateStatement	: #(UPDATE { out("update "); }		#( FROM fromTable )		setClause		(whereClause)?	)	;deleteStatement	// Note: not space needed at end of "delete" because the from rule included one before the "from" it outputs	: #(DELETE { out("delete"); }		from		(whereClause)?	)	;insertStatement	: #(INSERT { out( "insert " ); }		i:INTO { out( i ); out( " " ); }		selectStatement	)	;setClause	// Simply re-use comparisionExpr, because it already correctly defines the EQ rule the	// way it is needed here; not the most aptly named, but ah	: #( SET { out(" set "); } comparisonExpr[false] ( { out(", "); } comparisonExpr[false] )* )	;whereClause	: #(WHERE { out(" where "); } whereClauseExpr )	;whereClauseExpr	: (SQL_TOKEN) => conditionList	| booleanExpr[ false ]	;orderExprs	// TODO: remove goofy space before the comma when we don't have to regression test anymore.	: ( expr ) (dir:orderDirection { out(" "); out(dir); })? ( {out(", "); } orderExprs)?	;groupExprs	// TODO: remove goofy space before the comma when we don't have to regression test anymore.	: expr ( {out(" , "); } groupExprs)?	;orderDirection	: ASCENDING	| DESCENDING	;whereExpr	// Expect the filter subtree, followed by the theta join subtree, followed by the HQL condition subtree.	// Might need parens around the HQL condition if there is more than one subtree.	// Put 'and' between each subtree.	: filters		( { out(" and "); } thetaJoins )?		( { out(" and "); } booleanExpr [ true ] )?	| thetaJoins		( { out(" and "); } booleanExpr [ true ] )? 	| booleanExpr[false]	;filters	: #(FILTERS conditionList )	;thetaJoins	: #(THETA_JOINS conditionList )	;conditionList	: sqlToken ( { out(" and "); } conditionList )?	;selectClause	: #(SELECT_CLAUSE (distinctOrAll)? ( selectColumn )+ )	;selectColumn	: p:selectExpr (sc:SELECT_COLUMNS { out(sc); } )? { separator( (sc != null) ? sc : p,", "); }	;selectExpr	: e:selectAtom { out(e); }	| count	| #(CONSTRUCTOR (DOT | IDENT) ( selectColumn )+ )	| methodCall	| aggregate	| c:constant { out(c); }	| arithmeticExpr	| PARAM { out("?"); }	| sn:SQL_NODE { out(sn); }	| { out("("); } selectStatement { out(")"); }	;count	: #(COUNT { out("count("); }  ( distinctOrAll ) ? countExpr { out(")"); } )	;distinctOrAll	: DISTINCT { out("distinct "); }	| ALL { out("all "); }	;countExpr	// Syntacitic predicate resolves star all by itself, avoiding a conflict with STAR in expr.	: ROW_STAR { out("*"); }	| simpleExpr	;selectAtom	: DOT	| SQL_TOKEN	| ALIAS_REF	| SELECT_EXPR	;// The from-clause piece is all goofed up.  Currently, nodes of type FROM_FRAGMENT// and JOIN_FRAGMENT can occur at any level in the FromClause sub-tree. We really// should come back and clean this up at some point; which I think will require// a post-HqlSqlWalker phase to "re-align" the FromElements in a more sensible// manner.from	: #(f:FROM { out(" from "); }		(fromTable)* )	;fromTable	// Write the table node (from fragment) and all the join fragments associated with it.	: #( a:FROM_FRAGMENT  { out(a); } (tableJoin [ a ])* { fromFragmentSeparator(a); } )	| #( b:JOIN_FRAGMENT  { out(b); } (tableJoin [ b ])* { fromFragmentSeparator(b); } )	;tableJoin [ AST parent ]	: #( c:JOIN_FRAGMENT { out(" "); out(c); } (tableJoin [ c ] )* )	| #( d:FROM_FRAGMENT { nestedFromFragment(d,parent); } (tableJoin [ d ] )* )	;booleanOp[ boolean parens ]	: #(AND booleanExpr[true] { out(" and "); } booleanExpr[true])	| #(OR { if (parens) out("("); } booleanExpr[false] { out(" or "); } booleanExpr[false] { if (parens) out(")"); })	| #(NOT { out(" not ("); } booleanExpr[false] { out(")"); } )	;booleanExpr[ boolean parens ]	: booleanOp [ parens ]	| comparisonExpr [ parens ]	| st:SQL_TOKEN { out(st); } // solely for the purpose of mapping-defined where-fragments	;	comparisonExpr[ boolean parens ]	: binaryComparisonExpression	| { if (parens) out("("); } exoticComparisonExpression { if (parens) out(")"); }	;	binaryComparisonExpression	: #(EQ expr { out("="); } expr)	| #(NE expr { out("<>"); } expr)	| #(GT expr { out(">"); } expr)	| #(GE expr { out(">="); } expr)	| #(LT expr { out("<"); } expr)	| #(LE expr { out("<="); } expr)	;	exoticComparisonExpression	: #(LIKE expr { out(" like "); } expr likeEscape )	| #(NOT_LIKE expr { out(" not like "); } expr likeEscape)	| #(BETWEEN expr { out(" between "); } expr { out(" and "); } expr)	| #(NOT_BETWEEN expr { out(" not between "); } expr { out(" and "); } expr)	| #(IN expr { out(" in"); } inList )	| #(NOT_IN expr { out(" not in "); } inList )	| #(EXISTS { optionalSpace(); out("exists "); } quantified )	| #(IS_NULL expr) { out(" is null"); }	| #(IS_NOT_NULL expr) { out(" is not null"); }	;likeEscape	: ( #(ESCAPE { out(" escape "); } expr) )?	;inList	: #(IN_LIST { out(" "); } ( parenSelect | simpleExprList ) )	;	simpleExprList	: { out("("); } (e:simpleExpr { separator(e," , "); } )* { out(")"); }	;// A simple expression, or a sub-select with parens around it.expr	: simpleExpr	| #( VECTOR_EXPR { out("("); } (e:expr { separator(e," , "); } )*  { out(")"); } )	| parenSelect	| #(ANY { out("any "); } quantified )	| #(ALL { out("all "); } quantified )	| #(SOME { out("some "); } quantified )	;	quantified	: { out("("); } ( sqlToken | selectStatement ) { out(")"); } 	;	parenSelect	: { out("("); } selectStatement { out(")"); }	;	simpleExpr	: c:constant { out(c); }	| NULL { out("null"); }	| addrExpr	| sqlToken	| aggregate	| methodCall	| count	| parameter	| arithmeticExpr	;	constant	: NUM_DOUBLE	| NUM_FLOAT	| NUM_INT	| NUM_LONG	| QUOTED_STRING	| CONSTANT	| JAVA_CONSTANT	| TRUE	| FALSE	| IDENT	;	arithmeticExpr	: additiveExpr	| multiplicativeExpr//	| #(CONCAT { out("("); } expr ( { out("||"); } expr )+ { out(")"); } )	| #(UNARY_MINUS { out("-"); } expr)	| caseExpr	;additiveExpr	: #(PLUS expr { out("+"); } expr)	| #(MINUS expr { out("-"); } nestedExprAfterMinusDiv)	;multiplicativeExpr	: #(STAR nestedExpr { out("*"); } nestedExpr)	| #(DIV nestedExpr { out("/"); } nestedExprAfterMinusDiv)	;nestedExpr	// Generate parens around nested additive expressions, use a syntactic predicate to avoid conflicts with 'expr'.	: (additiveExpr) => { out("("); } additiveExpr { out(")"); }	| expr	;	nestedExprAfterMinusDiv	// Generate parens around nested arithmetic expressions, use a syntactic predicate to avoid conflicts with 'expr'.	: (arithmeticExpr) => { out("("); } arithmeticExpr { out(")"); }	| expr	;caseExpr	: #(CASE { out("case"); } 		( #(WHEN { out( " when "); } booleanExpr[false] { out(" then "); } expr) )+ 		( #(ELSE { out(" else "); } expr) )?		{ out(" end"); } )	| #(CASE2 { out("case "); } expr		( #(WHEN { out( " when "); } expr { out(" then "); } expr) )+ 		( #(ELSE { out(" else "); } expr) )?		{ out(" end"); } )	;aggregate	: #(a:AGGREGATE { out(a); out("("); }  expr { out(")"); } )	;methodCall	: #(m:METHOD_CALL i:METHOD_NAME { beginFunctionTemplate(m,i); }	 ( #(EXPR_LIST (arguments)? ) )?	 { endFunctionTemplate(m); } )	;arguments	: expr ( { commaBetweenParameters(", "); } expr )*	;parameter	: n:NAMED_PARAM { out(n); }	| p:PARAM { out(p); }	;addrExpr	: #(r:DOT . .) { out(r); }	| i:ALIAS_REF { out(i); }	| j:INDEX_OP { out(j); }	;sqlToken	: t:SQL_TOKEN { out(t); }	;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
在线观看日韩电影| 极品瑜伽女神91| www国产精品av| 欧美日本韩国一区| 北条麻妃国产九九精品视频| 麻豆91精品视频| 视频一区视频二区中文| 一区二区不卡在线视频 午夜欧美不卡在| 久久精品人人做人人爽97| 7799精品视频| 884aa四虎影成人精品一区| 欧美三级欧美一级| 欧美日韩专区在线| 欧美日韩精品一区二区三区蜜桃| 91亚洲资源网| 在线欧美日韩国产| 在线观看国产91| 欧美亚洲一区三区| 91老司机福利 在线| 色综合中文字幕国产 | 欧美第一区第二区| 日韩免费高清av| 日韩欧美第一区| 国产午夜亚洲精品羞羞网站| 久久精品在线观看| 国产精品第一页第二页第三页| 国产欧美精品国产国产专区 | 狂野欧美性猛交blacked| 蜜桃视频在线一区| 国产一区二区三区观看| 国产精品一区在线观看乱码| 国产91在线观看丝袜| 99久久精品免费观看| 在线精品视频小说1| 91精品国产综合久久久久久漫画| 欧美一区二区三区性视频| 欧美电视剧免费观看| 亚洲国产高清aⅴ视频| 亚洲欧美激情视频在线观看一区二区三区 | 五月综合激情婷婷六月色窝| 日本伊人色综合网| 国产精品一区二区91| 国产精品 欧美精品| 91美女在线看| 日韩片之四级片| 国产精品视频麻豆| 亚洲午夜成aⅴ人片| 美女视频一区在线观看| 懂色av噜噜一区二区三区av| 色婷婷综合久久久久中文 | 亚洲一区二区三区四区在线观看 | 国产精品亚洲成人| 日本韩国欧美一区| 欧美一卡在线观看| 国产视频一区在线播放| 一区二区三区在线视频免费| 奇米精品一区二区三区在线观看| 国产大陆a不卡| 欧美在线短视频| 国产视频在线观看一区二区三区 | 精品视频在线免费观看| 精品国产成人在线影院| 国产精品久久久久久户外露出| 亚洲国产日韩a在线播放性色| 久久精品国产精品亚洲综合| 91在线无精精品入口| 欧美一卡2卡三卡4卡5免费| 中文字幕一区二区三区四区不卡| 性做久久久久久免费观看| 国产成人免费9x9x人网站视频| 欧洲色大大久久| 国产日韩v精品一区二区| 香蕉av福利精品导航| 成人av小说网| 2022国产精品视频| 香港成人在线视频| 色噜噜狠狠成人中文综合| 久久久久久久久一| 午夜国产不卡在线观看视频| 成人国产在线观看| 日韩免费性生活视频播放| 亚洲成人免费在线观看| 99精品视频在线观看| 26uuu色噜噜精品一区二区| 亚洲成人你懂的| 欧美在线免费视屏| 亚洲日本护士毛茸茸| 国产成人a级片| 精品毛片乱码1区2区3区| 亚洲国产精品一区二区尤物区| 国产老肥熟一区二区三区| 欧美一级黄色片| 午夜精品国产更新| 欧美日韩一区三区四区| 一区二区三区四区不卡在线| 国产999精品久久| 国产欧美一区二区精品婷婷 | 欧美日韩国产bt| 亚洲视频一区二区免费在线观看| 国产成人自拍高清视频在线免费播放| 欧美一区二视频| 日本不卡视频在线| 欧美一区二区视频在线观看 | 国产精品福利一区| 国产成人av一区二区三区在线 | 欧美性xxxxx极品少妇| 亚洲视频免费在线| 色婷婷av一区二区三区大白胸| 中文字幕一区二区三| zzijzzij亚洲日本少妇熟睡| 中文字幕精品—区二区四季| 成人久久久精品乱码一区二区三区 | 国产精品欧美极品| av在线不卡网| 亚洲女人的天堂| 精品视频在线看| 日韩精品电影在线观看| 91精品欧美福利在线观看| 日韩不卡免费视频| 欧美v国产在线一区二区三区| 美女免费视频一区二区| 2017欧美狠狠色| 成人综合激情网| 亚洲人精品一区| 欧美天堂一区二区三区| 婷婷久久综合九色综合绿巨人| 91精品一区二区三区久久久久久 | 日韩欧美色综合网站| 国产一区二区三区国产| 欧美国产成人在线| 色屁屁一区二区| 日韩成人av影视| 国产精品丝袜一区| 88在线观看91蜜桃国自产| 国产老肥熟一区二区三区| 日韩一区中文字幕| 欧美日韩精品欧美日韩精品| 极品少妇xxxx偷拍精品少妇| 欧美激情资源网| 欧美裸体一区二区三区| 国产精品中文有码| 夜夜爽夜夜爽精品视频| 精品国产一区二区在线观看| 91麻豆免费视频| 久久国产三级精品| 夜夜爽夜夜爽精品视频| 国产婷婷精品av在线| 欧美日韩一区二区三区高清| 国产一区二区视频在线播放| 亚洲精品欧美激情| 精品国产第一区二区三区观看体验 | 国产精品一线二线三线精华| 亚洲1区2区3区4区| 中文字幕+乱码+中文字幕一区| 欧美亚洲一区二区在线观看| 国产精品538一区二区在线| 亚洲国产欧美一区二区三区丁香婷| 精品国产露脸精彩对白| 欧美日韩国产一级| 99热在这里有精品免费| 国产一区二区在线电影| 午夜精品久久久久久久久久久| 中文字幕高清不卡| 精品国产一区二区三区四区四| 色综合中文字幕国产| 欧美区在线观看| 欧美日韩国产小视频| 色综合中文字幕国产| 欧美疯狂做受xxxx富婆| 欧美福利电影网| 欧美日韩国产综合视频在线观看| 成人激情开心网| 另类成人小视频在线| 日韩成人一级片| 视频一区二区三区在线| 亚洲主播在线观看| 一区二区三区.www| 亚洲男同性恋视频| 亚洲欧洲在线观看av| 国产欧美日韩另类一区| 久久综合久久99| 欧美一级日韩免费不卡| 精品视频免费在线| 欧美午夜在线观看| 在线观看视频一区二区欧美日韩| 不卡欧美aaaaa| 91香蕉视频污在线| 色偷偷88欧美精品久久久| 91天堂素人约啪| 色av成人天堂桃色av| 91福利在线免费观看| 欧美视频在线一区二区三区 | 国产精品女主播在线观看| 国产欧美日韩精品在线| 国产精品麻豆视频| 国产精品女同一区二区三区| 中文字幕中文字幕一区| 亚洲三级在线观看| 亚洲一级二级三级在线免费观看| 亚洲一区二区欧美激情|