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

com.easy.query.api4j.sql.scec.SQLNativeLambdaExpressionChain Maven / Gradle / Ivy

There is a newer version: 2.3.3
Show newest version
package com.easy.query.api4j.sql.scec;

import com.easy.query.api4j.select.Queryable;
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 java.text.MessageFormat;
import java.util.Collection;

/**
 * create time 2023/9/28 21:20
 * 文件说明
 *
 * @author xuejiaming
 */
public interface SQLNativeLambdaExpressionChain {
    TChain expression(Property property);
     TChain expression(EntitySQLTableOwner table, Property property);

    TChain columnName(String columnName);
    TChain columnName(TableAvailable table, String columnName);

     TChain expression(Queryable subQuery);

    TChain value(Object val);
    /**
     * 将参数以[?,?,?]参数化形式拼接到sql中
     * @param values
     * @return
     * @param 
     */
     TChain collection(Collection values);

    TChain format(Object formatVal);

    TChain setAlias(String alias);

    /**
     * 因为默认{@link MessageFormat#format(Object)}会将参数"ifnull(id,'')"改为"ifnull(id,')"
     * 会认为单引号是转义符所以这边需要将单引号全部改为双引号,所以采用和输入文本一样的风格
     * 如果需要参数化将文本单引号改成双引号
     * @return
     */
    TChain keepStyle();

    /**
     * 使用message format 格式化风格 单引号作为转义
     * @return
     */
    TChain messageFormat();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy