Class GridSqlAggregateFunction
- java.lang.Object
-
- org.apache.ignite.internal.processors.query.h2.sql.GridSqlElement
-
- org.apache.ignite.internal.processors.query.h2.sql.GridSqlFunction
-
- org.apache.ignite.internal.processors.query.h2.sql.GridSqlAggregateFunction
-
- All Implemented Interfaces:
GridSqlAst
public class GridSqlAggregateFunction extends GridSqlFunction
Aggregate function.
-
-
Field Summary
-
Fields inherited from class org.apache.ignite.internal.processors.query.h2.sql.GridSqlFunction
type
-
-
Constructor Summary
Constructors Constructor Description GridSqlAggregateFunction(boolean distinct, GridSqlFunctionType type)GridSqlAggregateFunction(boolean distinct, org.h2.expression.Aggregate.AggregateType type)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleandistinct()GridSqlElementgetGroupConcatSeparator()StringgetSQL()booleanhasGroupConcatOrder()protected static booleanisValidType(org.h2.expression.Aggregate.AggregateType type)Checks if the aggregate type is valid.GridSqlAggregateFunctionsetGroupConcatOrder(GridSqlElement[] orderExpression, boolean[] orderDesc)GridSqlAggregateFunctionsetGroupConcatSeparator(GridSqlElement separator)-
Methods inherited from class org.apache.ignite.internal.processors.query.h2.sql.GridSqlFunction
name, type
-
Methods inherited from class org.apache.ignite.internal.processors.query.h2.sql.GridSqlElement
addChild, child, child, child, equals, hashCode, resultType, resultType, size, toString
-
-
-
-
Constructor Detail
-
GridSqlAggregateFunction
public GridSqlAggregateFunction(boolean distinct, GridSqlFunctionType type)- Parameters:
distinct- Distinct.type- Type.
-
GridSqlAggregateFunction
public GridSqlAggregateFunction(boolean distinct, org.h2.expression.Aggregate.AggregateType type)- Parameters:
distinct- Distinct.type- Type.
-
-
Method Detail
-
isValidType
protected static boolean isValidType(org.h2.expression.Aggregate.AggregateType type)
Checks if the aggregate type is valid.- Parameters:
type- Aggregate type.- Returns:
- True is valid, otherwise false.
-
distinct
public boolean distinct()
- Returns:
- Distinct.
-
setGroupConcatOrder
public GridSqlAggregateFunction setGroupConcatOrder(GridSqlElement[] orderExpression, boolean[] orderDesc)
- Parameters:
orderExpression- Order expression.orderDesc- Order descending flag.- Returns:
thisfor chaining.
-
hasGroupConcatOrder
public boolean hasGroupConcatOrder()
- Returns:
truein case GROUP_CONCAT function contains ORDER BY expressions.
-
setGroupConcatSeparator
public GridSqlAggregateFunction setGroupConcatSeparator(GridSqlElement separator)
- Parameters:
separator- Separator expression.- Returns:
thisfor chaining.
-
getGroupConcatSeparator
public GridSqlElement getGroupConcatSeparator()
- Returns:
- Separator expression.
-
getSQL
public String getSQL()
- Specified by:
getSQLin interfaceGridSqlAst- Overrides:
getSQLin classGridSqlFunction- Returns:
- Generate sql from this AST.
-
-