public static class JdbcSchema.Factory extends java.lang.Object implements SchemaFactory
JdbcSchema
.
This allows you to create a jdbc schema inside a model.json file, like this:
{ "version": "1.0", "defaultSchema": "FOODMART_CLONE", "schemas": [ { "name": "FOODMART_CLONE", "type": "custom", "factory": "org.apache.calcite.adapter.jdbc.JdbcSchema$Factory", "operand": { "jdbcDriver": "com.mysql.jdbc.Driver", "jdbcUrl": "jdbc:mysql://localhost/foodmart", "jdbcUser": "foodmart", "jdbcPassword": "foodmart" } } ] }
Modifier and Type | Field and Description |
---|---|
static JdbcSchema.Factory |
INSTANCE |
Modifier | Constructor and Description |
---|---|
private |
Factory() |
Modifier and Type | Method and Description |
---|---|
Schema |
create(SchemaPlus parentSchema,
java.lang.String name,
java.util.Map<java.lang.String,java.lang.Object> operand)
Creates a Schema.
|
public static final JdbcSchema.Factory INSTANCE
public Schema create(SchemaPlus parentSchema, java.lang.String name, java.util.Map<java.lang.String,java.lang.Object> operand)
SchemaFactory
create
in interface SchemaFactory
parentSchema
- Parent schemaname
- Name of this schemaoperand
- The "operand" JSON propertyCopyright © 2012–2019 The Apache Software Foundation. All rights reserved.