public abstract class ReflectiveSqlOperatorTable extends java.lang.Object implements SqlOperatorTable
SqlOperatorTable
interface
by reflecting the public fields of a subclass.Modifier and Type | Class and Description |
---|---|
private static class |
ReflectiveSqlOperatorTable.CaseInsensitiveKey
Key for looking up operators.
|
private static class |
ReflectiveSqlOperatorTable.CaseSensitiveKey
Key for looking up operators.
|
Modifier and Type | Field and Description |
---|---|
private com.google.common.collect.Multimap<ReflectiveSqlOperatorTable.CaseInsensitiveKey,SqlOperator> |
caseInsensitiveOperators |
private com.google.common.collect.Multimap<ReflectiveSqlOperatorTable.CaseSensitiveKey,SqlOperator> |
caseSensitiveOperators |
static java.lang.String |
IS_NAME |
Modifier | Constructor and Description |
---|---|
protected |
ReflectiveSqlOperatorTable() |
Modifier and Type | Method and Description |
---|---|
java.util.List<SqlOperator> |
getOperatorList()
Retrieves a list of all functions and operators in this table.
|
void |
init()
Performs post-constructor initialization of an operator table.
|
void |
lookupOperatorOverloads(SqlIdentifier opName,
SqlFunctionCategory category,
SqlSyntax syntax,
java.util.List<SqlOperator> operatorList,
SqlNameMatcher nameMatcher)
Retrieves a list of operators with a given name and syntax.
|
private java.util.Collection<SqlOperator> |
lookUpOperators(java.lang.String name,
SqlSyntax syntax,
SqlNameMatcher nameMatcher)
Look up operators based on case-sensitiveness.
|
private static SqlSyntax |
normalize(SqlSyntax syntax) |
void |
register(SqlOperator op)
Registers a function or operator in the table.
|
public static final java.lang.String IS_NAME
private final com.google.common.collect.Multimap<ReflectiveSqlOperatorTable.CaseSensitiveKey,SqlOperator> caseSensitiveOperators
private final com.google.common.collect.Multimap<ReflectiveSqlOperatorTable.CaseInsensitiveKey,SqlOperator> caseInsensitiveOperators
public final void init()
public void lookupOperatorOverloads(SqlIdentifier opName, SqlFunctionCategory category, SqlSyntax syntax, java.util.List<SqlOperator> operatorList, SqlNameMatcher nameMatcher)
SqlOperatorTable
lookupOperatorOverloads
in interface SqlOperatorTable
opName
- name of operatorcategory
- function category to look up, or null for any matching
operatorsyntax
- syntax type of operatoroperatorList
- mutable list to which to append matchesnameMatcher
- Name matcherprivate java.util.Collection<SqlOperator> lookUpOperators(java.lang.String name, SqlSyntax syntax, SqlNameMatcher nameMatcher)
public void register(SqlOperator op)
public java.util.List<SqlOperator> getOperatorList()
SqlOperatorTable
getOperatorList
in interface SqlOperatorTable
Copyright © 2012–2019 The Apache Software Foundation. All rights reserved.