app/src/main/java/db/juhaku/juhakudb/filter/PredicateBuilder.java
/**
     * Helper to create order by according order for given columns.
     *
     * @param order Instance of {@link Order} to use for columns.
     * @param cols String array of columns that is being used as order.
     *
     * @return String for order by statement without order by.
     *
     * @since 2.1.0
     *
     * @hide
     */
Helper to create order by according order for given columns.
@param order Instance of  Order to use for columns.
@param cols String array of columns that is being used as order.

@return String for order by statement without order by.



@hide
Helper to create order by according order for given columns . @param order Instance of Order to use for columns . @param cols String array of columns that is being used as order . @return String for order by statement without order by . @hide
private String orderBy(Order order, String... cols) {
        StringBuilder orderBuilder = new StringBuilder();
        for (String col : cols) {
            orderBuilder.append(col);
            if (!col.equals(cols[cols.length - 1])) {
                orderBuilder.append(", ");
            }
        }
        orderBuilder.append(" ").append(order.toString());
        return orderBuilder.toString();
    }
private String orderBy ( Order order , String ... cols ) { StringBuilder orderBuilder = new StringBuilder ( ) ; for ( String col : cols ) { orderBuilder . append ( col ) ; if ( ! col . equals ( cols [ cols . length - 1 ] ) ) { orderBuilder . append ( ", " ) ; } } orderBuilder . append ( " " ) . append ( order . toString ( ) ) ; return orderBuilder . toString ( ) ; }
Helper to create order by according order for given columns.
Helper to create order by according order for given columns .