package cd.casic.framework.mongo.core.sdk;

import java.io.Serializable;

public interface Function<T, LambdaQueryWrapper,R extends SFunction<T, ?>> extends Serializable {

    default LambdaQueryWrapper orderByAsc(R column){
        return orderByAsc(true,column);
    }

    default LambdaQueryWrapper orderByDesc(R column){
        return orderByDesc(true,column);
    }

    LambdaQueryWrapper orderByAsc(boolean condition, R column);

    LambdaQueryWrapper orderByDesc(boolean condition, R column);

    LambdaQueryWrapper skip(Long skip);

    LambdaQueryWrapper limit(Integer limit);

    LambdaQueryWrapper select(R... columns);
}
