---
name: "mongoc_client_session_in_transaction"
section: "3"
platform: "linux"
package: "libmongoc-doc"
version: "1.30.4-1+deb13u3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/mongoc_client_session_in_transaction"
---

# mongoc\_client\_session\_in\_transaction(3)

## SYNOPSIS

```
bool
mongoc_client_session_in_transaction (const mongoc_client_session_t *session);
```

Check whether a multi-document transaction is in progress for this session.

## PARAMETERS

- •

  **session**: A *mongoc\_client\_session\_t*.

## RETURN

Returns true if a transaction was started and has not been committed or aborted, otherwise **false**.

## AUTHOR

MongoDB, Inc

## COPYRIGHT

2009-present, MongoDB, Inc.
