Class GaussDBMinMaxFunction

java.lang.Object
org.hibernate.query.sqm.function.AbstractSqmFunctionDescriptor
org.hibernate.query.sqm.function.AbstractSqmSelfRenderingFunctionDescriptor
org.hibernate.community.dialect.function.GaussDBMinMaxFunction
All Implemented Interfaces:
org.hibernate.query.sqm.function.FunctionRenderer, org.hibernate.query.sqm.function.SqmFunctionDescriptor

public class GaussDBMinMaxFunction extends org.hibernate.query.sqm.function.AbstractSqmSelfRenderingFunctionDescriptor
GaussDB 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
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    void
    render(org.hibernate.sql.ast.spi.SqlAppender sqlAppender, List<? extends org.hibernate.sql.ast.tree.SqlAstNode> sqlAstArguments, org.hibernate.metamodel.model.domain.ReturnableType<?> returnType, org.hibernate.sql.ast.SqlAstTranslator<?> walker)
     
    void
    render(org.hibernate.sql.ast.spi.SqlAppender sqlAppender, List<? extends org.hibernate.sql.ast.tree.SqlAstNode> sqlAstArguments, org.hibernate.sql.ast.tree.predicate.Predicate filter, org.hibernate.metamodel.model.domain.ReturnableType<?> returnType, org.hibernate.sql.ast.SqlAstTranslator<?> translator)
     

    Methods inherited from class org.hibernate.query.sqm.function.AbstractSqmSelfRenderingFunctionDescriptor

    filterClauseSupported, 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 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.SqmFunctionDescriptor

    alwaysIncludesParentheses, generateSqmExpression, generateSqmExpression, isPredicate
  • Constructor Details

    • GaussDBMinMaxFunction

      public GaussDBMinMaxFunction(String name)
  • Method Details

    • render

      public void render(org.hibernate.sql.ast.spi.SqlAppender sqlAppender, List<? extends org.hibernate.sql.ast.tree.SqlAstNode> sqlAstArguments, org.hibernate.metamodel.model.domain.ReturnableType<?> returnType, org.hibernate.sql.ast.SqlAstTranslator<?> walker)
      Specified by:
      render in interface org.hibernate.query.sqm.function.FunctionRenderer
      Overrides:
      render in class org.hibernate.query.sqm.function.AbstractSqmSelfRenderingFunctionDescriptor
    • render

      public void render(org.hibernate.sql.ast.spi.SqlAppender sqlAppender, List<? extends org.hibernate.sql.ast.tree.SqlAstNode> sqlAstArguments, org.hibernate.sql.ast.tree.predicate.Predicate filter, org.hibernate.metamodel.model.domain.ReturnableType<?> returnType, org.hibernate.sql.ast.SqlAstTranslator<?> translator)
    • getArgumentListSignature

      public String getArgumentListSignature()
      Overrides:
      getArgumentListSignature in class org.hibernate.query.sqm.function.AbstractSqmFunctionDescriptor