<?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_database_get_collection">


  <info>
    <link type="guide" xref="mongoc_database_t" group="function"/>
  </info>
  <title>mongoc_database_get_collection()</title>

  <section id="synopsis">
    <title>Synopsis</title>
    <synopsis><code mime="text/x-csrc"><![CDATA[mongoc_collection_t *
mongoc_database_get_collection (mongoc_database_t *database,
                                const char        *name);
]]></code></synopsis>
    <p>Allocates a new <code xref="mongoc_collection_t">mongoc_collection_t</code> structure for the collection named <code>name</code> in <code>database</code>.</p>
  </section>

  <section id="return">
    <title>Returns</title>
    <p>A newly allocated <code xref="mongoc_collection_t">mongoc_collection_t</code> that should be freed with <code xref="mongoc_collection_destroy">mongoc_collection_destroy()</code>.</p>
  </section>

</page>
