@SafeVarargs
    static QueryMeta buildFindAllSql(ActiveRecord activeRecord, Supplier<ConditionEnum>... conditions) {

        QueryMeta queryMeta = new QueryMeta();

        String        initSql = parseFieldsSql(activeRecord.getTableName(), conditions);
        StringBuilder sqlBuf  = new StringBuilder(initSql);

        int[]        pos  = {1};
        List<Object> list = parseWhere(activeRecord, pos, sqlBuf);
        List<Object> temp = andWhere(activeRecord, pos, sqlBuf);
        if (null != temp) {
            list.addAll(temp);
        }

        String sql     = sqlFilter(sqlBuf.toString());
        String orderBy = parseOrderBySql(conditions);
        if (null != orderBy) {
            sql += orderBy;
        }
        String limit = parseLimitSql(conditions);
        if (null != limit) {
            sql += limit;
        }
        PageRow pageRow = Base.pageLocal.get();
        sql = appendPageParams(sql, pageRow);

        Object[] args = list.toArray();

        queryMeta.setSql(sql);
        queryMeta.setParams(args);
        mapping(queryMeta, activeRecord.getClass());
        return queryMeta;
    }
@ SafeVarargs static QueryMeta buildFindAllSql ( ActiveRecord activeRecord , Supplier < ConditionEnum > ... conditions ) { QueryMeta queryMeta = new QueryMeta ( ) ; String initSql = parseFieldsSql ( activeRecord . getTableName ( ) , conditions ) ; StringBuilder sqlBuf = new StringBuilder ( initSql ) ; int [ ] pos = { 1 } ; List < Object > list = parseWhere ( activeRecord , pos , sqlBuf ) ; List < Object > temp = andWhere ( activeRecord , pos , sqlBuf ) ; if ( null != temp ) { list . addAll ( temp ) ; } String sql = sqlFilter ( sqlBuf . toString ( ) ) ; String orderBy = parseOrderBySql ( conditions ) ; if ( null != orderBy ) { sql += orderBy ; } String limit = parseLimitSql ( conditions ) ; if ( null != limit ) { sql += limit ; } PageRow pageRow = Base . pageLocal . get ( ) ; sql = appendPageParams ( sql , pageRow ) ; Object [ ] args = list . toArray ( ) ; queryMeta . setSql ( sql ) ; queryMeta . setParams ( args ) ; mapping ( queryMeta , activeRecord . getClass ( ) ) ; return queryMeta ; }
构造一个查询列表SQL

@param activeRecord ActiveRecord对象
@param conditions   条件
@return 返回QueryMeta对象