The DBConnection class is accessible via the sqlobject.dbconnection module.
This is called for each new class; we use this opportunity to create an instance method that is bound to the class and this connection.
See the source for more information.