All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.easy.query.api4j.select.extension.queryable7.SQLGroupable7 Maven / Gradle / Ivy

There is a newer version: 2.3.3
Show newest version
package com.easy.query.api4j.select.extension.queryable7;

import com.easy.query.api4j.select.Queryable7;
import com.easy.query.api4j.sql.SQLGroupBySelector;
import com.easy.query.api4j.sql.impl.SQLGroupBySelectorImpl;
import com.easy.query.core.common.tuple.Tuple7;
import com.easy.query.core.expression.lambda.SQLExpression1;
import com.easy.query.core.expression.lambda.SQLExpression7;

/**
 * create time 2023/8/18 09:33
 * 文件说明
 *
 * @author xuejiaming
 */
public interface SQLGroupable7 extends ClientQueryable7Available, Queryable7Available {

    default Queryable7 groupBy(SQLExpression7, SQLGroupBySelector, SQLGroupBySelector, SQLGroupBySelector, SQLGroupBySelector, SQLGroupBySelector, SQLGroupBySelector> selectExpression) {
        getClientQueryable7().groupBy((selector1, selector2, selector3, selector4, selector5, selector6, selector7) -> {
            selectExpression.apply(new SQLGroupBySelectorImpl<>(selector1), new SQLGroupBySelectorImpl<>(selector2), new SQLGroupBySelectorImpl<>(selector3), new SQLGroupBySelectorImpl<>(selector4), new SQLGroupBySelectorImpl<>(selector5), new SQLGroupBySelectorImpl<>(selector6), new SQLGroupBySelectorImpl<>(selector7));
        });
        return getQueryable7();
    }

    default Queryable7 groupBy(boolean condition, SQLExpression7, SQLGroupBySelector, SQLGroupBySelector, SQLGroupBySelector, SQLGroupBySelector, SQLGroupBySelector, SQLGroupBySelector> selectExpression) {
        getClientQueryable7().groupBy(condition, (selector1, selector2, selector3, selector4, selector5, selector6, selector7) -> {
            selectExpression.apply(new SQLGroupBySelectorImpl<>(selector1), new SQLGroupBySelectorImpl<>(selector2), new SQLGroupBySelectorImpl<>(selector3), new SQLGroupBySelectorImpl<>(selector4), new SQLGroupBySelectorImpl<>(selector5), new SQLGroupBySelectorImpl<>(selector6), new SQLGroupBySelectorImpl<>(selector7));
        });
        return getQueryable7();
    }

    default Queryable7 groupByMerge(SQLExpression1, SQLGroupBySelector, SQLGroupBySelector, SQLGroupBySelector, SQLGroupBySelector, SQLGroupBySelector, SQLGroupBySelector>> selectExpression) {
        return groupByMerge(true, selectExpression);
    }

    default Queryable7 groupByMerge(boolean condition, SQLExpression1, SQLGroupBySelector, SQLGroupBySelector, SQLGroupBySelector, SQLGroupBySelector, SQLGroupBySelector, SQLGroupBySelector>> selectExpression) {
        return groupBy(condition, (t1, t2,  t3, t4, t5, t6, t7) -> {
            selectExpression.apply(new Tuple7<>(t1, t2,  t3, t4, t5, t6, t7));
        });
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy