postgresql.py 文件源码

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

项目:ormageddon 作者: renskiy 项目源码 文件源码
def get_cursor(
        self,
        connection=None,
        release_new_connection=True,
        force_release_connection=False,
    ):
        need_release_connection = release_new_connection and not connection
        connection = connection or await self.get_conn()
        cursor = await connection.cursor()
        if need_release_connection or force_release_connection:
            pool = await self.pool
            weakref.finalize(cursor, pool.release, connection)
        return cursor
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号