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

com.easy.query.api4j.select.extension.queryable2.SQLSelectable2 Maven / Gradle / Ivy

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

import com.easy.query.api4j.select.Queryable;
import com.easy.query.api4j.select.impl.EasyQueryable;
import com.easy.query.api4j.sql.SQLColumnAsSelector;
import com.easy.query.api4j.sql.impl.SQLColumnAsSelectorImpl;
import com.easy.query.core.basic.api.select.ClientQueryable;
import com.easy.query.core.common.tuple.Tuple2;
import com.easy.query.core.expression.lambda.SQLExpression1;
import com.easy.query.core.expression.lambda.SQLExpression2;

/**
 * create time 2023/8/16 08:47
 * 文件说明
 *
 * @author xuejiaming
 */
public interface SQLSelectable2 extends ClientQueryable2Available {

   default   Queryable select(Class resultClass, SQLExpression2, SQLColumnAsSelector> selectExpression){
       ClientQueryable select = getClientQueryable2().select(resultClass, (t1, t2) -> {
           selectExpression.apply(new SQLColumnAsSelectorImpl<>(t1),new SQLColumnAsSelectorImpl<>(t2));
       });
       return new EasyQueryable<>(select);
   }

    default  Queryable selectMerge(Class resultClass, SQLExpression1, SQLColumnAsSelector>> selectExpression) {
        return select(resultClass, (t1, t2) -> {
            selectExpression.apply(new Tuple2<>(t1, t2));
        });
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy