Package net.hydromatic.optiq.impl.clone

Examples of net.hydromatic.optiq.impl.clone.CloneSchema


  @Test public void testCloneSchema()
    throws ClassNotFoundException, SQLException {
    final OptiqConnection connection = OptiqAssert.getConnection(false);
    final SchemaPlus rootSchema = connection.getRootSchema();
    final SchemaPlus foodmart = rootSchema.getSubSchema("foodmart");
    rootSchema.add("foodmart2", new CloneSchema(foodmart));
    Statement statement = connection.createStatement();
    ResultSet resultSet =
        statement.executeQuery(
            "select count(*) from \"foodmart2\".\"time_by_day\"");
    assertTrue(resultSet.next());
View Full Code Here


    final SchemaPlus foodmart =
        rootSchema.add("foodmart",
            JdbcSchema.create(rootSchema, "foodmart", dataSource, null,
                "foodmart"));
    if (withClone) {
      rootSchema.add("foodmart2", new CloneSchema(foodmart));
    }
    optiqConnection.setSchema("foodmart2");
    return optiqConnection;
  }
View Full Code Here

  @Test public void testCloneSchema()
      throws ClassNotFoundException, SQLException {
    final OptiqConnection connection = OptiqAssert.getConnection(false);
    final SchemaPlus rootSchema = connection.getRootSchema();
    final SchemaPlus foodmart = rootSchema.getSubSchema("foodmart");
    rootSchema.add("foodmart2", new CloneSchema(foodmart));
    Statement statement = connection.createStatement();
    ResultSet resultSet =
        statement.executeQuery(
            "select count(*) from \"foodmart2\".\"time_by_day\"");
    assertTrue(resultSet.next());
View Full Code Here

    case CLONE_FOODMART:
      SchemaPlus foodmart = rootSchema.getSubSchema("foodmart");
      if (foodmart == null) {
        foodmart = OptiqAssert.addSchema(rootSchema, SchemaSpec.JDBC_FOODMART);
      }
      return rootSchema.add("foodmart2", new CloneSchema(foodmart));
    case HR:
      return rootSchema.add("hr",
          new ReflectiveSchema(new JdbcTest.HrSchema()));
    case LINGUAL:
      return rootSchema.add("SALES",
View Full Code Here

TOP

Related Classes of net.hydromatic.optiq.impl.clone.CloneSchema

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.