本文整理汇总了Java中com.alibaba.druid.sql.ast.expr.SQLBinaryOpExpr.and方法的典型用法代码示例。如果您正苦于以下问题:Java SQLBinaryOpExpr.and方法的具体用法?Java SQLBinaryOpExpr.and怎么用?Java SQLBinaryOpExpr.and使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.alibaba.druid.sql.ast.expr.SQLBinaryOpExpr
的用法示例。
在下文中一共展示了SQLBinaryOpExpr.and方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addConditionn
import com.alibaba.druid.sql.ast.expr.SQLBinaryOpExpr; //导入方法依赖的package包/类
public void addConditionn(SQLExpr condition) {
this.condition = SQLBinaryOpExpr.and(this.condition, condition);
}
示例2: addConditionnIfAbsent
import com.alibaba.druid.sql.ast.expr.SQLBinaryOpExpr; //导入方法依赖的package包/类
public void addConditionnIfAbsent(SQLExpr condition) {
if (this.containsCondition(condition)) {
return;
}
this.condition = SQLBinaryOpExpr.and(this.condition, condition);
}
示例3: rearrangement
import com.alibaba.druid.sql.ast.expr.SQLBinaryOpExpr; //导入方法依赖的package包/类
/**
* a inner_join (b inner_join c) -< a inner_join b innre_join c
*/
public void rearrangement() {
if (joinType != JoinType.COMMA && joinType != JoinType.INNER_JOIN) {
return;
}
if (right instanceof SQLJoinTableSource) {
SQLJoinTableSource rightJoin = (SQLJoinTableSource) right;
if (rightJoin.joinType != JoinType.COMMA && rightJoin.joinType != JoinType.INNER_JOIN) {
return;
}
SQLTableSource a = left;
SQLTableSource b = rightJoin.getLeft();
SQLTableSource c = rightJoin.getRight();
SQLExpr on_ab = condition;
SQLExpr on_bc = rightJoin.condition;
setLeft(rightJoin);
rightJoin.setLeft(a);
rightJoin.setRight(b);
boolean on_ab_match = false;
if (on_ab instanceof SQLBinaryOpExpr) {
SQLBinaryOpExpr on_ab_binaryOpExpr = (SQLBinaryOpExpr) on_ab;
if (on_ab_binaryOpExpr.getLeft() instanceof SQLPropertyExpr
&& on_ab_binaryOpExpr.getRight() instanceof SQLPropertyExpr) {
String leftOwnerName = ((SQLPropertyExpr) on_ab_binaryOpExpr.getLeft()).getOwnernName();
String rightOwnerName = ((SQLPropertyExpr) on_ab_binaryOpExpr.getRight()).getOwnernName();
if (rightJoin.containsAlias(leftOwnerName) && rightJoin.containsAlias(rightOwnerName)) {
on_ab_match = true;
}
}
}
if (on_ab_match) {
rightJoin.setCondition(on_ab);
} else {
rightJoin.setCondition(null);
on_bc = SQLBinaryOpExpr.and(on_bc, on_ab);
}
setRight(c);
setCondition(on_bc);
}
}