コード例 #1
0
  public ValueExpressionEvaluator(ValueExpr expr, SQLBuilder parent, ValueType optype) {
    this.parent = parent;

    optypes.push(optype);

    if (log.isTraceEnabled()) {
      long start = System.currentTimeMillis();
      expr.visit(this);
      log.trace("expression evaluated in {} ms", (System.currentTimeMillis() - start));
    } else {
      expr.visit(this);
    }
  }
コード例 #2
0
  @Override
  public void meet(Bound node) throws RuntimeException {
    ValueExpr arg = node.getArg();

    if (arg instanceof ValueConstant) {
      builder.append(Boolean.toString(true));
    } else if (arg instanceof Var) {
      builder.append("(");
      optypes.push(ValueType.NODE);
      arg.visit(this);
      optypes.pop();
      builder.append(" IS NOT NULL)");
    }
  }