|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eigenbase.sql.validate.DelegatingNamespace
public abstract class DelegatingNamespace
An implementation of SqlValidatorNamespace
that delegates all methods
to an underlying object.
Field Summary | |
---|---|
protected SqlValidatorNamespace |
namespace
|
Constructor Summary | |
---|---|
protected |
DelegatingNamespace(SqlValidatorNamespace namespace)
Creates a DelegatingNamespace. |
Method Summary | ||
---|---|---|
boolean |
fieldExists(String name)
Returns whether this namespace has a field of a given name. |
|
SqlNode |
getEnclosingNode()
Returns the parse tree node that at is at the root of this namespace and includes all decorations. |
|
List<Pair<SqlNode,SqlMonotonicity>> |
getMonotonicExprs()
Returns a list of expressions which are monotonic in this namespace. |
|
SqlMonotonicity |
getMonotonicity(String columnName)
Returns whether and how a given column is sorted. |
|
SqlNode |
getNode()
Returns the parse tree node at the root of this namespace. |
|
RelDataType |
getRowType()
Returns the row type of this namespace, which comprises a list of names and types of the output columns. |
|
RelDataType |
getRowTypeSansSystemColumns()
Returns the row type of this namespace, sans any system columns. |
|
SqlValidatorTable |
getTable()
Returns the underlying table, or null if there is none. |
|
SqlValidator |
getValidator()
Returns the validator. |
|
boolean |
isWrapperFor(Class<?> clazz)
Returns whether this namespace implements a given interface, or wraps a class which does. |
|
SqlValidatorNamespace |
lookupChild(String name)
Looks up a child namespace of a given name. |
|
void |
makeNullable()
Makes all fields in this namespace nullable (typically because it is on the outer side of an outer join. |
|
void |
setRowType(RelDataType rowType)
Allows RowType for the namespace to be explicitly set. |
|
String |
translate(String name)
Translates a field name to the name in the underlying namespace. |
|
|
unwrap(Class<T> clazz)
Returns this namespace, or a wrapped namespace, cast to a particular class. |
|
void |
validate()
Validates this namespace. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final SqlValidatorNamespace namespace
Constructor Detail |
---|
protected DelegatingNamespace(SqlValidatorNamespace namespace)
namespace
- Underlying namespace, to delegate toMethod Detail |
---|
public SqlValidator getValidator()
SqlValidatorNamespace
getValidator
in interface SqlValidatorNamespace
public SqlValidatorTable getTable()
SqlValidatorNamespace
getTable
in interface SqlValidatorNamespace
public RelDataType getRowType()
SqlValidatorNamespace
getRowType
in interface SqlValidatorNamespace
public void setRowType(RelDataType rowType)
SqlValidatorNamespace
setRowType
in interface SqlValidatorNamespace
public RelDataType getRowTypeSansSystemColumns()
SqlValidatorNamespace
getRowTypeSansSystemColumns
in interface SqlValidatorNamespace
public void validate()
SqlValidatorNamespace
If the scope has already been validated, does nothing.
Please call SqlValidatorImpl.validateNamespace(org.eigenbase.sql.validate.SqlValidatorNamespace)
rather than
calling this method directly.
validate
in interface SqlValidatorNamespace
public SqlNode getNode()
SqlValidatorNamespace
getNode
in interface SqlValidatorNamespace
public SqlNode getEnclosingNode()
SqlValidatorNamespace
SqlValidatorNamespace.getNode()
.
getEnclosingNode
in interface SqlValidatorNamespace
public SqlValidatorNamespace lookupChild(String name)
SqlValidatorNamespace
For example, in the query select e.name from emps as e
,
e
is an IdentifierNamespace
which has a child
name
which is a FieldNamespace
.
lookupChild
in interface SqlValidatorNamespace
name
- Name of namespace
public boolean fieldExists(String name)
SqlValidatorNamespace
fieldExists
in interface SqlValidatorNamespace
name
- Field name
public List<Pair<SqlNode,SqlMonotonicity>> getMonotonicExprs()
SqlValidatorNamespace
SqlIdentifier
called "TIMESTAMP".
getMonotonicExprs
in interface SqlValidatorNamespace
public SqlMonotonicity getMonotonicity(String columnName)
SqlValidatorNamespace
getMonotonicity
in interface SqlValidatorNamespace
public void makeNullable()
SqlValidatorNamespace
makeNullable
in interface SqlValidatorNamespace
public String translate(String name)
SqlValidatorNamespace
translate
in interface SqlValidatorNamespace
public <T> T unwrap(Class<T> clazz)
SqlValidatorNamespace
unwrap
in interface SqlValidatorNamespace
clazz
- Desired type
public boolean isWrapperFor(Class<?> clazz)
SqlValidatorNamespace
isWrapperFor
in interface SqlValidatorNamespace
clazz
- Interface
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |