File tree 1 file changed +4
-5
lines changed 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 1
-
2
1
/**
3
2
* Module Dependencies
4
3
*/
@@ -317,11 +316,11 @@ var sql = module.exports = {
317
316
}
318
317
}
319
318
320
- if ( hop ( options , 'limit' ) ) {
319
+ if ( hop ( options , 'limit' ) && options . limit !== null ) {
321
320
queryPart += 'LIMIT ' + options . limit + ' ' ;
322
321
}
323
322
324
- if ( hop ( options , 'skip' ) ) {
323
+ if ( hop ( options , 'skip' ) && options . skip !== null ) {
325
324
// Some MySQL hackery here. For details, see:
326
325
// http://stackoverflow.com/questions/255517/mysql-offset-infinite-rows
327
326
if ( ! options . limit ) {
@@ -416,15 +415,15 @@ var sql = module.exports = {
416
415
queryPart = queryPart . slice ( 0 , - 2 ) + ' ' ;
417
416
}
418
417
419
- if ( hop ( options , 'limit' ) ) {
418
+ if ( hop ( options , 'limit' ) && options . limit !== null ) {
420
419
queryPart += 'LIMIT ' + options . limit + ' ' ;
421
420
} else {
422
421
// Some MySQL hackery here. For details, see:
423
422
// http://stackoverflow.com/questions/255517/mysql-offset-infinite-rows
424
423
queryPart += 'LIMIT 18446744073709551610 ' ;
425
424
}
426
425
427
- if ( hop ( options , 'skip' ) ) {
426
+ if ( hop ( options , 'skip' ) && options . skip !== null ) {
428
427
queryPart += 'OFFSET ' + options . skip + ' ' ;
429
428
}
430
429
You can’t perform that action at this time.
0 commit comments