Availability:built-in
[nondet]current_transaction(-Goal)True when called inside a transaction running Goal. This
predicate generates candidates from the current (nested) transaction
outward.
Goal is a plain goal if the calling context module is the
same as matching transaction/1
or snapshot/1
and a qualified callable term otherwise. Note that this only enumerates
transactions in the current thread.
- Introduced in 8.3.4 (👉5716ac3) current_transaction/1 to test whether a goal is running inside a transaction.