objects should respond to the following
Closes the connection now (rather than whenever
_ is called). The connection is unusable from this point
Error (or subclass) exception is
raised if any operation is attempted with the connection. The same
applies to all cursor objects trying to use the connection.
Commits any pending transaction to the database. Note that if the database supports an auto-commit feature, this must be initially off. An interface method may be provided to turn it back on.
Database modules that don’t support transactions should implement this method with void functionality.
This method is optional since not all databases provide transaction support.Note 3
In case a database does provide transactions, this method causes the database to roll back to the start of any pending transaction. Closing a connection without committing the changes first causes an implicit rollback to be performed.
Returns a new
Cursor object using the connection.
If the database doesn’t provide a direct cursor concept, the
module has to emulate cursors using other means to the extent needed
by this specification.Note 4