Package de.fuberlin.wiwiss.d2rq.sql

Examples of de.fuberlin.wiwiss.d2rq.sql.DummyDB


      connectToDummyDB(db);
    }
  }
 
  public static void connectToDummyDB(Database db) {
    db.useConnectedDB(new DummyDB());
  }
View Full Code Here


  public void testConstantToString() {
    assertEquals("Constant(foo)", new Constant("foo").toString());
  }
 
  public void testConstantToSQL() {
    assertEquals("'foo'", new Constant("foo").toSQL(new DummyDB(), AliasMap.NO_ALIASES));
  }
View Full Code Here

    assertEquals("'foo'", new Constant("foo").toSQL(new DummyDB(), AliasMap.NO_ALIASES));
  }
 
  public void testConstantToSQLWithType() {
    Attribute attribute = SQL.parseAttribute("table.col1");
    DummyDB db = new DummyDB(Collections.singletonMap("table.col1", GenericType.NUMERIC));
    assertEquals("42", new Constant("42", attribute).toSQL(db, AliasMap.NO_ALIASES));
  }
View Full Code Here

    assertEquals("42", new Constant("42", attribute).toSQL(db, AliasMap.NO_ALIASES));
  }
 
  public void testConstantToSQLWithTypeAndAlias() {
    Attribute aliasedAttribute = SQL.parseAttribute("alias.col1");
    DummyDB db = new DummyDB(Collections.singletonMap("table.col1", GenericType.NUMERIC));
    assertEquals("42", new Constant("42", aliasedAttribute).toSQL(db, aliases));
  }
View Full Code Here

public class RelationTest extends TestCase {
  private ConnectedDB db;
  private Relation rel1;
 
  public void setUp() {
    db = new DummyDB();
    rel1 = Relation.createSimpleRelation(db,
        new Attribute[]{new Attribute(null, "foo", "bar")});
  }
View Full Code Here

 
  public void setUp() {
    this.model = ModelFactory.createDefaultModel();
    this.mapping = new Mapping();
    this.database = new Database(this.model.createResource());
    database.useConnectedDB(new DummyDB());
    this.mapping.addDatabase(this.database);

    employees = createClassMap("http://test/employee@@e.ID@@");
    employees.addAlias("employees AS e");
    employees.addJoin("e.ID = foo.bar");
View Full Code Here

  RelationImpl unique;
  RelationImpl notUnique;
  DummyDB db;
 
  public void setUp() {
    db = new DummyDB();
    projections1 = Collections.<ProjectionSpec>singleton(new Attribute(null, "table", "unique"));
    projections2 = Collections.<ProjectionSpec>singleton(new Attribute(null, "table", "not_unique"));
    unique = new RelationImpl(
        db, AliasMap.NO_ALIASES, Expression.TRUE, Expression.TRUE,
        Collections.<Join>emptySet(),
View Full Code Here

TOP

Related Classes of de.fuberlin.wiwiss.d2rq.sql.DummyDB

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.