Class: Libsql::Connection
- Inherits:
-
Object
- Object
- Libsql::Connection
- Defined in:
- lib/libsql/connection.rb
Instance Method Summary collapse
Instance Method Details
#transaction ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/libsql/connection.rb', line 5 def transaction execute("BEGIN") result = yield self execute("COMMIT") result rescue Exception # rubocop:disable Lint/RescueException execute("ROLLBACK") raise end |