lib/builder.js
function buildLimitPartial(requestQuery) {
        var sLimit = "";
        if (requestQuery && requestQuery.start !== undefined && self.dbType !== 'oracle') {
            var start = parseInt(requestQuery.start, 10);
            if (start >= 0) {
                var len = parseInt(requestQuery.length, 10);
                sLimit = (self.dbType === 'postgres') ? " OFFSET " + String(start) + " LIMIT " : " LIMIT " + String(start) + ", ";
                sLimit += ( len > 0 ) ? String(len) : String(DEFAULT_LIMIT);
            }
        }
        return sLimit;
    }
function buildLimitPartial(requestQuery) {
        var sLimit = "";
        if (requestQuery && requestQuery.start !== undefined && self.dbType !== 'oracle') {
            var start = parseInt(requestQuery.start, 10);
            if (start >= 0) {
                var len = parseInt(requestQuery.length, 10);
                sLimit = (self.dbType === 'postgres') ? " OFFSET " + String(start) + " LIMIT " : " LIMIT " + String(start) + ", ";
                sLimit += ( len > 0 ) ? String(len) : String(DEFAULT_LIMIT);
            }
        }
        return sLimit;
    }
function buildLimitPartial ( requestQuery ) { var sLimit = "" ; if ( requestQuery && requestQuery . start !== undefined && self . dbType !== 'oracle' ) { var start = parseInt ( requestQuery . start , 10 ) ; if ( start >= 0 ) { var len = parseInt ( requestQuery . length , 10 ) ; sLimit = ( self . dbType === 'postgres' ) ? " OFFSET " + String ( start ) + " LIMIT " : " LIMIT " + String ( start ) + ", " ; sLimit += ( len > 0 ) ? String ( len ) : String ( DEFAULT_LIMIT ) ; } } return sLimit ; }
Build a LIMIT clause
@param requestQuery The Datatable query string (we look at length and start)
@return {String} The LIMIT clause
Build a LIMIT clause