Package de.fuberlin.wiwiss.d2rq.algebra

Examples of de.fuberlin.wiwiss.d2rq.algebra.Relation


        db.quoteRelationName(new RelationName(null, "table")));
  }
 
  public void testNoLimit() {
    ConnectedDB db = new DummyDB();
    Relation r = Relation.createSimpleRelation(db, new Attribute[]{foo});
    assertEquals("SELECT DISTINCT \"table\".\"foo\" FROM \"table\"",
        new SelectStatementBuilder(r).getSQLStatement());
  }
View Full Code Here


  }
 
  public void testLimitStandard() {
    DummyDB db = new DummyDB();
    db.setLimit(100);
    Relation r = Relation.createSimpleRelation(db, new Attribute[]{foo});
    assertEquals("SELECT DISTINCT \"table\".\"foo\" FROM \"table\" LIMIT 100",
        new SelectStatementBuilder(r).getSQLStatement());
  }
View Full Code Here

  }
 
  public void testNoLimitMSSQL() {
    DummyDB db = new DummyDB(Vendor.SQLServer);
    db.setLimit(100);
    Relation r = Relation.createSimpleRelation(db, new Attribute[]{foo});
    assertEquals("SELECT DISTINCT TOP 100 \"table\".\"foo\" FROM \"table\"",
        new SelectStatementBuilder(r).getSQLStatement());
  }
View Full Code Here

  }
 
  public void testNoLimitOracle() {
    DummyDB db = new DummyDB(Vendor.Oracle);
    db.setLimit(100);
    Relation r = Relation.createSimpleRelation(db, new Attribute[]{foo});
    assertEquals("SELECT DISTINCT \"table\".\"foo\" FROM \"table\" WHERE (ROWNUM <= 100)",
        new SelectStatementBuilder(r).getSQLStatement());
  }
View Full Code Here

TOP

Related Classes of de.fuberlin.wiwiss.d2rq.algebra.Relation

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.