|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eigenbase.sql.validate.AbstractNamespace
org.eigenbase.sql.validate.FieldNamespace
class FieldNamespace
Implementation of SqlValidatorNamespace for a field of a record.
A field is not a very interesting namespace - except if the field has a record or multiset type - but this class exists to make fields behave similarly to other records for purposes of name resolution.
| Field Summary |
|---|
| Fields inherited from class org.eigenbase.sql.validate.AbstractNamespace |
|---|
enclosingNode, rowType, validator |
| Constructor Summary | |
|---|---|
FieldNamespace(SqlValidatorImpl validator,
RelDataType dataType)
Creates a FieldNamespace. |
|
| Method Summary | |
|---|---|
boolean |
fieldExists(String name)
Returns whether this namespace has a field of a given name. |
SqlNode |
getNode()
Returns the parse tree node at the root of this namespace. |
SqlValidatorNamespace |
lookupChild(String name)
Looks up a child namespace of a given name. |
void |
setRowType(RelDataType rowType)
Allows RowType for the namespace to be explicitly set. |
protected RelDataType |
validateImpl()
Validates this scope and returns the type of the records it returns. |
| Methods inherited from class org.eigenbase.sql.validate.AbstractNamespace |
|---|
getEnclosingNode, getMonotonicExprs, getMonotonicity, getRowType, getRowTypeSansSystemColumns, getTable, getValidator, isWrapperFor, makeNullable, translate, unwrap, validate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
FieldNamespace(SqlValidatorImpl validator,
RelDataType dataType)
validator - ValidatordataType - Data type of field| Method Detail |
|---|
public void setRowType(RelDataType rowType)
SqlValidatorNamespace
setRowType in interface SqlValidatorNamespacesetRowType in class AbstractNamespaceprotected RelDataType validateImpl()
AbstractNamespaceAbstractNamespace.validate(), which uses the AbstractNamespace.status field to protect against cycles.
validateImpl in class AbstractNamespacepublic SqlNode getNode()
SqlValidatorNamespace
public SqlValidatorNamespace lookupChild(String name)
SqlValidatorNamespaceFor 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 SqlValidatorNamespacelookupChild in class AbstractNamespacename - Name of namespace
public boolean fieldExists(String name)
SqlValidatorNamespace
fieldExists in interface SqlValidatorNamespacefieldExists in class AbstractNamespacename - Field name
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||