|
@@ -62,49 +62,49 @@ public class Select<T> {
|
|
|
|
|
|
public <S, V> Select<T> max(SFunction<S, V> function, SFunction<T, ?> asFunction) {
|
|
|
String as = PropertyNamer.methodToProperty(LambdaUtils.extract(asFunction).getImplMethodName());
|
|
|
- sql.fieldList.add("MAX(" + sql.getSqlFieldName(function) + ")" + StringPool.SPACE + as);
|
|
|
+ sql.fieldList.add("MAX(" + sql.getSqlFieldName(function) + ") " + as);
|
|
|
return this;
|
|
|
}
|
|
|
|
|
|
public <S, V> Select<T> max(String alias, SFunction<S, V> function, SFunction<T, ?> asFunction) {
|
|
|
String as = PropertyNamer.methodToProperty(LambdaUtils.extract(asFunction).getImplMethodName());
|
|
|
- sql.fieldList.add("MAX(" + sql.getSqlFieldName(alias, function) + ")" + StringPool.SPACE + as);
|
|
|
+ sql.fieldList.add("MAX(" + sql.getSqlFieldName(alias, function) + ") " + as);
|
|
|
return this;
|
|
|
}
|
|
|
|
|
|
public <S, V> Select<T> min(SFunction<S, V> function, SFunction<T, ?> asFunction) {
|
|
|
String as = PropertyNamer.methodToProperty(LambdaUtils.extract(asFunction).getImplMethodName());
|
|
|
- sql.fieldList.add("MIN(" + sql.getSqlFieldName(function) + ")" + StringPool.SPACE + as);
|
|
|
+ sql.fieldList.add("MIN(" + sql.getSqlFieldName(function) + ") " + as);
|
|
|
return this;
|
|
|
}
|
|
|
|
|
|
public <S, V> Select<T> min(String alias, SFunction<S, V> function, SFunction<T, ?> asFunction) {
|
|
|
String as = PropertyNamer.methodToProperty(LambdaUtils.extract(asFunction).getImplMethodName());
|
|
|
- sql.fieldList.add("MIN(" + sql.getSqlFieldName(alias, function) + ")" + StringPool.SPACE + as);
|
|
|
+ sql.fieldList.add("MIN(" + sql.getSqlFieldName(alias, function) + ") " + as);
|
|
|
return this;
|
|
|
}
|
|
|
|
|
|
public <S, V> Select<T> count(SFunction<S, V> function, SFunction<T, ?> asFunction) {
|
|
|
String as = PropertyNamer.methodToProperty(LambdaUtils.extract(asFunction).getImplMethodName());
|
|
|
- sql.fieldList.add("COUNT(" + sql.getSqlFieldName(function) + ")" + StringPool.SPACE + as);
|
|
|
+ sql.fieldList.add("COUNT(" + sql.getSqlFieldName(function) + ") " + as);
|
|
|
return this;
|
|
|
}
|
|
|
|
|
|
public <S, V> Select<T> count(String alias, SFunction<S, V> function, SFunction<T, ?> asFunction) {
|
|
|
String as = PropertyNamer.methodToProperty(LambdaUtils.extract(asFunction).getImplMethodName());
|
|
|
- sql.fieldList.add("COUNT(" + sql.getSqlFieldName(alias, function) + ")" + StringPool.SPACE + as);
|
|
|
+ sql.fieldList.add("COUNT(" + sql.getSqlFieldName(alias, function) + ") " + as);
|
|
|
return this;
|
|
|
}
|
|
|
|
|
|
public <S, V> Select<T> sum(SFunction<S, V> function, SFunction<T, ?> asFunction) {
|
|
|
String as = PropertyNamer.methodToProperty(LambdaUtils.extract(asFunction).getImplMethodName());
|
|
|
- sql.fieldList.add("SUM(" + sql.getSqlFieldName(function) + ")" + StringPool.SPACE + as);
|
|
|
+ sql.fieldList.add("SUM(" + sql.getSqlFieldName(function) + ") " + as);
|
|
|
return this;
|
|
|
}
|
|
|
|
|
|
public <S, V> Select<T> sum(String alias, SFunction<S, V> function, SFunction<T, ?> asFunction) {
|
|
|
String as = PropertyNamer.methodToProperty(LambdaUtils.extract(asFunction).getImplMethodName());
|
|
|
- sql.fieldList.add("SUM(" + sql.getSqlFieldName(alias, function) + ")" + StringPool.SPACE + as);
|
|
|
+ sql.fieldList.add("SUM(" + sql.getSqlFieldName(alias, function) + ") " + as);
|
|
|
return this;
|
|
|
}
|
|
|
|