Exemple #1
0
 def query_count(cls, filter_data, initial_query=None):
     """
     Like query_objects, but retrieve only the count of results.
     """
     filter_data.pop('query_start', None)
     filter_data.pop('query_limit', None)
     query = cls.query_objects(filter_data, initial_query=initial_query)
     return query.count()
Exemple #2
0
 def query_count(cls, filter_data, initial_query=None):
     """
     Like query_objects, but retrieve only the count of results.
     """
     filter_data.pop('query_start', None)
     filter_data.pop('query_limit', None)
     query = cls.query_objects(filter_data, initial_query=initial_query)
     return query.count()