org.eigenbase.sql.type
Class SqlTypeTransforms

java.lang.Object
  extended by org.eigenbase.sql.type.SqlTypeTransforms

public abstract class SqlTypeTransforms
extends Object

SqlTypeTransforms defines a number of reusable instances of SqlTypeTransform.

NOTE: avoid anonymous inner classes here except for unique, non-generalizable strategies; anything else belongs in a reusable top-level class. If you find yourself copying and pasting an existing strategy's anonymous inner class, you're making a mistake.

Version:
$Id: //open/dev/farrago/src/org/eigenbase/sql/type/SqlTypeTransforms.java#9 $
Author:
Wael Chatila

Field Summary
static SqlTypeTransform forceNullable
          Parameter type-inference transform strategy where a derived type is transformed into the same type with nulls allowed.
static SqlTypeTransform onlyColumn
          Parameter type-inference transform strategy where a derived type must be a struct type with precisely one field and the returned type is the type of that field.
static SqlTypeTransform toMultisetElementType
          Parameter type-inference transform strategy where a derived type must be a multiset type and the returned type is the multiset's element type.
static SqlTypeTransform toNullable
          Parameter type-inference transform strategy where a derived type is transformed into the same type but nullable if any of a calls operands is nullable
static SqlTypeTransform toVarying
          Type-inference strategy whereby the result type of a call is VARYING the type given.
 
Constructor Summary
SqlTypeTransforms()
           
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

toNullable

public static final SqlTypeTransform toNullable
Parameter type-inference transform strategy where a derived type is transformed into the same type but nullable if any of a calls operands is nullable


forceNullable

public static final SqlTypeTransform forceNullable
Parameter type-inference transform strategy where a derived type is transformed into the same type with nulls allowed.


toVarying

public static final SqlTypeTransform toVarying
Type-inference strategy whereby the result type of a call is VARYING the type given. The length returned is the same as length of the first argument. Return type will have same nullablilty as input type nullablility. First Arg must be of string type.


toMultisetElementType

public static final SqlTypeTransform toMultisetElementType
Parameter type-inference transform strategy where a derived type must be a multiset type and the returned type is the multiset's element type.

See Also:
MultisetSqlType.getComponentType()

onlyColumn

public static final SqlTypeTransform onlyColumn
Parameter type-inference transform strategy where a derived type must be a struct type with precisely one field and the returned type is the type of that field.

Constructor Detail

SqlTypeTransforms

public SqlTypeTransforms()