--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: self
comment: 
- !ruby/struct:SM::Flow::P 
  body: Begins a new transaction. Note that nested transactions are not allowed by SQLite, so attempting to nest a transaction will result in a runtime exception.
- !ruby/struct:SM::Flow::P 
  body: The <tt>mode</tt> parameter may be either <tt>:deferred</tt> (the default), <tt>:immediate</tt>, or <tt>:exclusive</tt>.
- !ruby/struct:SM::Flow::P 
  body: "If a block is given, the database instance is yielded to it, and the transaction is committed when the block terminates. If the block raises an exception, a rollback will be performed instead. Note that if a block is given, #commit and #rollback should never be called explicitly or you'll get an error when the block terminates."
- !ruby/struct:SM::Flow::P 
  body: "If a block is not given, it is the caller's responsibility to end the transaction explicitly, either by calling #commit, or by calling #rollback."
full_name: SQLite3::Database#transaction
is_singleton: false
name: transaction
params: ( mode = :deferred ) {|self| ...}
visibility: public
