public static class ReflectiveSchema.Factory extends Object implements SchemaFactory
The following example instantiates a FoodMart object as a schema
that contains tables called EMPS and DEPTS based on the
object's fields.
schemas: [
{
name: "foodmart",
type: "custom",
factory: "org.apache.calcite.adapter.java.ReflectiveSchema$Factory",
operand: {
class: "com.acme.FoodMart",
staticMethod: "instance"
}
}
]
class FoodMart {
public static final FoodMart instance() {
return new FoodMart();
}
Employee[] EMPS;
Department[] DEPTS;
}| Constructor and Description |
|---|
Factory() |
| Modifier and Type | Method and Description |
|---|---|
Schema |
create(SchemaPlus parentSchema,
String name,
Map<String,Object> operand)
Creates a Schema.
|
public Schema create(SchemaPlus parentSchema, String name, Map<String,Object> operand)
SchemaFactorycreate in interface SchemaFactoryparentSchema - Parent schemaname - Name of this schemaoperand - The "operand" JSON propertyCopyright © 2012–2018 The Apache Software Foundation. All rights reserved.