com.easy.query.api4j.sql.SQLColumnSelector 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.ColumnSelector;
import com.easy.query.core.util.EasyCollectionUtil;
import java.util.Collection;
/**
* @author xuejiaming
* @Description: 文件说明
* @Date: 2023/2/6 23:20
*/
public interface SQLColumnSelector extends EntitySQLTableOwner, LambdaSQLFuncAvailable, SQLLambdaNative> {
ColumnSelector getColumnSelector();
default TableAvailable getTable() {
return getColumnSelector().getTable();
}
default QueryRuntimeContext getRuntimeContext() {
return getColumnSelector().getRuntimeContext();
}
default SQLColumnSelector columns(Collection> columns) {
if(EasyCollectionUtil.isNotEmpty(columns)){
for (Property column : columns) {
this.column(column);
}
}
return this;
}
default SQLColumnSelector column(Property column) {
getColumnSelector().column(EasyLambdaUtil.getPropertyName(column));
return this;
}
default SQLColumnSelector columnFunc(ColumnPropertyFunction columnPropertyFunction) {
getColumnSelector().columnFunc(columnPropertyFunction);
return this;
}
default SQLColumnSelector columnIgnore(Property column) {
getColumnSelector().columnIgnore(EasyLambdaUtil.getPropertyName(column));
return this;
}
default SQLColumnSelector columnAll() {
getColumnSelector().columnAll();
return this;
}
default SQLColumnSelector then(SQLColumnSelector sub) {
return sub;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy