com.easy.query.db2.func.DB2FuncImpl Maven / Gradle / Ivy
The newest version!
package com.easy.query.db2.func;
import com.easy.query.core.enums.SQLLikeEnum;
import com.easy.query.core.expression.lambda.SQLExpression1;
import com.easy.query.core.expression.parser.core.SQLTableOwner;
import com.easy.query.core.func.SQLFuncImpl;
import com.easy.query.core.func.SQLFunction;
import com.easy.query.core.func.column.ColumnExpression;
import com.easy.query.core.func.column.ColumnFuncSelector;
import com.easy.query.core.func.def.DistinctDefaultSQLFunction;
import com.easy.query.core.func.def.enums.DateTimeDurationEnum;
import com.easy.query.core.func.def.enums.DateTimeUnitEnum;
import com.easy.query.core.func.def.enums.MathMethodEnum;
import com.easy.query.core.func.def.enums.TimeUnitEnum;
import java.util.List;
import java.util.concurrent.TimeUnit;
/**
* create time 2023/10/13 18:16
* 文件说明
*
* @author xuejiaming
*/
public class DB2FuncImpl extends SQLFuncImpl {
@Override
public SQLFunction nullOrDefault(SQLExpression1 sqlExpression) {
return new DB2NullDefaultSQLFunction(getColumnExpressions(sqlExpression));
}
@Override
public SQLFunction concat(List concatExpressions) {
return new DB2ConcatSQLFunction(concatExpressions);
}
// @Override
// public SQLFunction join(String separator, List concatExpressions) {
// return new PgSQLStringJoinSQLFunction(separator, concatExpressions);
// }
@Override
public SQLFunction now() {
return DB2NowSQLFunction.INSTANCE;
}
@Override
public SQLFunction utcNow() {
return DB2UtcNowSQLFunction.INSTANCE;
}
@Override
public DistinctDefaultSQLFunction sum(SQLExpression1 sqlExpression) {
return new DB2SumSQLFunction(getColumnExpressions(sqlExpression));
}
@Override
public DistinctDefaultSQLFunction count(SQLExpression1 sqlExpression) {
return new DB2CountSQLFunction(getColumnExpressions(sqlExpression));
}
@Override
public DistinctDefaultSQLFunction avg(SQLExpression1 sqlExpression) {
return new DB2AvgSQLFunction(getColumnExpressions(sqlExpression));
}
@Override
public SQLFunction join(SQLExpression1 sqlExpression, boolean distinct) {
return new DB2JoinSQLFunction(getColumnExpressions(sqlExpression),distinct);
}
@Override
public SQLFunction cast(SQLExpression1 sqlExpression, Class> targetClazz) {
return new DB2CastSQLFunction(getColumnExpressions(sqlExpression), targetClazz);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy