Exemplo n.º 1
0
 @Override
 public void visit(IsNull obj) {
   visitNode(obj.getExpression());
   Column column = (Column) onGoingExpression.pop();
   // this will never be part of the rowid, as it can never be null, so scan
   this.doScanEvaluation = true;
 }
Exemplo n.º 2
0
  @SuppressWarnings("rawtypes")
  public static FilterConditionContext visit(
      IsNull obj, QueryBuilder queryBuilder, FilterConditionBeginContext fcbc) {
    LogManager.logTrace(LogConstants.CTX_CONNECTOR, "Parsing IsNull criteria."); // $NON-NLS-1$

    Expression exp = obj.getExpression();
    Column c = ((ColumnReference) exp).getMetadataObject();

    if (fcbc == null) {
      if (obj.isNegated()) {
        return queryBuilder.not().having(c.getSourceName()).isNull();
      }
      return queryBuilder.having(c.getSourceName()).isNull();
    }
    if (obj.isNegated()) {
      return fcbc.not().having(c.getSourceName()).isNull();
    }

    return fcbc.having(c.getSourceName()).isNull();
  }