Package org.openrdf.sail.rdbms.algebra

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


    ValueExpr right = node.getRightArg();
    SqlCase sqlCase = new SqlCase();
    sqlCase.when(in(str(DOUBLE), type(left), type(right)), str(DOUBLE));
    sqlCase.when(in(str(FLOAT), type(left), type(right)), str(FLOAT));
    sqlCase.when(in(str(DECIMAL), type(left), type(right)), str(DECIMAL));
    sqlCase.when(new TrueValue(), divide ? str(DECIMAL) : str(INTEGER));
    result = sqlCase;
  }
View Full Code Here


    ValueExpr left = node.getLeftArg();
    ValueExpr right = node.getRightArg();
    SqlCase sqlCase = new SqlCase();
    sqlCase.when(eq(label(right), str("*")), neq(label(left), str("")));
    SqlExpr pattern = concat(lowercase(label(right)), str("%"));
    sqlCase.when(new TrueValue(), like(label(left), pattern));
    result = sqlCase;
  }
View Full Code Here

    scase.when(or(isNotNull(lang(left)), isNotNull(lang(right))), langs);
    scase.when(and(simple(type(left)), simple(type(right))), labels.clone());
    scase.when(and(isNotNull(numeric(left)), isNotNull(numeric(right))), numeric);
    scase.when(comparable, time);
    scase.when(and(eq(type(left), type(right)), labels.clone()), new TrueValue());
    return scase;
  }
View Full Code Here

  }

  private SqlExpr valueOf(Value value) {
    if (value instanceof Literal) {
      if (((Literal)value).booleanValue()) {
        return new TrueValue();
      }
      return new FalseValue();
    }
    return sqlNull();
  }
View Full Code Here

          return;
        }
      }
    }
    if (node.getNumberOfArguments() == 0) {
      replace(node, new TrueValue());
    }
  }
View Full Code Here

    }
    else if (left instanceof SqlConstant<?> && right instanceof SqlConstant<?>) {
      SqlConstant<?> l = (SqlConstant<?>)left;
      SqlConstant<?> r = (SqlConstant<?>)right;
      if (l.getValue().equals(r.getValue())) {
        replace(node, new TrueValue());
      }
      else {
        replace(node, new FalseValue());
      }
    }
View Full Code Here

    throws RuntimeException
  {
    super.meet(node);
    SqlExpr arg = node.getArg();
    if (arg instanceof SqlNull) {
      replace(node, new TrueValue());
    }
    else if (arg instanceof SqlConstant<?>) {
      replace(node, new FalseValue());
    }
    else if (arg instanceof SqlCase) {
View Full Code Here

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

    super.meet(node);
    boolean top = andAllTheWay(node);
    SqlExpr sqlNull = null;
    for (SqlExpr arg : node.getArgs()) {
      if (arg instanceof TrueValue) {
        replace(node, new TrueValue());
        return;
      }
      else if (arg instanceof FalseValue) {
        node.removeChildNode(arg);
      }
View Full Code Here

    ValueExpr left = node.getLeftArg();
    ValueExpr right = node.getRightArg();
    SqlCase sqlCase = new SqlCase();
    sqlCase.when(eq(label(right), str("*")), neq(label(left), str("")));
    SqlExpr pattern = concat(lowercase(label(right)), str("%"));
    sqlCase.when(new TrueValue(), like(label(left), pattern));
    result = sqlCase;
  }
View Full Code Here

TOP

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

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.