transaction
Runs block inside a transaction, committing when it returns and rolling back when it throws.
Every execute made from this thread while block runs lands on the transaction's session, so a repository function called from in here joins the transaction without being told about it. That binding is per-thread and does not follow work handed to another one: a coroutine launched on a different dispatcher inside block gets a session and a transaction of its own, and the commit here says nothing about it.
The receiver is this client, so queries inside read exactly as they do outside. What it does not offer is a way to commit or roll back: the surrounding block is what decides, and a session reached through execute is an OctaviusSessionOperations rather than the full session for the same reason.
Return
Whatever block produced.
Parameters
What to do about a transaction already running on this thread.
The isolation level to run at, or null for the server's. Ignored when joining a transaction that is already running, which cannot change the level it began at.
Whether the transaction refuses writes. Ignored on the same terms as isolation.
Aborts any single statement running longer than this.
Aborts the transaction once it has been open longer than this.
The work to run in the transaction.