---
name: "mongoc_write_concern_append"
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_write_concern_append"
---

# mongoc\_write\_concern\_append(3)

## SYNOPSIS

```
bool
mongoc_write_concern_append (mongoc_write_concern_t *write_concern,
                             bson_t *command);
```

## PARAMETERS

- •

  **write\_concern**: A pointer to a *mongoc\_write\_concern\_t*.

- •

  **command**: A pointer to a *bson\_t*.

## DESCRIPTION

This function appends a write concern to command options. It is useful for appending a write concern to command options before passing them to *mongoc\_client\_write\_command\_with\_opts()* or a related function that takes an options document.

## RETURNS

Returns true on success. If any arguments are invalid, returns false and logs an error.

## EXAMPLE

See the example code for *mongoc\_client\_write\_command\_with\_opts()*.

## AUTHOR

MongoDB, Inc

## COPYRIGHT

2009-present, MongoDB, Inc.
