python类Engine()的实例源码

events.py 文件源码 项目:python_ddd_flask 作者: igorvinnicius 项目源码 文件源码 阅读 26 收藏 0 点赞 0 评论 0
def set_engine_execution_options(self, engine, opts):
        """Intercept when the :meth:`.Engine.execution_options`
        method is called.

        The :meth:`.Engine.execution_options` method produces a shallow
        copy of the :class:`.Engine` which stores the new options.  That new
        :class:`.Engine` is passed here.   A particular application of this
        method is to add a :meth:`.ConnectionEvents.engine_connect` event
        handler to the given :class:`.Engine` which will perform some per-
        :class:`.Connection` task specific to these execution options.

        :param conn: The newly copied :class:`.Engine` object

        :param opts: dictionary of options that were passed to the
         :meth:`.Connection.execution_options` method.

        .. versionadded:: 0.9.0

        .. seealso::

            :meth:`.ConnectionEvents.set_connection_execution_options` - event
            which is called when :meth:`.Connection.execution_options` is
            called.

        """
events.py 文件源码 项目:python_ddd_flask 作者: igorvinnicius 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def engine_disposed(self, engine):
        """Intercept when the :meth:`.Engine.dispose` method is called.

        The :meth:`.Engine.dispose` method instructs the engine to
        "dispose" of it's connection pool (e.g. :class:`.Pool`), and
        replaces it with a new one.  Disposing of the old pool has the
        effect that existing checked-in connections are closed.  The new
        pool does not establish any new connections until it is first used.

        This event can be used to indicate that resources related to the
        :class:`.Engine` should also be cleaned up, keeping in mind that the
        :class:`.Engine` can still be used for new requests in which case
        it re-acquires connection resources.

        .. versionadded:: 1.0.5

        """
events.py 文件源码 项目:webapp 作者: superchilli 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
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.

        """
events.py 文件源码 项目:webapp 作者: superchilli 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def set_engine_execution_options(self, engine, opts):
        """Intercept when the :meth:`.Engine.execution_options`
        method is called.

        The :meth:`.Engine.execution_options` method produces a shallow
        copy of the :class:`.Engine` which stores the new options.  That new
        :class:`.Engine` is passed here.   A particular application of this
        method is to add a :meth:`.ConnectionEvents.engine_connect` event
        handler to the given :class:`.Engine` which will perform some per-
        :class:`.Connection` task specific to these execution options.

        :param conn: The newly copied :class:`.Engine` object

        :param opts: dictionary of options that were passed to the
         :meth:`.Connection.execution_options` method.

        .. versionadded:: 0.9.0

        .. seealso::

            :meth:`.ConnectionEvents.set_connection_execution_options` - event
            which is called when :meth:`.Connection.execution_options` is
            called.

        """
events.py 文件源码 项目:webapp 作者: superchilli 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
def engine_disposed(self, engine):
        """Intercept when the :meth:`.Engine.dispose` method is called.

        The :meth:`.Engine.dispose` method instructs the engine to
        "dispose" of it's connection pool (e.g. :class:`.Pool`), and
        replaces it with a new one.  Disposing of the old pool has the
        effect that existing checked-in connections are closed.  The new
        pool does not establish any new connections until it is first used.

        This event can be used to indicate that resources related to the
        :class:`.Engine` should also be cleaned up, keeping in mind that the
        :class:`.Engine` can still be used for new requests in which case
        it re-acquires connection resources.

        .. versionadded:: 1.0.5

        """
events.py 文件源码 项目:QualquerMerdaAPI 作者: tiagovizoto 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
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.

        """
events.py 文件源码 项目:QualquerMerdaAPI 作者: tiagovizoto 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
def set_engine_execution_options(self, engine, opts):
        """Intercept when the :meth:`.Engine.execution_options`
        method is called.

        The :meth:`.Engine.execution_options` method produces a shallow
        copy of the :class:`.Engine` which stores the new options.  That new
        :class:`.Engine` is passed here.   A particular application of this
        method is to add a :meth:`.ConnectionEvents.engine_connect` event
        handler to the given :class:`.Engine` which will perform some per-
        :class:`.Connection` task specific to these execution options.

        :param conn: The newly copied :class:`.Engine` object

        :param opts: dictionary of options that were passed to the
         :meth:`.Connection.execution_options` method.

        .. versionadded:: 0.9.0

        .. seealso::

            :meth:`.ConnectionEvents.set_connection_execution_options` - event
            which is called when :meth:`.Connection.execution_options` is
            called.

        """
events.py 文件源码 项目:QualquerMerdaAPI 作者: tiagovizoto 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def engine_disposed(self, engine):
        """Intercept when the :meth:`.Engine.dispose` method is called.

        The :meth:`.Engine.dispose` method instructs the engine to
        "dispose" of it's connection pool (e.g. :class:`.Pool`), and
        replaces it with a new one.  Disposing of the old pool has the
        effect that existing checked-in connections are closed.  The new
        pool does not establish any new connections until it is first used.

        This event can be used to indicate that resources related to the
        :class:`.Engine` should also be cleaned up, keeping in mind that the
        :class:`.Engine` can still be used for new requests in which case
        it re-acquires connection resources.

        .. versionadded:: 1.0.5

        """
events.py 文件源码 项目:gardenbot 作者: GoestaO 项目源码 文件源码 阅读 19 收藏 0 点赞 0 评论 0
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.

        """
events.py 文件源码 项目:gardenbot 作者: GoestaO 项目源码 文件源码 阅读 16 收藏 0 点赞 0 评论 0
def set_engine_execution_options(self, engine, opts):
        """Intercept when the :meth:`.Engine.execution_options`
        method is called.

        The :meth:`.Engine.execution_options` method produces a shallow
        copy of the :class:`.Engine` which stores the new options.  That new
        :class:`.Engine` is passed here.   A particular application of this
        method is to add a :meth:`.ConnectionEvents.engine_connect` event
        handler to the given :class:`.Engine` which will perform some per-
        :class:`.Connection` task specific to these execution options.

        :param conn: The newly copied :class:`.Engine` object

        :param opts: dictionary of options that were passed to the
         :meth:`.Connection.execution_options` method.

        .. versionadded:: 0.9.0

        .. seealso::

            :meth:`.ConnectionEvents.set_connection_execution_options` - event
            which is called when :meth:`.Connection.execution_options` is
            called.

        """
events.py 文件源码 项目:gardenbot 作者: GoestaO 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def engine_disposed(self, engine):
        """Intercept when the :meth:`.Engine.dispose` method is called.

        The :meth:`.Engine.dispose` method instructs the engine to
        "dispose" of it's connection pool (e.g. :class:`.Pool`), and
        replaces it with a new one.  Disposing of the old pool has the
        effect that existing checked-in connections are closed.  The new
        pool does not establish any new connections until it is first used.

        This event can be used to indicate that resources related to the
        :class:`.Engine` should also be cleaned up, keeping in mind that the
        :class:`.Engine` can still be used for new requests in which case
        it re-acquires connection resources.

        .. versionadded:: 1.0.5

        """
events.py 文件源码 项目:flask-zhenai-mongo-echarts 作者: Fretice 项目源码 文件源码 阅读 21 收藏 0 点赞 0 评论 0
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.

        """
events.py 文件源码 项目:flask-zhenai-mongo-echarts 作者: Fretice 项目源码 文件源码 阅读 20 收藏 0 点赞 0 评论 0
def set_engine_execution_options(self, engine, opts):
        """Intercept when the :meth:`.Engine.execution_options`
        method is called.

        The :meth:`.Engine.execution_options` method produces a shallow
        copy of the :class:`.Engine` which stores the new options.  That new
        :class:`.Engine` is passed here.   A particular application of this
        method is to add a :meth:`.ConnectionEvents.engine_connect` event
        handler to the given :class:`.Engine` which will perform some per-
        :class:`.Connection` task specific to these execution options.

        :param conn: The newly copied :class:`.Engine` object

        :param opts: dictionary of options that were passed to the
         :meth:`.Connection.execution_options` method.

        .. versionadded:: 0.9.0

        .. seealso::

            :meth:`.ConnectionEvents.set_connection_execution_options` - event
            which is called when :meth:`.Connection.execution_options` is
            called.

        """
events.py 文件源码 项目:flask-zhenai-mongo-echarts 作者: Fretice 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
def engine_disposed(self, engine):
        """Intercept when the :meth:`.Engine.dispose` method is called.

        The :meth:`.Engine.dispose` method instructs the engine to
        "dispose" of it's connection pool (e.g. :class:`.Pool`), and
        replaces it with a new one.  Disposing of the old pool has the
        effect that existing checked-in connections are closed.  The new
        pool does not establish any new connections until it is first used.

        This event can be used to indicate that resources related to the
        :class:`.Engine` should also be cleaned up, keeping in mind that the
        :class:`.Engine` can still be used for new requests in which case
        it re-acquires connection resources.

        .. versionadded:: 1.0.5

        """
events.py 文件源码 项目:Data-visualization 作者: insta-code1 项目源码 文件源码 阅读 23 收藏 0 点赞 0 评论 0
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.

        """
events.py 文件源码 项目:Data-visualization 作者: insta-code1 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def set_engine_execution_options(self, engine, opts):
        """Intercept when the :meth:`.Engine.execution_options`
        method is called.

        The :meth:`.Engine.execution_options` method produces a shallow
        copy of the :class:`.Engine` which stores the new options.  That new
        :class:`.Engine` is passed here.   A particular application of this
        method is to add a :meth:`.ConnectionEvents.engine_connect` event
        handler to the given :class:`.Engine` which will perform some per-
        :class:`.Connection` task specific to these execution options.

        :param conn: The newly copied :class:`.Engine` object

        :param opts: dictionary of options that were passed to the
         :meth:`.Connection.execution_options` method.

        .. versionadded:: 0.9.0

        .. seealso::

            :meth:`.ConnectionEvents.set_connection_execution_options` - event
            which is called when :meth:`.Connection.execution_options` is
            called.

        """
events.py 文件源码 项目:Data-visualization 作者: insta-code1 项目源码 文件源码 阅读 16 收藏 0 点赞 0 评论 0
def engine_disposed(self, engine):
        """Intercept when the :meth:`.Engine.dispose` method is called.

        The :meth:`.Engine.dispose` method instructs the engine to
        "dispose" of it's connection pool (e.g. :class:`.Pool`), and
        replaces it with a new one.  Disposing of the old pool has the
        effect that existing checked-in connections are closed.  The new
        pool does not establish any new connections until it is first used.

        This event can be used to indicate that resources related to the
        :class:`.Engine` should also be cleaned up, keeping in mind that the
        :class:`.Engine` can still be used for new requests in which case
        it re-acquires connection resources.

        .. versionadded:: 1.0.5

        """
events.py 文件源码 项目:micro-blog 作者: nickChenyx 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
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.

        """
events.py 文件源码 项目:micro-blog 作者: nickChenyx 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def set_engine_execution_options(self, engine, opts):
        """Intercept when the :meth:`.Engine.execution_options`
        method is called.

        The :meth:`.Engine.execution_options` method produces a shallow
        copy of the :class:`.Engine` which stores the new options.  That new
        :class:`.Engine` is passed here.   A particular application of this
        method is to add a :meth:`.ConnectionEvents.engine_connect` event
        handler to the given :class:`.Engine` which will perform some per-
        :class:`.Connection` task specific to these execution options.

        :param conn: The newly copied :class:`.Engine` object

        :param opts: dictionary of options that were passed to the
         :meth:`.Connection.execution_options` method.

        .. versionadded:: 0.9.0

        .. seealso::

            :meth:`.ConnectionEvents.set_connection_execution_options` - event
            which is called when :meth:`.Connection.execution_options` is
            called.

        """
events.py 文件源码 项目:micro-blog 作者: nickChenyx 项目源码 文件源码 阅读 18 收藏 0 点赞 0 评论 0
def engine_disposed(self, engine):
        """Intercept when the :meth:`.Engine.dispose` method is called.

        The :meth:`.Engine.dispose` method instructs the engine to
        "dispose" of it's connection pool (e.g. :class:`.Pool`), and
        replaces it with a new one.  Disposing of the old pool has the
        effect that existing checked-in connections are closed.  The new
        pool does not establish any new connections until it is first used.

        This event can be used to indicate that resources related to the
        :class:`.Engine` should also be cleaned up, keeping in mind that the
        :class:`.Engine` can still be used for new requests in which case
        it re-acquires connection resources.

        .. versionadded:: 1.0.5

        """


问题


面经


文章

微信
公众号

扫码关注公众号