Class SqlAdvisorGetHintsFunction2

    • Field Detail

      • ADVISOR

        private static final Expression ADVISOR
      • GET_COMPLETION_HINTS

        private static final java.lang.reflect.Method GET_COMPLETION_HINTS
    • Constructor Detail

      • SqlAdvisorGetHintsFunction2

        public SqlAdvisorGetHintsFunction2()
    • Method Detail

      • getRowType

        public RelDataType getRowType​(RelDataTypeFactory typeFactory,
                                      java.util.List<java.lang.Object> arguments)
        Description copied from interface: TableFunction
        Returns the record type of the table yielded by this function when applied to given arguments. Only literal arguments are passed, non-literal are replaced with default values (null, 0, false, etc).
        Specified by:
        getRowType in interface TableFunction
        Parameters:
        typeFactory - Type factory
        arguments - arguments of a function call (only literal arguments are passed, nulls for non-literal ones)
        Returns:
        row type of the table
      • getElementType

        public java.lang.reflect.Type getElementType​(java.util.List<java.lang.Object> arguments)
        Description copied from interface: TableFunction
        Returns the row type of the table yielded by this function when applied to given arguments. Only literal arguments are passed, non-literal are replaced with default values (null, 0, false, etc).
        Specified by:
        getElementType in interface TableFunction
        Parameters:
        arguments - arguments of a function call (only literal arguments are passed, nulls for non-literal ones)
        Returns:
        element type of the table (e.g. Object[].class)
      • getParameters

        public java.util.List<FunctionParameter> getParameters()
        Description copied from interface: Function
        Returns the parameters of this function.
        Specified by:
        getParameters in interface Function
        Returns:
        Parameters; never null
      • getCompletionHints

        public static Enumerable<SqlAdvisorHint2> getCompletionHints​(SqlAdvisor advisor,
                                                                     java.lang.String sql,
                                                                     int pos)
        Returns completion hints for a given SQL statement.

        Typically this is called from generated code (via IMPLEMENTOR).

        Parameters:
        advisor - Advisor to produce completion hints
        sql - SQL to complete
        pos - Cursor position in SQL
        Returns:
        the table that contains completion hints for a given SQL statement