Skip to content

Commit b01ed3a

Browse files
iteufelojourmel
authored andcommitted
Fixed MSSQL limit support
1 parent bbbb4f6 commit b01ed3a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/dialects/mssql/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ var Dialect = module.exports = function(builder) {
1010
BaseDialect.call(this, builder);
1111

1212
this.blocks.set('limit', function(params) {
13-
return (params.offset) ? '' : 'TOP(' + builder._pushValue(params.limit) + ')';
13+
return (!isNaN(params.offset)) ? '' : 'TOP(' + builder._pushValue(params.limit) + ')';
1414
});
1515

1616
this.blocks.set('offset', function(params) {

0 commit comments

Comments
 (0)