events.py 文件源码

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

项目:chihu 作者: yelongyu 项目源码 文件源码
def first_connect(self, dbapi_connection, connection_record):
        """Called exactly once for the first time a DBAPI connection is
        checked out from a particular :class:`.Pool`.

        The rationale for :meth:`.PoolEvents.first_connect` is to determine
        information about a particular series of database connections based
        on the settings used for all connections.  Since a particular
        :class:`.Pool` refers to a single "creator" function (which in terms
        of a :class:`.Engine` refers to the URL and connection options used),
        it is typically valid to make observations about a single connection
        that can be safely assumed to be valid about all subsequent
        connections, such as the database version, the server and client
        encoding settings, collation settings, and many others.

        :param dbapi_connection: a DBAPI connection.

        :param connection_record: the :class:`._ConnectionRecord` managing the
         DBAPI connection.

        """
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号