本文整理汇总了Java中net.sf.jsqlparser.expression.operators.arithmetic.Addition类的典型用法代码示例。如果您正苦于以下问题:Java Addition类的具体用法?Java Addition怎么用?Java Addition使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Addition类属于net.sf.jsqlparser.expression.operators.arithmetic包,在下文中一共展示了Addition类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: visitBinaryExpression
import net.sf.jsqlparser.expression.operators.arithmetic.Addition; //导入依赖的package包/类
protected ISqlExpression visitBinaryExpression(BinaryExpression binaryExpression)
{
binaryExpression.getLeftExpression().accept(this);
ISqlExpression leftParameter = getExpression();
binaryExpression.getRightExpression().accept(this);
ISqlExpression rightParameter = getExpression();
if (binaryExpression instanceof Addition) {
return sSqlFactory.createAdditionExpression(leftParameter, rightParameter);
}
else if (binaryExpression instanceof Subtraction) {
return sSqlFactory.createSubstractExpression(leftParameter, rightParameter);
}
else if (binaryExpression instanceof Multiplication) {
return sSqlFactory.createMultiplyExpression(leftParameter, rightParameter);
}
else if (binaryExpression instanceof Division) {
return sSqlFactory.createDivideExpression(leftParameter, rightParameter);
}
else if (binaryExpression instanceof Concat) {
return sSqlFactory.createConcatExpression(leftParameter, rightParameter);
}
throw new UnsupportedSqlExpressionException(binaryExpression.toString());
}
示例2: getExpressionResultType
import net.sf.jsqlparser.expression.operators.arithmetic.Addition; //导入依赖的package包/类
private String getExpressionResultType(List<ProjectionItem> fromProjections) throws AmbiguousCoalesceException {
String leftTypeName = getTypeFromSubExpression(expression.getLeftExpression(), fromProjections);
String rightTypeName = getTypeFromSubExpression(expression.getRightExpression(), fromProjections);
if (expression instanceof Multiplication || expression instanceof Addition || expression instanceof Subtraction) {
return getIntegerPreservingType(leftTypeName, rightTypeName);
} else if (expression instanceof Division) {
return "java.lang.Double";
}
// tbd: better fault handling
return null;
}
示例3: visit
import net.sf.jsqlparser.expression.operators.arithmetic.Addition; //导入依赖的package包/类
@Override
public void visit(Addition addition)
{
mExpression = visitBinaryExpression(addition);
if (mOpenParenthesisCount != 0) {
decreaseOpenParenthesisCount();
}
}
示例4: visit
import net.sf.jsqlparser.expression.operators.arithmetic.Addition; //导入依赖的package包/类
@Override
public void visit(Addition expr)
{
invalid = true;
super.visit(expr);
}
示例5: visit
import net.sf.jsqlparser.expression.operators.arithmetic.Addition; //导入依赖的package包/类
@Override
public void visit(Addition expr) {
visitBinaryExpression(expr);
}
示例6: visit
import net.sf.jsqlparser.expression.operators.arithmetic.Addition; //导入依赖的package包/类
@Override
public void visit(Addition addition) {
visitBinaryExpression(addition, " + ");
}
示例7: visit
import net.sf.jsqlparser.expression.operators.arithmetic.Addition; //导入依赖的package包/类
@Override
public void visit(Addition addition) {
visitBinaryExpression(addition);
}
示例8: visit
import net.sf.jsqlparser.expression.operators.arithmetic.Addition; //导入依赖的package包/类
@Override
public void visit(Addition addition) {
// TODO Auto-generated method stub
}
示例9: visit
import net.sf.jsqlparser.expression.operators.arithmetic.Addition; //导入依赖的package包/类
@Override
public void visit(Addition adtn) {
acceptBinaryExpression(adtn);
}
示例10: visit
import net.sf.jsqlparser.expression.operators.arithmetic.Addition; //导入依赖的package包/类
@Override
public void visit(Addition arg0) {
log.debug("sql expression = " + arg0.toString());
value = arg0.toString();
}
示例11: visit
import net.sf.jsqlparser.expression.operators.arithmetic.Addition; //导入依赖的package包/类
public void visit(Addition addition) {
visitBinaryExpression(addition);
}
示例12: visit
import net.sf.jsqlparser.expression.operators.arithmetic.Addition; //导入依赖的package包/类
@Override
public void visit(Addition arg0) {
isSimple = false;
}
示例13: visit
import net.sf.jsqlparser.expression.operators.arithmetic.Addition; //导入依赖的package包/类
public void visit(Addition addition) {
visitBinaryExpression(addition, (addition.getComment() != null ? " " + addition.getComment() + ExpressionDeParser.LINE_SEPARATOR : "") + " + ");
}
示例14: visit
import net.sf.jsqlparser.expression.operators.arithmetic.Addition; //导入依赖的package包/类
public void visit(Addition addition) {
visitBinaryExpression(addition);
}
示例15: visit
import net.sf.jsqlparser.expression.operators.arithmetic.Addition; //导入依赖的package包/类
public void visit(Addition addition) {
visitBinaryExpression(addition);
}