Package org.hibernate.dialect.function
Class PostgreSQLMinMaxFunction
- java.lang.Object
-
- org.hibernate.query.sqm.function.AbstractSqmFunctionDescriptor
-
- org.hibernate.query.sqm.function.AbstractSqmSelfRenderingFunctionDescriptor
-
- org.hibernate.dialect.function.PostgreSQLMinMaxFunction
-
- All Implemented Interfaces:
FunctionRenderer
,FunctionRenderingSupport
,SqmFunctionDescriptor
public class PostgreSQLMinMaxFunction extends AbstractSqmSelfRenderingFunctionDescriptor
PostgreSQL doesn't support min/max for uuid yet, but since that type is comparable we want to support this operation. The workaround is to cast uuid to text and aggregate that, which preserves the ordering, and finally cast the result back to uuid.
-
-
Constructor Summary
Constructors Constructor Description PostgreSQLMinMaxFunction(String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getArgumentListSignature()
void
render(SqlAppender sqlAppender, List<? extends SqlAstNode> sqlAstArguments, ReturnableType<?> returnType, SqlAstTranslator<?> walker)
void
render(SqlAppender sqlAppender, List<? extends SqlAstNode> sqlAstArguments, Predicate filter, ReturnableType<?> returnType, SqlAstTranslator<?> translator)
-
Methods inherited from class org.hibernate.query.sqm.function.AbstractSqmSelfRenderingFunctionDescriptor
generateSqmAggregateFunctionExpression, generateSqmFunctionExpression, generateSqmOrderedSetAggregateFunctionExpression, generateSqmWindowFunctionExpression, getFunctionKind
-
Methods inherited from class org.hibernate.query.sqm.function.AbstractSqmFunctionDescriptor
generateAggregateSqmExpression, generateOrderedSetAggregateSqmExpression, generateSqmExpression, generateWindowSqmExpression, getArgumentsValidator, getArgumentTypeResolver, getName, getReturnSignature, getReturnTypeResolver, getSignature
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.query.sqm.function.FunctionRenderer
render, render, render
-
Methods inherited from interface org.hibernate.query.sqm.function.FunctionRenderingSupport
render, render, render
-
Methods inherited from interface org.hibernate.query.sqm.function.SqmFunctionDescriptor
alwaysIncludesParentheses, generateSqmExpression, generateSqmExpression
-
-
-
-
Constructor Detail
-
PostgreSQLMinMaxFunction
public PostgreSQLMinMaxFunction(String name)
-
-
Method Detail
-
render
public void render(SqlAppender sqlAppender, List<? extends SqlAstNode> sqlAstArguments, ReturnableType<?> returnType, SqlAstTranslator<?> walker)
- Specified by:
render
in interfaceFunctionRenderer
- Specified by:
render
in interfaceFunctionRenderingSupport
- Overrides:
render
in classAbstractSqmSelfRenderingFunctionDescriptor
-
render
public void render(SqlAppender sqlAppender, List<? extends SqlAstNode> sqlAstArguments, Predicate filter, ReturnableType<?> returnType, SqlAstTranslator<?> translator)
-
getArgumentListSignature
public String getArgumentListSignature()
- Overrides:
getArgumentListSignature
in classAbstractSqmFunctionDescriptor
-
-