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

com.easy.query.api4j.sql.SQLOrderBySelector Maven / Gradle / Ivy

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

import com.easy.query.api4j.sql.core.SQLLambdaNative;
import com.easy.query.api4j.util.EasyLambdaUtil;
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.ColumnOrderSelector;

/**
 * create time 2023/6/16 21:54
 * 文件说明
 *
 * @author xuejiaming
 */
public interface SQLOrderBySelector extends EntitySQLTableOwner, SQLLambdaNative> {
    ColumnOrderSelector getOrderBySelector();

    default TableAvailable getTable() {
        return getOrderBySelector().getTable();
    }

    default  SQLOrderBySelector column(Property column) {
        getOrderBySelector().column(EasyLambdaUtil.getPropertyName(column));
        return this;
    }

    default SQLOrderBySelector columnFunc(ColumnPropertyFunction columnPropertyFunction) {
        getOrderBySelector().columnFunc(columnPropertyFunction);
        return this;
    }

    /**
     * 请使用 sqlNativeSegment
     * @param columnConst
     * @return
     */
    @Deprecated
    default SQLOrderBySelector columnConst(String columnConst){
        return sqlNativeSegment(columnConst,c->{});
    }

    default  SQLOrderBySelector then(SQLOrderBySelector sub) {
        return sub;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy