database.py 文件源码

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

项目:globus-sample-data-portal 作者: globus 项目源码 文件源码
def get_db(self):
        """Return the app global db connection or create one."""
        db = getattr(g, '_database', None)

        if db is None:
            db = g._database = self.connect_to_db()
            db.row_factory = sqlite3.Row

        return db
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号