public class

AvgWithArgumentCastFunction

extends StandardAnsiSqlAggregationFunctions.AvgFunction
java.lang.Object
   ↳ org.hibernate.dialect.function.StandardSQLFunction
     ↳ org.hibernate.dialect.function.StandardAnsiSqlAggregationFunctions.AvgFunction
       ↳ org.hibernate.dialect.function.AvgWithArgumentCastFunction

Class Overview

Some databases strictly return the type of the of the aggregation value for AVG which is problematic in the case of averaging integers because the decimals will be dropped. The usual workaround is to cast the integer argument as some form of double/decimal.

Summary

[Expand]
Inherited Fields
From class org.hibernate.dialect.function.StandardAnsiSqlAggregationFunctions.AvgFunction
Public Constructors
AvgWithArgumentCastFunction(String castType)
Protected Methods
String renderArgument(String argument, int firstArgumentJdbcType)
[Expand]
Inherited Methods
From class org.hibernate.dialect.function.StandardAnsiSqlAggregationFunctions.AvgFunction
From class org.hibernate.dialect.function.StandardSQLFunction
From class java.lang.Object
From interface org.hibernate.dialect.function.SQLFunction

Public Constructors

public AvgWithArgumentCastFunction (String castType)

Protected Methods

protected String renderArgument (String argument, int firstArgumentJdbcType)