Package org.openrdf.sail.rdbms.algebra

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


  @Override
  public void meet(NumericColumn node)
    throws RuntimeException
  {
    ColumnVar var = node.getRdbmsVar();
    String alias = "n" + getDBName(var);
    String tableName = literals.getNumericTable().getName();
    join(var, alias, tableName);
  }
View Full Code Here


  @Override
  public void meet(LongURIColumn node)
    throws RuntimeException
  {
    ColumnVar var = node.getRdbmsVar();
    String alias = "lu" + getDBName(var);
    String tableName = uris.getLongTableName();
    join(var, alias, tableName);
  }
View Full Code Here

  @Override
  public void meet(URIColumn node)
    throws RuntimeException
  {
    ColumnVar var = node.getRdbmsVar();
    String alias = "u" + getDBName(var);
    String tableName = uris.getShortTableName();
    join(var, alias, tableName);
  }
View Full Code Here

    join(var, alias, tableName);
  }

  @Override
  public void meet(PointColumn node) throws RuntimeException {
    ColumnVar var = node.getRdbmsVar();
    String alias = "p" + getDBName(var);
    String tableName = literals.getPointTable().getName();
    join(var, alias, tableName);
  }
View Full Code Here

    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

    catch (SQLException e) {
      throw new RdbmsRuntimeException(e);
    }
    JoinItem from = new JoinItem(alias, tableName, predId);

    ColumnVar s = createSubj(alias, subjVar, (Resource)subjValue);
    ColumnVar p = createPred(alias, predVar, (URI)predValue, !present);
    ColumnVar o = createObj(alias, objVar, objValue);
    ColumnVar c = createCtx(alias, ctxVar, (Resource)ctxValue);

    s.setTypes(tables.getSubjTypes(predId));
    o.setTypes(tables.getObjTypes(predId));

    SelectQuery query = new SelectQuery();
View Full Code Here

    Map<String, ColumnVar> lvars = left.getVarMap();
    Map<String, ColumnVar> rvars = right.getVarMap();
    Set<String> names = new HashSet<String>(rvars.keySet());
    names.retainAll(lvars.keySet());
    for (String name : names) {
      ColumnVar l = lvars.get(name);
      ColumnVar r = rvars.get(name);
      if (!l.isImplied() && !r.isImplied()) {
        IdColumn rid = new IdColumn(r);
        SqlExpr filter = eq(rid, new IdColumn(l));
        if (r.isNullable()) {
          filter = or(isNull(rid), filter);
        }
        right.addFilter(filter);
      }
    }
View Full Code Here

  private void mergeSelectClause(SelectQuery left, SelectQuery right) {
    for (SelectProjection proj : right.getSqlSelectVar()) {
      if (!left.hasSqlSelectVar(proj)) {
        proj = proj.clone();
        ColumnVar var = proj.getVar();
        String name = var.getName();
        ColumnVar existing = left.getVar(name);
        if (existing != null) {
          proj.setVar(existing);
        }
        left.addSqlSelectVar(proj);
      }
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.