|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eigenbase.sql.type.ExplicitReturnTypeInference
public class ExplicitReturnTypeInference
A SqlReturnTypeInference
which always returns the same SQL type.
Field Summary | |
---|---|
private int |
argCount
|
private int |
length
|
private int |
scale
|
private RelDataType |
type
|
private SqlTypeName |
typeName
|
Constructor Summary | |
---|---|
ExplicitReturnTypeInference(RelDataType type)
Creates an inference rule which always returns the same type object. |
|
ExplicitReturnTypeInference(SqlTypeName typeName)
Creates an inference rule which always returns a given SQL type with zero parameters (such as DATE ). |
|
ExplicitReturnTypeInference(SqlTypeName typeName,
int length)
Creates an inference rule which always returns a given SQL type with a precision/length parameter (such as VARCHAR(10) and
NUMBER(5) ). |
|
ExplicitReturnTypeInference(SqlTypeName typeName,
int length,
int scale)
Creates an inference rule which always returns a given SQL type with a precision and scale parameters (such as DECIMAL(8, 3) ). |
Method Summary | |
---|---|
private RelDataType |
createType(RelDataTypeFactory typeFactory)
|
protected RelDataType |
getExplicitType()
|
RelDataType |
inferReturnType(SqlOperatorBinding opBinding)
Infers the return type of a call to an SqlOperator . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final int argCount
private final SqlTypeName typeName
private final int length
private final int scale
private final RelDataType type
Constructor Detail |
---|
public ExplicitReturnTypeInference(RelDataType type)
If the requesting type factory is different, returns a copy of the
type object made using RelDataTypeFactory.copyType(RelDataType)
within the requesting type factory.
REVIEW jvs 6-Aug-2006: Under what circumstances is a copy of the type required?
type
- Type objectpublic ExplicitReturnTypeInference(SqlTypeName typeName)
DATE
).
typeName
- Name of the typepublic ExplicitReturnTypeInference(SqlTypeName typeName, int length)
VARCHAR(10)
and
NUMBER(5)
).
typeName
- Name of the typelength
- Length or precision of the typepublic ExplicitReturnTypeInference(SqlTypeName typeName, int length, int scale)
DECIMAL(8, 3)
).
typeName
- Name of the typelength
- Precision of the typeMethod Detail |
---|
public RelDataType inferReturnType(SqlOperatorBinding opBinding)
SqlReturnTypeInference
SqlOperator
.
inferReturnType
in interface SqlReturnTypeInference
opBinding
- description of operator binding
protected RelDataType getExplicitType()
private RelDataType createType(RelDataTypeFactory typeFactory)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |