Example #1
0
					fetchPart = function() {
						options.since = since;
						options.limit = limit;
						wrapper.changes(options, function(err,resp) {
							if ( err )	return endcb(err);
							var resultsLength = resp.results.length;
							cb(resp.results);
							
							if ( resultsLength < limit || resp.last_seq == lastSeq ) {
								ecb(null,resp.last_seq);
							} else {
								if ( resultsLength ) {
									since = resp.last_seq;
								}
								fetchPart();
							}
						});
					};