本文整理汇总了Java中net.sf.jsqlparser.expression.WhenClause类的典型用法代码示例。如果您正苦于以下问题:Java WhenClause类的具体用法?Java WhenClause怎么用?Java WhenClause使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
WhenClause类属于net.sf.jsqlparser.expression包,在下文中一共展示了WhenClause类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: WhenThenSearchCondition
import net.sf.jsqlparser.expression.WhenClause; //导入依赖的package包/类
final public WhenClause WhenThenSearchCondition() throws ParseException {WhenClause whenThen = new WhenClause();
Expression whenExp = null;
Expression thenExp = null;
Token tk = null;
tk = jj_consume_token(K_WHEN);
if (tk.specialToken != null) {
whenThen.setCommentWhen(tk.specialToken.image);
}
whenExp = Expression();
tk = jj_consume_token(K_THEN);
if (tk.specialToken != null) {
whenThen.setCommentThen(tk.specialToken.image);
}
thenExp = SimpleExpression();
whenThen.setWhenExpression(whenExp);
whenThen.setThenExpression(thenExp);
{if ("" != null) return whenThen;}
throw new Error("Missing return statement in function");
}
开发者ID:marat-gainullin,项目名称:platypus-js,代码行数:20,代码来源:CCJSqlParser.java
示例2: WhenThenValue
import net.sf.jsqlparser.expression.WhenClause; //导入依赖的package包/类
final public WhenClause WhenThenValue() throws ParseException {WhenClause whenThen = new WhenClause();
Expression whenExp = null;
Expression thenExp = null;
Token tk = null;
tk = jj_consume_token(K_WHEN);
if (tk.specialToken != null) {
whenThen.setCommentWhen(tk.specialToken.image);
}
whenExp = PrimaryExpression();
tk = jj_consume_token(K_THEN);
if (tk.specialToken != null) {
whenThen.setCommentThen(tk.specialToken.image);
}
thenExp = SimpleExpression();
whenThen.setWhenExpression(whenExp);
whenThen.setThenExpression(thenExp);
{if ("" != null) return whenThen;}
throw new Error("Missing return statement in function");
}
开发者ID:marat-gainullin,项目名称:platypus-js,代码行数:20,代码来源:CCJSqlParser.java
示例3: visit
import net.sf.jsqlparser.expression.WhenClause; //导入依赖的package包/类
@Override
public void visit(WhenClause whenClause) {
buffer.append("WHEN ");
whenClause.getWhenExpression().accept(this);
buffer.append(" THEN ");
whenClause.getThenExpression().accept(this);
buffer.append(" ");
}
开发者ID:WeiMei-Tian,项目名称:editor-sql,代码行数:9,代码来源:ExpressionDeParser.java
示例4: create
import net.sf.jsqlparser.expression.WhenClause; //导入依赖的package包/类
public static CompiledCaseExpression create(String validatedTableAlias, CaseExpression caseExpression) {
Expression switchExpression = caseExpression.getSwitchExpression();
if (switchExpression != null) {
throw new StatementExecutionException("unhandled expression CASE SWITCH, type " + caseExpression.getClass() + ": " + caseExpression);
}
List<Entry<CompiledSQLExpression, CompiledSQLExpression>> whens = null;
if (caseExpression.getWhenClauses() != null) {
whens = new ArrayList<>();
for (Expression when : caseExpression.getWhenClauses()) {
WhenClause whenClause = (WhenClause) when;
CompiledSQLExpression whenCondition = compileExpression(validatedTableAlias, whenClause.getWhenExpression());
if (whenCondition == null) {
return null;
}
CompiledSQLExpression thenExpr = compileExpression(validatedTableAlias, whenClause.getThenExpression());
whens.add(new AbstractMap.SimpleImmutableEntry<>(whenCondition, thenExpr));
}
}
Expression elseExp = caseExpression.getElseExpression();
if (elseExp != null) {
CompiledSQLExpression elseExpression = compileExpression(validatedTableAlias, elseExp);
if (elseExpression == null) {
return null;
}
return new CompiledCaseExpression(whens, elseExpression);
} else {
return new CompiledCaseExpression(whens, null);
}
}
开发者ID:diennea,项目名称:herddb,代码行数:30,代码来源:CompiledCaseExpression.java
示例5: visit
import net.sf.jsqlparser.expression.WhenClause; //导入依赖的package包/类
@Override
public void visit(WhenClause wc) {
if (wc.getThenExpression() != null) {
wc.getThenExpression().accept(this);
}
if (wc.getWhenExpression() != null) {
wc.getWhenExpression().accept(this);
}
}
开发者ID:diennea,项目名称:herddb,代码行数:10,代码来源:ColumnReferencesDiscovery.java
示例6: WhenThenSearchCondition
import net.sf.jsqlparser.expression.WhenClause; //导入依赖的package包/类
final public WhenClause WhenThenSearchCondition() throws ParseException {
WhenClause whenThen = new WhenClause();
Expression whenExp = null;
Expression thenExp = null;
jj_consume_token(K_WHEN);
whenExp = Expression();
jj_consume_token(K_THEN);
thenExp = Expression();
whenThen.setWhenExpression(whenExp);
whenThen.setThenExpression(thenExp);
{if (true) return whenThen;}
throw new Error("Missing return statement in function");
}
开发者ID:UBOdin,项目名称:jsqlparser,代码行数:14,代码来源:CCJSqlParser.java
示例7: WhenThenValue
import net.sf.jsqlparser.expression.WhenClause; //导入依赖的package包/类
final public WhenClause WhenThenValue() throws ParseException {
WhenClause whenThen = new WhenClause();
Expression whenExp = null;
Expression thenExp = null;
jj_consume_token(K_WHEN);
whenExp = Expression();
jj_consume_token(K_THEN);
thenExp = Expression();
whenThen.setWhenExpression(whenExp);
whenThen.setThenExpression(thenExp);
{if (true) return whenThen;}
throw new Error("Missing return statement in function");
}
开发者ID:UBOdin,项目名称:jsqlparser,代码行数:14,代码来源:CCJSqlParser.java
示例8: visit
import net.sf.jsqlparser.expression.WhenClause; //导入依赖的package包/类
@Override
public void visit(CaseExpression ce) {
for (Iterator it = ce.getWhenClauses().iterator(); it.hasNext();) {
((WhenClause) it.next()).accept(this);
}
ce.getSwitchExpression().accept(this);
ce.getElseExpression().accept(this);
}
开发者ID:valdasraps,项目名称:resthub,代码行数:9,代码来源:AbstractAllParser.java
示例9: visit
import net.sf.jsqlparser.expression.WhenClause; //导入依赖的package包/类
@Override
public void visit(WhenClause expr)
{
invalid = true;
super.visit(expr);
}
开发者ID:olavloite,项目名称:spanner-jdbc,代码行数:7,代码来源:DMLWhereClauseVisitorAdapter.java
示例10: WhenThenSearchCondition
import net.sf.jsqlparser.expression.WhenClause; //导入依赖的package包/类
final public WhenClause WhenThenSearchCondition() throws ParseException {
/* @bgen(jjtree) WhenThenSearchCondition */
SimpleNode jjtn000 = new SimpleNode(JJTWHENTHENSEARCHCONDITION);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
WhenClause whenThen = new WhenClause();
Expression whenExp = null;
Expression thenExp = null;
try {
jj_consume_token(K_WHEN);
whenExp = Expression();
jj_consume_token(K_THEN);
thenExp = SimpleExpression();
jjtree.closeNodeScope(jjtn000, true);
jjtc000 = false;
whenThen.setWhenExpression(whenExp);
whenThen.setThenExpression(thenExp);
{
if (true)
return whenThen;
}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{
if (true)
throw (RuntimeException) jjte000;
}
}
if (jjte000 instanceof ParseException) {
{
if (true)
throw (ParseException) jjte000;
}
}
{
if (true)
throw (Error) jjte000;
}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
throw new Error("Missing return statement in function");
}
开发者ID:WeiMei-Tian,项目名称:editor-sql,代码行数:52,代码来源:CCJSqlParser.java
示例11: WhenThenValue
import net.sf.jsqlparser.expression.WhenClause; //导入依赖的package包/类
final public WhenClause WhenThenValue() throws ParseException {
/* @bgen(jjtree) WhenThenValue */
SimpleNode jjtn000 = new SimpleNode(JJTWHENTHENVALUE);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
WhenClause whenThen = new WhenClause();
Expression whenExp = null;
Expression thenExp = null;
try {
jj_consume_token(K_WHEN);
whenExp = PrimaryExpression();
jj_consume_token(K_THEN);
thenExp = SimpleExpression();
jjtree.closeNodeScope(jjtn000, true);
jjtc000 = false;
whenThen.setWhenExpression(whenExp);
whenThen.setThenExpression(thenExp);
{
if (true)
return whenThen;
}
} catch (Throwable jjte000) {
if (jjtc000) {
jjtree.clearNodeScope(jjtn000);
jjtc000 = false;
} else {
jjtree.popNode();
}
if (jjte000 instanceof RuntimeException) {
{
if (true)
throw (RuntimeException) jjte000;
}
}
if (jjte000 instanceof ParseException) {
{
if (true)
throw (ParseException) jjte000;
}
}
{
if (true)
throw (Error) jjte000;
}
} finally {
if (jjtc000) {
jjtree.closeNodeScope(jjtn000, true);
}
}
throw new Error("Missing return statement in function");
}
开发者ID:WeiMei-Tian,项目名称:editor-sql,代码行数:52,代码来源:CCJSqlParser.java
示例12: visit
import net.sf.jsqlparser.expression.WhenClause; //导入依赖的package包/类
@Override
public void visit(WhenClause whenClause) {
}
开发者ID:WeiMei-Tian,项目名称:editor-sql,代码行数:4,代码来源:TablesNamesFinder.java
示例13: visit
import net.sf.jsqlparser.expression.WhenClause; //导入依赖的package包/类
@Override
public void visit(WhenClause whenClause) {
// TODO Auto-generated method stub
}
开发者ID:devpage,项目名称:sharding-quickstart,代码行数:6,代码来源:TablesNamesFinder.java
示例14: visit
import net.sf.jsqlparser.expression.WhenClause; //导入依赖的package包/类
@Override
public void visit(WhenClause whenClause) {
whenClause.getWhenExpression().accept(this);
whenClause.getThenExpression().accept(this);
}
开发者ID:diennea,项目名称:herddb,代码行数:6,代码来源:JdbcQueryRewriter.java
示例15: visit
import net.sf.jsqlparser.expression.WhenClause; //导入依赖的package包/类
@Override
public void visit(WhenClause arg0) {
log.debug("sql expression = " + arg0.toString());
value = arg0.toString();
}
开发者ID:Wolfgang-Winter,项目名称:cibet,代码行数:6,代码来源:SqlExpressionParser.java
示例16: visit
import net.sf.jsqlparser.expression.WhenClause; //导入依赖的package包/类
public void visit(WhenClause whenClause) {
}
开发者ID:scouter-project,项目名称:scouter,代码行数:3,代码来源:TableFinder.java
示例17: visit
import net.sf.jsqlparser.expression.WhenClause; //导入依赖的package包/类
@Override
public void visit(WhenClause arg0) {
isSimple = false;
}
开发者ID:coastland,项目名称:gsp-dba-maven-plugin,代码行数:5,代码来源:ViewAnalyzer.java
示例18: visit
import net.sf.jsqlparser.expression.WhenClause; //导入依赖的package包/类
@Override
public void visit(WhenClause whenClause) {
// TODO Auto-generated method stub
}
开发者ID:marat-gainullin,项目名称:platypus-js,代码行数:5,代码来源:TablesFinder.java
示例19: visit
import net.sf.jsqlparser.expression.WhenClause; //导入依赖的package包/类
public void visit(WhenClause whenClause) {
buffer.append(whenClause.getCommentWhen() != null ? " " + whenClause.getCommentWhen() + ExpressionDeParser.LINE_SEPARATOR : "").append(" When ");
whenClause.getWhenExpression().accept(this);
buffer.append(whenClause.getCommentThen() != null ? " " + whenClause.getCommentThen() + ExpressionDeParser.LINE_SEPARATOR : "").append(" Then ");
whenClause.getThenExpression().accept(this);
}
开发者ID:marat-gainullin,项目名称:platypus-js,代码行数:7,代码来源:ExpressionDeParser.java
示例20: visit
import net.sf.jsqlparser.expression.WhenClause; //导入依赖的package包/类
public void visit(WhenClause whenClause) {
// TODO Auto-generated method stub
}
开发者ID:marat-gainullin,项目名称:platypus-js,代码行数:4,代码来源:TablesNamesFinder.java
注:本文中的net.sf.jsqlparser.expression.WhenClause类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论