|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.hibernate.dialect.function.StandardSQLFunction
org.hibernate.dialect.function.StandardAnsiSqlAggregationFunctions.AvgFunction
org.hibernate.dialect.function.AvgWithArgumentCastFunction
public class AvgWithArgumentCastFunction
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.
Field Summary |
---|
Fields inherited from class org.hibernate.dialect.function.StandardAnsiSqlAggregationFunctions.AvgFunction |
---|
INSTANCE |
Constructor Summary | |
---|---|
AvgWithArgumentCastFunction(java.lang.String castType)
|
Method Summary | |
---|---|
protected java.lang.String |
renderArgument(java.lang.String argument,
int firstArgumentJdbcType)
|
Methods inherited from class org.hibernate.dialect.function.StandardAnsiSqlAggregationFunctions.AvgFunction |
---|
determineJdbcTypeCode, render, render |
Methods inherited from class org.hibernate.dialect.function.StandardSQLFunction |
---|
getName, getReturnType, getType, hasArguments, hasParenthesesIfNoArguments, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AvgWithArgumentCastFunction(java.lang.String castType)
Method Detail |
---|
protected java.lang.String renderArgument(java.lang.String argument, int firstArgumentJdbcType)
renderArgument
in class StandardAnsiSqlAggregationFunctions.AvgFunction
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |