execute
Runs block on a session, and gives that session back when it returns.
Inside a transaction on this thread the session is the transaction's and the work joins it, committing or rolling back with it. Outside one, the session is borrowed for this call alone and its statements commit as they go, exactly as auto-commit statements do.
Return
Whatever block produced.
Parameters
block
The work to run against the session.