*/
protected OptiqConnectionImpl(Driver driver, AvaticaFactory factory,
String url, Properties info, OptiqRootSchema rootSchema,
JavaTypeFactory typeFactory) {
super(driver, factory, url, info);
OptiqConnectionConfig cfg = new OptiqConnectionConfigImpl(info);
this.prepareFactory = driver.prepareFactory;
if (typeFactory != null) {
this.typeFactory = typeFactory;
} else {
final RelDataTypeSystem typeSystem =
cfg.typeSystem(RelDataTypeSystem.class, RelDataTypeSystem.DEFAULT);
this.typeFactory = new JavaTypeFactoryImpl(typeSystem);
}
this.rootSchema =
rootSchema != null ? rootSchema : OptiqSchema.createRootSchema(true);
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());
}