Package org.openrdf.sail.rdbms.evaluation

Examples of org.openrdf.sail.rdbms.evaluation.SqlQueryBuilder.from()


    }
    String tableName = statements.getCombinedTableName();
    SqlQueryBuilder query = factory.createSqlQueryBuilder();
    query.select().column("t", "ctx");
    query.select().append("CASE WHEN MIN(u.value) IS NOT NULL THEN MIN(u.value) ELSE MIN(b.value) END");
    SqlJoinBuilder join = query.from(tableName, "t");
    join.leftjoin(bnodes.getName(), "b").on("id", "t.ctx");
    join.leftjoin(uris.getShortTableName(), "u").on("id", "t.ctx");
    SqlBracketBuilder open = query.filter().and().open();
    open.column("u", "value").isNotNull();
    open.or();
View Full Code Here


    throws RdbmsException, SQLException
  {
    String tableName = statements.getTableName(vf.getInternalId(pred));
    SqlQueryBuilder query = factory.createSqlQueryBuilder();
    query.select().append("COUNT(*)");
    query.from(tableName, "t");
    if (ctxs != null && ctxs.length > 0) {
      Number[] ids = new Number[ctxs.length];
      for (int i = 0; i < ids.length; i++) {
        ids[i] = vf.getInternalId(ctxs[i]);
      }
View Full Code Here

            + " WHEN ol.value IS NOT NULL THEN ol.value ELSE oll.value END");
    query.select().column("od", "value");
    query.select().column("og", "value");
    SqlJoinBuilder join;
    if (pred != null) {
      join = query.from(uris.getShortTableName(), "pu");
      // TODO what about long predicate URIs?
      join = join.join(tableName, "t");
    }
    else {
      join = query.from(tableName, "t");
View Full Code Here

      join = query.from(uris.getShortTableName(), "pu");
      // TODO what about long predicate URIs?
      join = join.join(tableName, "t");
    }
    else {
      join = query.from(tableName, "t");
    }
    if (pred == null) {
      join.join(uris.getShortTableName(), "pu").on("id", "t.pred");
    }
    join.leftjoin(uris.getShortTableName(), "cu").on("id", "t.ctx");
View Full Code Here

    query.select().column("t", "ctx");
    query
        .select()
        .append(
            "CASE WHEN MIN(u.value) IS NOT NULL THEN MIN(u.value) ELSE MIN(b.value) END");
    SqlJoinBuilder join = query.from(tableName, "t");
    join.leftjoin(bnodes.getName(), "b").on("id", "t.ctx");
    join.leftjoin(uris.getShortTableName(), "u").on("id", "t.ctx");
    SqlBracketBuilder open = query.filter().and().open();
    open.column("u", "value").isNotNull();
    open.or();
View Full Code Here

    query.select().column("od", "value");
    query.select().column("og", "value");
    query.select().column("t", "expl");
    SqlJoinBuilder join;
    if (pred != null) {
      join = query.from(uris.getShortTableName(), "pu");
      // TODO what about long predicate URIs?
      join = join.join(tableName, "t");
    } else {
      join = query.from(tableName, "t");
    }
View Full Code Here

    if (pred != null) {
      join = query.from(uris.getShortTableName(), "pu");
      // TODO what about long predicate URIs?
      join = join.join(tableName, "t");
    } else {
      join = query.from(tableName, "t");
    }
    if (pred == null) {
      join.join(uris.getShortTableName(), "pu").on("id", "t.pred");
    }
    join.leftjoin(uris.getShortTableName(), "cu").on("id", "t.ctx");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.