Package net.hydromatic.morel.foreign
Class CalciteForeignValue
java.lang.Object
net.hydromatic.morel.foreign.CalciteForeignValue
- All Implemented Interfaces:
ForeignValue
Value based on a Calcite schema.
In ML, it appears as a record with a field for each table.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceConverts a database object name to a Morel field name. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Calciteprivate final CalciteForeignValue.NameConverterprivate final org.apache.calcite.schema.SchemaPlus -
Constructor Summary
ConstructorsConstructorDescriptionCalciteForeignValue(Calcite calcite, org.apache.calcite.schema.SchemaPlus schema, boolean lower) Deprecated.CalciteForeignValue(Calcite calcite, org.apache.calcite.schema.SchemaPlus schema, CalciteForeignValue.NameConverter nameConverter) Creates a CalciteForeignValue. -
Method Summary
Modifier and TypeMethodDescriptionprivate static <E> List<E> Returns a copy of a list with one element appended.private TypetoType(List<String> tablePath, org.apache.calcite.schema.Table table, TypeSystem typeSystem) private TypetoType(org.apache.calcite.schema.SchemaPlus schema, TypeSystem typeSystem) type(TypeSystem typeSystem) value()private com.google.common.collect.ImmutableList<Object> valueFor(org.apache.calcite.schema.SchemaPlus schema)
-
Field Details
-
calcite
-
schema
private final org.apache.calcite.schema.SchemaPlus schema -
nameConverter
-
-
Constructor Details
-
CalciteForeignValue
public CalciteForeignValue(Calcite calcite, org.apache.calcite.schema.SchemaPlus schema, CalciteForeignValue.NameConverter nameConverter) Creates a CalciteForeignValue. -
CalciteForeignValue
@Deprecated public CalciteForeignValue(Calcite calcite, org.apache.calcite.schema.SchemaPlus schema, boolean lower) Deprecated.Creates a CalciteForeignValue, optionally converting schema, table and column names to lower case.
-
-
Method Details
-
type
- Specified by:
typein interfaceForeignValue
-
toType
-
toType
private Type toType(List<String> tablePath, org.apache.calcite.schema.Table table, TypeSystem typeSystem) -
value
- Specified by:
valuein interfaceForeignValue
-
valueFor
private com.google.common.collect.ImmutableList<Object> valueFor(org.apache.calcite.schema.SchemaPlus schema) -
plus
Returns a copy of a list with one element appended.
-