---
name: "mongoc_collection_get_write_concern"
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_collection_get_write_concern"
---

# mongoc\_collection\_get\_write\_concern(3)

## SYNOPSIS

```
const mongoc_write_concern_t *
mongoc_collection_get_write_concern (const mongoc_collection_t *collection);
```

## PARAMETERS

- •

  **collection**: A *mongoc\_collection\_t*.

## DESCRIPTION

Fetches the default write concern to be used on write operations originating from **collection** and not specifying a write concern.

## RETURNS

A *mongoc\_write\_concern\_t* that should not be modified or freed.

## AUTHOR

MongoDB, Inc

## COPYRIGHT

2009-present, MongoDB, Inc.
