Permalink
Browse files

adding 'nolimit' option

  • Loading branch information...
tracend committed May 29, 2013
1 parent ca66186 commit 0681b64f539f31c4cdc6e83b773ec230d0e8b915
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/simpledb.js
View
@@ -119,6 +119,7 @@ exports.SimpleDB = function(opts,logger) {
// TODO - get aws-lib to support port
awsopts.port = null == opts.port ? 80 : opts.port
+ awsopts.nolimit = null == opts.nolimit ? false : opts.nolimit
var results = []
@@ -152,7 +153,7 @@ exports.SimpleDB = function(opts,logger) {
if( !err ) {
results = results.concat( res.SelectResult.Item )
- if( res.SelectResult.Item.length == maxlimit && res.SelectResult.NextToken){
+ if( awsopts.nolimit && res.SelectResult.Item && ( res.SelectResult.Item.length == maxlimit ) && res.SelectResult.NextToken){
// get the next batch of results
q.NextToken = res.SelectResult.NextToken
makereq(act,q,callback)

0 comments on commit 0681b64

Please sign in to comment.