bulkloader.py 文件源码

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

项目:MKFQ 作者: maojingios 项目源码 文件源码
def _OpenSecondaryConnection(self):
    """Possibly open a database connection for the secondary thread.

    If the connection is not open (for the calling thread, which is assumed
    to be the unique secondary thread), then open it. We also open a couple
    cursors for later use (and reuse).
    """
    if self.secondary_conn:
      return

    assert not _RunningInThread(self.primary_thread)

    self.secondary_thread = threading.currentThread()







    self.secondary_conn = sqlite3.connect(self.db_filename)


    self.insert_cursor = self.secondary_conn.cursor()
    self.update_cursor = self.secondary_conn.cursor()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号