Package org.openrdf.sail.rdbms.algebra

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


    return joins;
  }

  public ColumnVar getVarForChildren(String name) {
    for (FromItem join : joins) {
      ColumnVar var = join.getVar(name);
      if (var != null) {
        return var;
      }
    }
    return null;
View Full Code Here


      filter.column(alias, "value");
    }
  }

  private void append(LongURIColumn uri, SqlExprBuilder filter) {
    ColumnVar var = uri.getRdbmsVar();
    String alias = getLongURIAlias(var);
    filter.column(alias, "value");
  }
View Full Code Here

  private void append(TrueValue expr, SqlExprBuilder filter) {
    filter.appendBoolean(true);
  }

  private void append(URIColumn uri, SqlExprBuilder filter) {
    ColumnVar var = uri.getRdbmsVar();
    String alias = getURIAlias(var);
    filter.column(alias, "value");
  }
View Full Code Here

      List<String> names = union.getSelectVarNames();
      List<ColumnVar> vars = union.appendVars(new ArrayList<ColumnVar>());
      SqlQueryBuilder subquery = query.subquery();
      for (FromItem item : union.getUnion()) {
        for (int i = 0, n = names.size(); i < n; i++) {
          ColumnVar var = item.getVar(names.get(i));
          SqlExprBuilder select = subquery.select();
          if (var == null) {
            select.appendNull();
          }
          else if (var.isImplied()) {
            select.appendNumeric(vf.getInternalId(var.getValue()));
          }
          else {
            select.column(var.getAlias(), var.getColumn());
          }
          select.as(vars.get(i).getColumn());
        }
        from(subquery, item);
        subquery = subquery.union();
View Full Code Here

        }
      }
    }
    int index = 0;
    for (SelectProjection proj : qb.getSqlSelectVar()) {
      ColumnVar var = proj.getVar();
      if (!var.isHiddenOrConstant()) {
        for (String name : qb.getBindingNames(var)) {
          if (!bindings.hasBinding(name)) {
            var.setIndex(index);
            query.select(proj.getId());
            query.select(proj.getStringValue());
            index += 2;
            if (var.getTypes().isLiterals()) {
              query.select(proj.getLanguage());
              query.select(proj.getDatatype());
              index += 2;
            }
          }
View Full Code Here

  @Override
  public void meet(BNodeColumn node)
    throws RuntimeException
  {
    ColumnVar var = replaceVar(node);
    if (var == null) {
      return;
    }
    if (!var.getTypes().isBNodes()) {
      node.replaceWith(new SqlNull());
    }
  }
View Full Code Here

  @Override
  public void meet(DatatypeColumn node)
    throws RuntimeException
  {
    ColumnVar var = replaceVar(node);
    if (var == null) {
      return;
    }
    if (!var.getTypes().isTyped()) {
      node.replaceWith(new SqlNull());
    }
  }
View Full Code Here

  @Override
  public void meet(DateTimeColumn node)
    throws RuntimeException
  {
    ColumnVar var = replaceVar(node);
    if (var == null) {
      return;
    }
    if (!var.getTypes().isCalendar()) {
      node.replaceWith(new SqlNull());
    }
  }
View Full Code Here

  @Override
  public void meet(LabelColumn node)
    throws RuntimeException
  {
    ColumnVar var = replaceVar(node);
    if (var == null) {
      return;
    }
    if (!var.getTypes().isLiterals()) {
      node.replaceWith(new SqlNull());
    }
  }
View Full Code Here

  @Override
  public void meet(LongLabelColumn node)
    throws RuntimeException
  {
    ColumnVar var = replaceVar(node);
    if (var == null) {
      return;
    }
    if (!var.getTypes().isLong() || !var.getTypes().isLiterals()) {
      node.replaceWith(new SqlNull());
    }
  }
View Full Code Here

TOP

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

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.