<?xml version="1.0"?>
<page xmlns="http://projectmallard.org/1.0/"
      type="topic"
      style="function"
      xmlns:api="http://projectmallard.org/experimental/api/"
      xmlns:ui="http://projectmallard.org/experimental/ui/"
      id="mongoc_client_set_read_concern">
  <info>
    <link type="guide" xref="mongoc_client_t" group="function"/>
  </info>
  <title>mongoc_client_set_read_concern()</title>

  <section id="synopsis">
    <title>Synopsis</title>
    <synopsis><code mime="text/x-csrc"><![CDATA[void
mongoc_client_set_read_concern (mongoc_client_t              *client,
                                const mongoc_read_concern_t  *read_concern);]]></code></synopsis>
    <p>Sets the read concern for the client. This only affects future operations, collections, and databases inheriting from <code>client</code>.</p>
    <p>The default read concern is MONGOC_READ_CONCERN_LEVEL_LOCAL. This is the correct read concern for the great majority of applications.</p>
    <p>It is a programming error to call this function on a client from a <code xref="mongoc_client_pool_t">mongoc_client_pool_t</code>. For pooled clients, set the read concern with the <link xref="mongoc_uri_t#read-concern-options">MongoDB URI</link> instead.</p>
  </section>

  <section id="parameters">
    <title>Parameters</title>
    <table>
      <tr><td><p>client</p></td><td><p>A <code xref="mongoc_client_t">mongoc_client_t</code>.</p></td></tr>
      <tr><td><p>read_concern</p></td><td><p>A <code xref="mongoc_read_concern_t">mongoc_read_concern_t</code>.</p></td></tr>
    </table>
  </section>

</page>
