Exemplo n.º 1
0
  /**
   * Creates an OptiqConnectionImpl.
   *
   * <p>Not public; method is called only from the driver.
   *
   * @param driver Driver
   * @param factory Factory for JDBC objects
   * @param url Server URL
   * @param info Other connection properties
   * @param rootSchema Root schema, or null
   * @param typeFactory Type factory, or null
   */
  protected OptiqConnectionImpl(
      Driver driver,
      AvaticaFactory factory,
      String url,
      Properties info,
      OptiqRootSchema rootSchema,
      JavaTypeFactory typeFactory) {
    super(driver, factory, url, info);
    this.prepareFactory = driver.prepareFactory;
    this.typeFactory = typeFactory != null ? typeFactory : new JavaTypeFactoryImpl();
    this.rootSchema = rootSchema != null ? rootSchema : OptiqSchema.createRootSchema(true);

    OptiqConnectionConfig cfg = new OptiqConnectionConfigImpl(info);
    this.properties.put(InternalProperty.CASE_SENSITIVE, cfg.caseSensitive());
    this.properties.put(InternalProperty.UNQUOTED_CASING, cfg.unquotedCasing());
    this.properties.put(InternalProperty.QUOTED_CASING, cfg.quotedCasing());
    this.properties.put(InternalProperty.QUOTING, cfg.quoting());
  }
Exemplo n.º 2
0
 public SchemaPlus add(String name, Schema schema) {
   final OptiqSchema optiqSchema = OptiqSchema.this.add(name, schema);
   return optiqSchema.plus();
 }
Exemplo n.º 3
0
 public SchemaPlus getSubSchema(String name) {
   final OptiqSchema subSchema = OptiqSchema.this.getSubSchema(name, true);
   return subSchema == null ? null : subSchema.plus();
 }
Exemplo n.º 4
0
 /** Returns this object's path. For example ["hr", "emps"]. */
 public final List<String> path() {
   return schema.path(name);
 }
Exemplo n.º 5
0
 public SchemaPlus getRootSchema() {
   return rootSchema.plus();
 }