sqlite3-ruby icon indicating copy to clipboard operation
sqlite3-ruby copied to clipboard

Why does Database#transaction always return true?

Open steveg-h opened this issue 12 years ago • 0 comments

Database#transaction always return true.

This doesn't strike me as very helpful behaviour - it doesn't allow you to simply pull the result of the last SQL statement executed in the transaction as the result of the transaction

I have suggest the following modification (which I have submitted in a pull request) Database#transaction should return

  • the return value of the block (if not nil)
  • otherwise true if transaction committed

I will submit a patch against this issue :-)

steveg-h avatar Nov 21 '13 13:11 steveg-h