public class SqlAdvisorGetHintsFunction2 extends java.lang.Object implements TableFunction, ImplementableFunction
SqlAdvisorGetHintsFunction
Modifier and Type | Field and Description |
---|---|
private static Expression |
ADVISOR |
private static java.lang.reflect.Method |
GET_COMPLETION_HINTS |
private static CallImplementor |
IMPLEMENTOR |
private static java.util.List<FunctionParameter> |
PARAMETERS |
Constructor and Description |
---|
SqlAdvisorGetHintsFunction2() |
Modifier and Type | Method and Description |
---|---|
static Enumerable<SqlAdvisorHint2> |
getCompletionHints(SqlAdvisor advisor,
java.lang.String sql,
int pos)
Returns completion hints for a given SQL statement.
|
java.lang.reflect.Type |
getElementType(java.util.List<java.lang.Object> arguments)
Returns the row type of the table yielded by this function when
applied to given arguments.
|
CallImplementor |
getImplementor()
Returns implementor that translates the function to linq4j expression.
|
java.util.List<FunctionParameter> |
getParameters()
Returns the parameters of this function.
|
RelDataType |
getRowType(RelDataTypeFactory typeFactory,
java.util.List<java.lang.Object> arguments)
Returns the record type of the table yielded by this function when
applied to given arguments.
|
private static final Expression ADVISOR
private static final java.lang.reflect.Method GET_COMPLETION_HINTS
private static final CallImplementor IMPLEMENTOR
private static final java.util.List<FunctionParameter> PARAMETERS
public CallImplementor getImplementor()
ImplementableFunction
getImplementor
in interface ImplementableFunction
public RelDataType getRowType(RelDataTypeFactory typeFactory, java.util.List<java.lang.Object> arguments)
TableFunction
getRowType
in interface TableFunction
typeFactory
- Type factoryarguments
- arguments of a function call (only literal arguments
are passed, nulls for non-literal ones)public java.lang.reflect.Type getElementType(java.util.List<java.lang.Object> arguments)
TableFunction
getElementType
in interface TableFunction
arguments
- arguments of a function call (only literal arguments
are passed, nulls for non-literal ones)Object[].class
)public java.util.List<FunctionParameter> getParameters()
Function
getParameters
in interface Function
public static Enumerable<SqlAdvisorHint2> getCompletionHints(SqlAdvisor advisor, java.lang.String sql, int pos)
Typically this is called from generated code
(via IMPLEMENTOR
).
advisor
- Advisor to produce completion hintssql
- SQL to completepos
- Cursor position in SQLCopyright © 2012–2019 The Apache Software Foundation. All rights reserved.