jinzhu/gorm — pull request #77 by tstranex (2014-03-16 16:38:48+00:00)
Title: Add DB.Tx() method to provide access to the underlying sql.Tx instance.

Hi

We have a lot of existing code that uses sql.DB and sql.Tx arguments. Sometimes it's necessary to for our new GORM code to interface with the old code. Calling DB.DB() is useful for this, but it doesn't work inside transactions. Inside transactions, it's more useful to access a sql.Tx instance instead. I've added a new DB.Tx() method to return the underlying sql.Tx instance. I think this will be useful for anyone who is migrating to GORM from existing database/sql code.

Regards,
Timothy