Returns whether a multi-document transaction is in progress

# MongoDB\Driver\Session::isInTransaction

(mongodb >=1.6.0)

MongoDB\Driver\Session::isInTransaction — Returns whether a multi-document transaction is in progress

### Beschreibung

final public function MongoDB\Driver\Session::isInTransaction(): bool

Returns whether a multi-document transaction is currently in progress for this session. A transaction is considered "in progress" if it has been started but has not been committed or aborted.

### Parameter-Liste

Diese Funktion besitzt keine Parameter.

### Rückgabewerte

Returns `true` if a transaction is currently in progress for this session, and `false` otherwise.

### Fehler/Exceptions

- Wirft eine MongoDB\Driver\Exception\InvalidArgumentException, wenn beim Analysieren von Argumenten ein Fehler auftritt.

### Siehe auch

- MongoDB\Driver\Session::getTransactionState() - Returns the current transaction state for this session

`↑` and `↓` to navigate • `Enter` to select • `Esc` to close • `/` to open