function doneQuery(response) {
      _(response.viewpoints).each(visitor);
      
      if (response.viewpoints.length >= request.limit) {
        if (paged) {
          deferred.resolve(response.last_key);
        } else {
          request.start_key = response.last_key;
          sendQuery();
        }
      } else {
        deferred.resolve();
      }
    }
// which will query the next page and returns it.
which will query the next page and returns it.
which will query the next page and returns it .
function doneQuery(response) {
      _(response.viewpoints).each(visitor);
      if (response.viewpoints.length >= request.limit) {
        if (paged) {
          deferred.resolve(response.last_key);
        } else {
          request.start_key = response.last_key;
          sendQuery();
        }
      } else {
        deferred.resolve();
      }
    }
function doneQuery ( response ) { _ ( response . viewpoints ) . each ( visitor ) ; if ( response . viewpoints . length >= request . limit ) { if ( paged ) { deferred . resolve ( response . last_key ) ; } else { request . start_key = response . last_key ; sendQuery ( ) ; } } else { deferred . resolve ( ) ; } }
which will query the next page and returns it.
which will query the next page and returns it .