/** * 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 ); }
@Override public String render(Type firstArgumentType, List arguments, SessionFactoryImplementor factory) { if ( arguments.size() > 1 ) { if ( "distinct".equalsIgnoreCase( arguments.get( 0 ).toString() ) ) { return renderCountDistinct( arguments, factory.getDialect() ); } } return super.render( firstArgumentType, arguments, 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) { if ( arguments.size() > 1 ) { if ( "distinct".equalsIgnoreCase( arguments.get( 0 ).toString() ) ) { return renderCountDistinct( arguments ); } } return super.render( firstArgumentType, arguments, factory ); }
@Override public String render(Type firstArgumentType, List arguments, SessionFactoryImplementor factory) { if ( arguments.size() > 1 ) { if ( "distinct".equalsIgnoreCase( arguments.get( 0 ).toString() ) ) { return renderCountDistinct( arguments ); } } return super.render( firstArgumentType, arguments, 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 ); } }