Package org.h2.command.query
Class SelectListColumnResolver
java.lang.Object
org.h2.command.query.SelectListColumnResolver
- All Implemented Interfaces:
ColumnResolver
This class represents a column resolver for the column list of a SELECT
statement. It is used to resolve select column aliases in the HAVING clause.
Example:
SELECT X/3 AS A, COUNT(*) FROM SYSTEM_RANGE(1, 10) GROUP BY A HAVING A > 2;
-
Method Summary
Modifier and TypeMethodDescriptionfindColumn(String name) Get the column with the specified name.Column[]Get the column list.Get the select statement.Get the value for the given column.optimize(ExpressionColumn expressionColumn, Column column) Get the expression that represents this column.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.h2.table.ColumnResolver
getColumnName, getRowIdColumn, getSchemaName, getSystemColumns, getTableAlias, getTableFilter, hasDerivedColumnList
-
Method Details
-
getColumns
Description copied from interface:ColumnResolverGet the column list.- Specified by:
getColumnsin interfaceColumnResolver- Returns:
- the column list
-
findColumn
Description copied from interface:ColumnResolverGet the column with the specified name.- Specified by:
findColumnin interfaceColumnResolver- Parameters:
name- the column name, must be a derived name if this column resolver has a derived column list- Returns:
- the column with the specified name, or
null
-
getSelect
Description copied from interface:ColumnResolverGet the select statement.- Specified by:
getSelectin interfaceColumnResolver- Returns:
- the select statement
-
getValue
Description copied from interface:ColumnResolverGet the value for the given column.- Specified by:
getValuein interfaceColumnResolver- Parameters:
column- the column- Returns:
- the value
-
optimize
Description copied from interface:ColumnResolverGet the expression that represents this column.- Specified by:
optimizein interfaceColumnResolver- Parameters:
expressionColumn- the expression columncolumn- the column- Returns:
- the optimized expression
-