---
name: "mongoc_bulkwrite_updateoneopts_set_sort"
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_bulkwrite_updateoneopts_set_sort"
---

# mongoc\_bulkwrite\_updateoneopts\_set\_sort(3)

## SYNOPSIS

```
void
mongoc_bulkwrite_updateoneopts_set_sort (mongoc_bulkwrite_updateoneopts_t *self, bson_t* sort);
```

## DESCRIPTION

**sort** specifies a sorting order if the query matches multiple documents. The first document matched by the sort order will be updated. This option is only sent if the caller explicitly provides a value.

## AUTHOR

MongoDB, Inc

## COPYRIGHT

2009-present, MongoDB, Inc.
