|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eigenbase.sql.parser.SqlAbstractParserImpl.MetadataImpl
public static class SqlAbstractParserImpl.MetadataImpl
Default implementation of the SqlAbstractParserImpl.Metadata
interface.
Field Summary | |
---|---|
private Set<String> |
contextVariableNames
|
private Set<String> |
nonReservedKeyWordSet
|
private Set<String> |
reservedFunctionNames
|
private Set<String> |
reservedWords
|
private String |
sql92ReservedWords
|
private List<String> |
tokenList
Immutable list of all tokens, in alphabetical order. |
private SortedSet<String> |
tokenSet
Set of all tokens. |
Constructor Summary | |
---|---|
SqlAbstractParserImpl.MetadataImpl(SqlAbstractParserImpl sqlParser)
Creates a MetadataImpl. |
Method Summary | |
---|---|
private String |
constructSql92ReservedWordList()
Builds a comma-separated list of JDBC reserved words. |
String |
getJdbcKeywords()
Returns comma-separated list of JDBC keywords. |
List<String> |
getTokens()
Returns a list of all tokens in alphabetical order. |
private void |
initList(SqlAbstractParserImpl parserImpl,
Set<String> keywords,
String name)
Initializes lists of keywords. |
boolean |
isContextVariableName(String token)
Returns whether token is the name of a context variable such as "CURRENT_USER". |
boolean |
isKeyword(String token)
Returns whether token is a keyword. |
boolean |
isNonReservedKeyword(String token)
Returns true if token is a keyword but not a reserved word. |
boolean |
isReservedFunctionName(String token)
Returns whether token is a reserved function name such as "CURRENT_USER". |
boolean |
isReservedWord(String token)
Returns whether token is a reserved word. |
boolean |
isSql92ReservedWord(String token)
Returns whether token is a reserved word as specified by the SQL:92 standard. |
private Object |
virtualCall(SqlAbstractParserImpl parserImpl,
String name)
Uses reflection to invoke a method on this parser. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final Set<String> reservedFunctionNames
private final Set<String> contextVariableNames
private final Set<String> nonReservedKeyWordSet
private final SortedSet<String> tokenSet
private final List<String> tokenList
private final Set<String> reservedWords
private final String sql92ReservedWords
Constructor Detail |
---|
public SqlAbstractParserImpl.MetadataImpl(SqlAbstractParserImpl sqlParser)
sqlParser
- ParserMethod Detail |
---|
private void initList(SqlAbstractParserImpl parserImpl, Set<String> keywords, String name)
private Object virtualCall(SqlAbstractParserImpl parserImpl, String name) throws Throwable
parserImpl
- Parsername
- Name of method. For example "ReservedFunctionName".
Throwable
private String constructSql92ReservedWordList()
public List<String> getTokens()
SqlAbstractParserImpl.Metadata
getTokens
in interface SqlAbstractParserImpl.Metadata
public boolean isSql92ReservedWord(String token)
SqlAbstractParserImpl.Metadata
isSql92ReservedWord
in interface SqlAbstractParserImpl.Metadata
public String getJdbcKeywords()
SqlAbstractParserImpl.Metadata
getJdbcKeywords
in interface SqlAbstractParserImpl.Metadata
public boolean isKeyword(String token)
SqlAbstractParserImpl.Metadata
isKeyword
in interface SqlAbstractParserImpl.Metadata
public boolean isNonReservedKeyword(String token)
SqlAbstractParserImpl.Metadata
isNonReservedKeyword
in interface SqlAbstractParserImpl.Metadata
public boolean isReservedFunctionName(String token)
SqlAbstractParserImpl.Metadata
isReservedFunctionName
in interface SqlAbstractParserImpl.Metadata
public boolean isContextVariableName(String token)
SqlAbstractParserImpl.Metadata
isContextVariableName
in interface SqlAbstractParserImpl.Metadata
public boolean isReservedWord(String token)
SqlAbstractParserImpl.Metadata
isReservedWord
in interface SqlAbstractParserImpl.Metadata
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |