Skip to content

Commit 86cdc56

Browse files
committed
Patching count() with with_limit_and_skip=True parameter
Version updated to 0.4.0.bigml-1
1 parent f5fa76a commit 86cdc56

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

django_mongodb_engine/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/python
22
# -*- coding: utf-8 -*-
33

4-
__version__ = (0, 4, 0)
4+
__version__ = (0, 4, 0, 'bigml-1')
55
__author__ = "Flavio Percoco Premoli, Alberto Paro, " + \
66
"Jonas Haag and contributors"
77
__contact__ = "django-non-relational@googlegroups.com"

django_mongodb_engine/compiler.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,11 @@ def fetch(self, low_mark, high_mark):
8282
yield entity
8383

8484
@safe_call
85-
def count(self, limit=None):
85+
def count(self, limit=None, with_limit_and_skip=False):
8686
results = self._get_results()
8787
if limit is not None:
8888
results.limit(limit)
89-
return results.count()
89+
return results.count(with_limit_and_skip=with_limit_and_skip)
9090

9191
@safe_call
9292
def order_by(self, ordering):

0 commit comments

Comments
 (0)