Package org.openrdf.sail.rdbms.algebra

Examples of org.openrdf.sail.rdbms.algebra.SqlNull


  public SqlExpr createLanguageExpr(ValueExpr expr)
    throws UnsupportedRdbmsOperatorException
  {
    result = null;
    if (expr == null) {
      return new SqlNull();
    }
    expr.visit(this);
    if (result == null) {
      return new SqlNull();
    }
    return result;
  }
View Full Code Here


      if (arg instanceof FalseValue) {
        replace(node, new FalseValue());
        return;
      }
      else if (arg instanceof SqlNull) {
        replace(node, new SqlNull());
        return;
      }
      else if (arg instanceof TrueValue) {
        node.removeChildNode(arg);
      }
View Full Code Here

        break;
      }
    }
    entries = node.getEntries();
    if (entries.isEmpty()) {
      replace(node, new SqlNull());
    }
    else if (entries.size() == 1) {
      Entry entry = entries.get(0);
      if (entry.getCondition() instanceof TrueValue) {
        replace(node, entry.getResult().clone());
      }
      else if (entry.getCondition() instanceof FalseValue) {
        replace(node, new SqlNull());
      }
      else if (entry.getCondition() instanceof SqlNot) {
        SqlNot not = (SqlNot)entry.getCondition();
        if (not.getArg() instanceof SqlIsNull) {
          SqlIsNull is = (SqlIsNull)not.getArg();
View Full Code Here

  {
    super.meet(node);
    SqlExpr left = node.getLeftArg();
    SqlExpr right = node.getRightArg();
    if (left instanceof SqlNull || right instanceof SqlNull) {
      replace(node, new SqlNull());
    }
  }
View Full Code Here

  {
    super.meet(node);
    SqlExpr left = node.getLeftArg();
    SqlExpr right = node.getRightArg();
    if (left instanceof SqlNull || right instanceof SqlNull) {
      replace(node, new SqlNull());
    }
    else if (left instanceof SqlConstant<?> && right instanceof SqlConstant<?>) {
      SqlConstant<?> l = (SqlConstant<?>)left;
      SqlConstant<?> r = (SqlConstant<?>)right;
      if (l.getValue().equals(r.getValue())) {
View Full Code Here

  public void meet(SqlLowerCase node)
    throws RuntimeException
  {
    super.meet(node);
    if (node.getArg() instanceof SqlNull) {
      replace(node, new SqlNull());
    }
    else if (node.getArg() instanceof SqlConstant) {
      SqlConstant arg = (SqlConstant)node.getArg();
      String lower = arg.getValue().toString().toLowerCase(Locale.US);
      replace(node, str(lower));
View Full Code Here

    }
    else if (arg instanceof FalseValue) {
      replace(node, new TrueValue());
    }
    else if (arg instanceof SqlNull) {
      replace(node, new SqlNull());
    }
    else if (arg instanceof SqlNot) {
      SqlNot not = (SqlNot)arg;
      replace(node, not.getArg().clone());
    }
View Full Code Here

            if (nestedArg instanceof SqlNull) {
              nestedOr.removeChildNode(nestedArg);
            }
          }
          if (nestedOr.getNumberOfArguments() == 0) {
            replace(nestedOr, new SqlNull());
          }
          else if (nestedOr.getNumberOfArguments() == 1) {
            replace(nestedOr, nestedOr.getArg(0));
          }
        }
View Full Code Here

    ColumnVar var = replaceVar(node);
    if (var == null) {
      return;
    }
    if (!var.getTypes().isBNodes()) {
      node.replaceWith(new SqlNull());
    }
  }
View Full Code Here

    ColumnVar var = replaceVar(node);
    if (var == null) {
      return;
    }
    if (!var.getTypes().isTyped()) {
      node.replaceWith(new SqlNull());
    }
  }
View Full Code Here

TOP

Related Classes of org.openrdf.sail.rdbms.algebra.SqlNull

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.