limit + skip
Added filter limit + filter skip for query .all
This commit is contained in:
parent
52b830de40
commit
03f9c24642
|
@ -261,7 +261,8 @@ CradleAdapter.prototype.count = function(model, callback, where) {
|
||||||
|
|
||||||
CradleAdapter.prototype.models = function(model, filter, callback, func) {
|
CradleAdapter.prototype.models = function(model, filter, callback, func) {
|
||||||
this.client.all(
|
this.client.all(
|
||||||
{include_docs: true},
|
// maybe there is a better way to do this?
|
||||||
|
{include_docs:true, limit: filter.limit == null ? 9999999999 : filter.limit, skip: filter.skip == null ? 0 : filter.skip},
|
||||||
errorHandler(callback, function(res, cb) {
|
errorHandler(callback, function(res, cb) {
|
||||||
var docs = res.map(function(doc) {
|
var docs = res.map(function(doc) {
|
||||||
return idealize(doc);
|
return idealize(doc);
|
||||||
|
|
Loading…
Reference in New Issue