This class is used by
return a pooled connection instance. It is also the class used for
connections obtained with calls to the
connect() method that name a connection pool
(see Section 22.214.171.124, “Connector/Python Connection Pooling”).
PooledMySQLConnection pooled connection objects
are similar to
connection objects, with these differences:
To release a pooled connection obtained from a connection
pool, invoke its
close() method, just as
for any unpooled connection. However, for a pooled connection,
close() does not actually close the
connection but returns it to the pool and makes it available
for subsequent connection requests.
A pooled connection cannot be reconfigured using its
config() method. Connection changes must be
done through the pool object itself, as described shortly.
A pooled connection has a
property that returns the pool name.
This constructor takes connection pool and connection arguments
and returns a pooled connection. It is used by the
pcnx = mysql.connector.pooling.PooledMySQLConnection(cnxpool, cnx)
Returns a pooled connection to its connection pool.
For a pooled connection,
close() does not
actually close it but returns it to the pool and makes it
available for subsequent connection requests.
If the pool configuration parameters are changed, a returned connection is closed and reopened with the new configuration before being returned from the pool again in response to a connection request.
For pooled connections, the
PoolError exception. Configuration
for pooled connections should be done using the pool object.