Package org.apache.calcite.adapter.jdbc
Class JdbcSchema.Factory
- java.lang.Object
-
- org.apache.calcite.adapter.jdbc.JdbcSchema.Factory
-
- All Implemented Interfaces:
SchemaFactory
- Enclosing class:
- JdbcSchema
public static class JdbcSchema.Factory extends java.lang.Object implements SchemaFactory
Schema factory that creates aJdbcSchema
.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" } } ] }
-
-
Field Summary
Fields Modifier and Type Field Description static JdbcSchema.Factory
INSTANCE
-
Constructor Summary
Constructors Modifier Constructor Description private
Factory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Schema
create(SchemaPlus parentSchema, java.lang.String name, java.util.Map<java.lang.String,java.lang.Object> operand)
Creates a Schema.
-
-
-
Field Detail
-
INSTANCE
public static final JdbcSchema.Factory INSTANCE
-
-
Method Detail
-
create
public Schema create(SchemaPlus parentSchema, java.lang.String name, java.util.Map<java.lang.String,java.lang.Object> operand)
Description copied from interface:SchemaFactory
Creates a Schema.- Specified by:
create
in interfaceSchemaFactory
- Parameters:
parentSchema
- Parent schemaname
- Name of this schemaoperand
- The "operand" JSON property- Returns:
- Created schema
-
-