models.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:research-eGrader 作者: openstax 项目源码 文件源码
def get_graded_count(exercise_id):
    query = db.session.query(Response.id,
                             func.count(func.coalesce(ResponseGrade.id, None))) \
        .outerjoin(ResponseGrade) \
        .filter(Response.exercise_id == exercise_id) \
        .group_by(Response.id) \
        .order_by(Response.id)

    return query.all()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号