Commit cfeaa030 authored by Serge S. Koval's avatar Serge S. Koval

Merge pull request #574 from Myconomy/master

Notice a get_count_query necessity in the docstring
parents 74d19e9b ad355a16
......@@ -608,6 +608,11 @@ class ModelView(BaseModelView):
def get_count_query(self):
"""
Return a the count query for the model type
A query(self.model).count() approach produces an excessive
subquery, so query(func.count('*')) should be used instead.
See #45a2723 commit message for details.
"""
return self.session.query(func.count('*')).select_from(self.model)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment