Logo Search packages:      
Sourcecode: sqlalchemy version File versions  Download package

def sqlalchemy::pool::_ConnectionFairy::detach (   self  ) 

Separate this connection from its Pool.

This means that the connection will no longer be returned to the
pool when closed, and will instead be literally closed.  The
containing ConnectionRecord is separated from the DB-API connection,
and will create a new connection when next used.

Note that any overall connection limiting constraints imposed by a
Pool implementation may be violated after a detach, as the detached
connection is removed from the pool's knowledge and control.

Definition at line 403 of file pool.py.

00403                     :
        """Separate this connection from its Pool.

        This means that the connection will no longer be returned to the
        pool when closed, and will instead be literally closed.  The
        containing ConnectionRecord is separated from the DB-API connection,
        and will create a new connection when next used.

        Note that any overall connection limiting constraints imposed by a
        Pool implementation may be violated after a detach, as the detached
        connection is removed from the pool's knowledge and control.
        """

        if self._connection_record is not None:
            _refs.remove(self._connection_record)
            self._connection_record.fairy = None
            self._connection_record.connection = None
            self._pool.do_return_conn(self._connection_record)
            self._detached_info = \
              self._connection_record.info.copy()
            self._connection_record = None

    def close(self):


Generated by  Doxygen 1.6.0   Back to index