@Override public String render(Type firstArgumentType, List arguments, SessionFactoryImplementor factory) throws QueryException { final int jdbcTypeCode = determineJdbcTypeCode( firstArgumentType, factory ); return render( jdbcTypeCode, arguments.get( 0 ).toString(), factory ); }
/** * Push the functions defined on StandardAnsiSqlAggregationFunctions into the given map * * @param functionMap The map of functions to push to */ public static void primeFunctionMap(Map<String, SQLFunction> functionMap) { functionMap.put( AvgFunction.INSTANCE.getName(), AvgFunction.INSTANCE ); functionMap.put( CountFunction.INSTANCE.getName(), CountFunction.INSTANCE ); functionMap.put( MaxFunction.INSTANCE.getName(), MaxFunction.INSTANCE ); functionMap.put( MinFunction.INSTANCE.getName(), MinFunction.INSTANCE ); functionMap.put( SumFunction.INSTANCE.getName(), SumFunction.INSTANCE ); }
protected String render(int firstArgumentJdbcType, String argument, SessionFactoryImplementor factory) { return "avg(" + renderArgument( argument, firstArgumentJdbcType ) + ")"; }
protected String render(int firstArgumentJdbcType, String argument, SessionFactoryImplementor factory) { return "avg(" + renderArgument( argument, firstArgumentJdbcType ) + ")"; }
public static void primeFunctionMap(Map<String, SQLFunction> functionMap) { functionMap.put( AvgFunction.INSTANCE.getName(), AvgFunction.INSTANCE ); functionMap.put( CountFunction.INSTANCE.getName(), CountFunction.INSTANCE ); functionMap.put( MaxFunction.INSTANCE.getName(), MaxFunction.INSTANCE ); functionMap.put( MinFunction.INSTANCE.getName(), MinFunction.INSTANCE ); functionMap.put( SumFunction.INSTANCE.getName(), SumFunction.INSTANCE ); } }
@Override public String render(Type firstArgumentType, List arguments, SessionFactoryImplementor factory) throws QueryException { int jdbcTypeCode = determineJdbcTypeCode( firstArgumentType, factory ); return render( jdbcTypeCode, arguments.get(0).toString(), factory ); }
public static void primeFunctionMap(Map<String, SQLFunction> functionMap) { functionMap.put( AvgFunction.INSTANCE.getName(), AvgFunction.INSTANCE ); functionMap.put( CountFunction.INSTANCE.getName(), CountFunction.INSTANCE ); functionMap.put( MaxFunction.INSTANCE.getName(), MaxFunction.INSTANCE ); functionMap.put( MinFunction.INSTANCE.getName(), MinFunction.INSTANCE ); functionMap.put( SumFunction.INSTANCE.getName(), SumFunction.INSTANCE ); } }
@Override public String render(Type firstArgumentType, List arguments, SessionFactoryImplementor factory) throws QueryException { int jdbcTypeCode = determineJdbcTypeCode( firstArgumentType, factory ); return render( jdbcTypeCode, arguments.get(0).toString(), factory ); }
@SuppressWarnings("UnusedParameters") protected String render(int firstArgumentJdbcType, String argument, SessionFactoryImplementor factory) { return "avg(" + renderArgument( argument, firstArgumentJdbcType ) + ")"; }