'Return a list of of repositories owned by a given TS user from the DB.
:returns: query that will emit repositories owned by given user
:rtype:   sqlalchemy query'

def list_by_owner(self, trans, user_id):

    query = trans.sa_session.query(trans.app.model.Repository).filter((trans.app.model.Repository.table.c.user_id == user_id))
    return query
