@classmethod
    def search(cls, query):
        if not query:
            return ''

        search_query = '%{0}%'.format(query)
        search_chain = (User.email.ilike(search_query),
                        User.name.ilike(search_query))

        return or_(*search_chain)
Return the user that owns a given file
dataset/ETHPy150Open nickjj/build-a-saas-app-with-flask/catwatch/blueprints/user/models.py/User.search--crossover with--dataset/ETHPy150Open saltstack/salt/salt/modules/win_file.py/get_user