Re: [SQLObject] mysql connection losses
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: David W. <da...@su...> - 2004-03-18 09:31:06
|
Ian, > It would be easy to add *if* there's an interface to do this with the > database driver. If there was, DBAPIConnection.getConnection() could > ping the database before returning the connection. Looking at the db api spec and DBAPIConnection I wonder what would happen if we called rollback again in the getConnection. In theory there cannot be a transaction in progress as release connection will have already done a commit or rollback. So what is the effect of calling rollback, rollback on a connection? I guess we might get an exception which is easy to cope with, but will it do enough for us to know if the connection is valid? Otherwise it will need to do it in the db specific classes eg for mysql there is conn.ping() for mysql see http://www.esrf.fr/computing/bliss/python2/MySQL/MySQLdb-2.html Regards Dave -- David Warnock, Sundayta Ltd. http://www.sundayta.com iDocSys for Document Management. VisibleResults for Fundraising. Development and Hosting of Web Applications and Sites. |