At the moment, Daobab supports transaction for DataBaseTarget only. Any other targets doesn't support transactions yet.
The simplest usage
Method execute() surrounds operation into internal transaction. This process is automated.
Daobab opens before and close transaction after each modification (insert, update, modify) is being called.
Inserting a single Category record:
Wrapping more operations
It's possible to execute more operations into a single transaction, with transaction wrapper.
Method wrapTransaction exposes t as a OpenTransactionTarget based on db target:
Above two examples covers the majority of cases.
However if you want commit or rollback transaction on your terms, you may do this as well.
DataBaseTarget provides a beginTransaction() method, which produces another one target references, which extends the current one with opened transaction.
You have to relate your queries to the transaction target, if you want to wrap the operations into his transaction scope.