---
name: "mongoc_transaction_state_t"
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_transaction_state_t"
---

# mongoc\_transaction\_state\_t(3)

Constants for transaction states

## SYNOPSIS

```
typedef enum {
  MONGOC_TRANSACTION_NONE = 0,
  MONGOC_TRANSACTION_STARTING = 1,
  MONGOC_TRANSACTION_IN_PROGRESS = 2,
  MONGOC_TRANSACTION_COMMITTED = 3,
  MONGOC_TRANSACTION_ABORTED = 4,
} mongoc_transaction_state_t;
```

## DESCRIPTION

These constants describe the current transaction state of a session.

## FLAG VALUES

| | |
| --- | --- |
| MONGOC\_TRANSACTION\_NONE | There is no transaction in progress. |
| MONGOC\_TRANSACTION\_STARTING | A transaction has been started, but no operation has been sent to the server. |
| MONGOC\_TRANSACTION\_IN\_PROGRESS | A transaction is in progress. |
| MONGOC\_TRANSACTION\_COMMITTED | The transaction was committed. |
| MONGOC\_TRANSACTION\_ABORTED | The transaction was aborted. |

## AUTHOR

MongoDB, Inc

## COPYRIGHT

2009-present, MongoDB, Inc.
