Note: transactions should by supported by with (yield from connection) statement if possible, raise error otherwise.