def get_count_query(self): return self.session.query(func.count('*')).filter(self.model.dataset_id==session['dataset_id'])
def get_count_query(self): if session['dataset_id'] == "": return self.session.query(func.count('*')).select_from(self.model) else: return self.session.query(func.count('*')).filter(self.model.dataset_id==session['dataset_id'])
def get_count_query(self): return self.session.query(func.count('*')).filter(self.model.country == None)
def get_count_query(self): semester = models.Semester.query.filter_by(current=True).one() return self.session.query(func.count('*')).filter(self.model.semester==semester)
def get_count_query(self): role = session.get('user')['role'] if role == UserRole.AppDev: return self.session.query(func.count('*')).filter(self.model.author_id == session.get('user')['author_identifier']) return super(ItemView, self).get_count_query()
def get_count_query(self): return self.session.query( func.count('*')).filter(self.model.owner == current_user)