postgresql.py 文件源码

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

项目:parsec-cloud 作者: Scille 项目源码 文件源码
def perform_pubkey_add(self, intent):
        async with self.connection.acquire() as conn:
            async with conn.cursor() as cur:
                try:
                    await cur.execute("INSERT INTO pubkeys VALUES (%s, %s);",
                        (intent.id, intent.key.decode()))
                except IntegrityError:
                    raise PubKeyError('Identity `%s` already has a public key' % intent.id)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号