com.easy.query.api4j.sql.SQLGroupBySelector Maven / Gradle / Ivy
package com.easy.query.api4j.sql;
import com.easy.query.api4j.sql.core.SQLLambdaNative;
import com.easy.query.api4j.sql.core.available.LambdaSQLFuncAvailable;
import com.easy.query.api4j.util.EasyLambdaUtil;
import com.easy.query.core.context.QueryRuntimeContext;
import com.easy.query.core.expression.func.ColumnPropertyFunction;
import com.easy.query.core.expression.lambda.Property;
import com.easy.query.core.expression.parser.core.EntitySQLTableOwner;
import com.easy.query.core.expression.parser.core.available.TableAvailable;
import com.easy.query.core.expression.parser.core.base.ColumnGroupSelector;
/**
* create time 2023/4/30 21:49
* 文件说明
*
* @author xuejiaming
*/
public interface SQLGroupBySelector extends EntitySQLTableOwner, LambdaSQLFuncAvailable, SQLLambdaNative> {
ColumnGroupSelector getGroupBySelector();
default TableAvailable getTable() {
return getGroupBySelector().getTable();
}
default QueryRuntimeContext getRuntimeContext() {
return getGroupBySelector().getRuntimeContext();
}
default SQLGroupBySelector column(Property column) {
getGroupBySelector().column(EasyLambdaUtil.getPropertyName(column));
return this;
}
/**
* 请使用 sqlNativeSegment
* @param columnConst
* @return
*/
@Deprecated
default SQLGroupBySelector columnConst(String columnConst){
return sqlNativeSegment(columnConst,c->{});
}
default SQLGroupBySelector columnFunc(ColumnPropertyFunction columnPropertyFunction) {
getGroupBySelector().columnFunc(columnPropertyFunction);
return this;
}
default SQLGroupBySelector then(SQLGroupBySelector sub) {
return sub;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy