/**
   * 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());
  }
 public SchemaPlus getRootSchema() {
   return rootSchema.plus();
 }