public interface SqlValidatorCatalogReader
SqlValidator.
This interface only provides a thin API to the underlying repository, and this is intentional. By only presenting the repository information of interest to the validator, we reduce the dependency on exact mechanism to implement the repository. It is also possible to construct mock implementations of this interface for testing purposes.
| Modifier and Type | Method and Description |
|---|---|
RelDataType |
createTypeFromProjection(RelDataType type,
List<String> columnNameList) |
RelDataTypeField |
field(RelDataType rowType,
String alias)
Finds a field with a given name, using the case-sensitivity of the current
session.
|
int |
fieldOrdinal(RelDataType rowType,
String alias)
Finds the ordinal of a field with a given name, using the case-sensitivity
of the current session.
|
List<SqlMoniker> |
getAllSchemaObjectNames(List<String> names)
Given fully qualified schema name, returns schema object names as
specified.
|
RelDataType |
getNamedType(SqlIdentifier typeName)
Finds a user-defined type with the given name, possibly qualified.
|
List<String> |
getSchemaName()
Returns the name of the current schema.
|
SqlValidatorTable |
getTable(List<String> names)
Finds a table with the given name, possibly qualified.
|
int |
match(List<String> strings,
String name) |
boolean |
matches(String string,
String name) |
SqlValidatorTable getTable(List<String> names)
names - Qualified name of tableRelDataType getNamedType(SqlIdentifier typeName)
NOTE jvs 12-Feb-2005: the reason this method is defined here instead of on RelDataTypeFactory is that it has to take into account context-dependent information such as SQL schema path, whereas a type factory is context-independent.
typeName - Name of typeList<SqlMoniker> getAllSchemaObjectNames(List<String> names)
names - the array contains fully qualified schema name or empty
list for root schemaList<String> getSchemaName()
RelDataTypeField field(RelDataType rowType, String alias)
int fieldOrdinal(RelDataType rowType, String alias)
RelDataType createTypeFromProjection(RelDataType type, List<String> columnNameList)
Copyright © 2012–2015 The Apache Software Foundation. All rights reserved.