to_dbal_transaction
Definition
/**
* Write every child within database transactions.
* Each batch of rows is written in its own transaction; rows a branch's Transformation delivers when
* the run ends (blocking operations drain there) are committed in one final transaction.
* If any write fails, the open transaction is rolled back.
* A plain Loader child is written directly; a to_transformation(...) child delivers inside the same
* transaction. Every child's loader must use the same connection as the transaction: pass one live
* Connection to both - a loader built from array params opens its own connection and escapes the
* transaction.
*
* @param array<string, mixed>|Connection $connection
* @param Loader|Branch ...$writes - written within the transaction
*
* @throws InvalidArgumentException
*/
to_dbal_transaction(Connection|array $connection, Loader|Branch $writes) : Transactional