<?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 <link xref="mongoc_collection_t">mongoc_collection_t</link> structure for the collection named <code>name</code> in <code>database</code>.</p>
  </section>

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

</page>
