Runs body and returns its result with every query it ran, in this
zone (nested calls each see their own queries): for tests that assert
eager loading removed an N+1.
The active transaction executor of the current zone, or the connection.
While anything listens (listeners, captures, duration handlers) it is
wrapped to report each query.
A separate manager whose only (and default) connection is connection
under name, with this manager's registered drivers: for tools that
reach a database outside the configuration (dartisan db:transfer).
Close it with closeAll.
Payloads sent with notify on channel, when the connection delivers
notifications (PostgreSQL's LISTEN); null otherwise, so callers
poll instead. The stream holds a connection of its own until its
listener cancels.
Wakes the notifications listeners of channel, on every machine
connected to the database (PostgreSQL's NOTIFY; inside a transaction
it is sent at commit). Nothing on databases without notifications.
Runs body in a transaction that is always rolled back (Laravel
RefreshDatabase). Application transactions inside become savepoints
and their after-commit callbacks fire when they "commit", as they
would without the wrapper.
Runs body in a transaction on connection (default when null).
Nested calls create a savepoint that is released or rolled back with
the nested callback. With attempts > 1, deadlocks and serialization
failures retry the whole transaction, after a short random wait.
Calls handler once the queries of the current request, job or
command have taken more than threshold in total (Laravel's
DB::whenQueryingForLongerThan), once per scope.
The next wait of a retry, decorrelated jitter: anywhere from the base
to three times previous. Fifty isolates that collided do not collide
again on the same microsecond.