transaction(read_only = false)
Instance Public methods
Opens a new transaction for the data store. Code executed inside a block passed to this method may read and write data to and from the data store file.
At the end of the block, changes are committed to the data store automatically. You may exit the transaction early with a call to either #commit or #abort. See those methods for details about how changes are handled. Raising an uncaught Exception in the block is equivalent to calling #abort.
If read_only is set to true
, you will only be allowed
to read from the data store during the transaction and any attempts to
change the data will raise a PStore::Error.
Note that PStore does not support nested transactions.
Please login to continue.