Package de.fuberlin.wiwiss.d2rq.algebra

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


  NodeRelation search(String tableName, String attributeName, NodeRelation[] relation)
  {
    for (int i = 0; i < relation.length; i++) {
      NodeRelation rel = relation[i];
      for (ProjectionSpec p: rel.baseRelation().projections()) {
        Attribute attribute = (Attribute) p;
        if (attribute.tableName().equals(tableName) && attribute.attributeName().equals(attributeName))
          return rel;
      }
    }
   
    return null;
View Full Code Here


  }

  public void testAttributeQuoting() {
    Vendor db = Vendor.SQL92;
    assertEquals("\"schema\".\"table\".\"column\"",
        db.quoteAttribute(new Attribute("schema", "table", "column")));
    assertEquals("\"table\".\"column\"",
        db.quoteAttribute(new Attribute(null, "table", "column")));
  }
View Full Code Here

  }
 
  public void testDoubleQuotesInAttributesAreEscaped() {
    Vendor db = Vendor.SQL92;
    assertEquals("\"sch\"\"ema\".\"ta\"\"ble\".\"col\"\"umn\"",
        db.quoteAttribute(new Attribute("sch\"ema", "ta\"ble", "col\"umn")));
  }
View Full Code Here

  }
 
  public void testAttributeQuotingMySQL() {
    Vendor db = Vendor.MySQL;
    assertEquals("`table`.`column`",
        db.quoteAttribute(new Attribute(null, "table", "column")));
  }
View Full Code Here

  public void tearDown() {
    db.close();
  }
 
  public void testRecognizeNullableColumn() {
    Attribute personEmail = new Attribute(null, "persons", "Email");
    assertTrue(db.isNullable(personEmail));
  }
View Full Code Here

    Attribute personEmail = new Attribute(null, "persons", "Email");
    assertTrue(db.isNullable(personEmail));
  }
 
  public void testRecognizeNonNullableColumn() {
    Attribute personID = new Attribute(null, "persons", "PerID");
    assertFalse(db.isNullable(personID));
  }
View Full Code Here

TOP

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

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.