Skip to content

Commit

Permalink
mongoc_collection files
Browse files Browse the repository at this point in the history
  • Loading branch information
norareidy committed Mar 27, 2024
1 parent 59d1e7a commit 8c49627
Show file tree
Hide file tree
Showing 95 changed files with 1,561 additions and 1,225 deletions.
4 changes: 0 additions & 4 deletions source/docs-libmongoc/api/errors.txt
Original file line number Diff line number Diff line change
Expand Up @@ -228,12 +228,8 @@ In some cases your application must make decisions based on what category of err
but these categories do not correspond perfectly to an error domain or code. In such cases, error *labels*
provide a reliable way to determine how your application should respond to an error.

<<<<<<< HEAD
Any C Driver function that has a :ref:`bson_t` out-parameter named ``reply`` may include error labels
to the reply, in the form of a BSON field named "errorLabels" containing an array of strings:
=======
Any C Driver function that has a :ref:`bson_t` out-parameter named ``reply`` may include error labels to the reply, in the form of a BSON field named "errorLabels" containing an array of strings:
>>>>>>> upstream/master

.. code-block:: none

Expand Down
2 changes: 1 addition & 1 deletion source/docs-libmongoc/api/init-cleanup.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Initialization and cleanup
Synopsis
--------

.. include:: includes/init_cleanup.txt
.. include:: ../includes/init_cleanup.txt

.. toctree::
:titlesonly:
Expand Down
2 changes: 1 addition & 1 deletion source/docs-libmongoc/api/init-cleanup/mongoc_cleanup.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ Synopsis
Description
-----------

.. include:: includes/init_cleanup.txt
.. include:: ../includes/init_cleanup.txt
2 changes: 1 addition & 1 deletion source/docs-libmongoc/api/init-cleanup/mongoc_init.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ Synopsis
Description
-----------

.. include:: includes/init_cleanup.txt
.. include:: ../includes/init_cleanup.txt
2 changes: 1 addition & 1 deletion source/docs-libmongoc/api/lifecycle.rst
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ A :ref:`mongoc_stream_t` may be created from the :ref:`mongoc_gridfs_bucket_t`.
Sessions
--------

.. include:: includes/session-lifecycle.txt
.. include:: ../includes/session-lifecycle.txt

Client Side Encryption
----------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Parameters
- ``document``: A :ref:`bson_t`.
- ``error``: An optional location for a :ref:`bson_error_t <mongoc_errors>` or ``NULL``.

.. include:: includes/bulk-insert-opts.txt
.. include:: ../includes/bulk-insert-opts.txt

Errors
------
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.. _mongoc_change_stream_error_document
.. _mongoc_change_stream_error_document:

=====================================
mongoc_change_stream_error_document()
=====================================

Expand All @@ -8,10 +9,10 @@ Synopsis

.. code-block:: c

bool
mongoc_change_stream_error_document (mongoc_change_stream_t *stream,
bson_error_t *err,
const bson_t **reply);
bool
mongoc_change_stream_error_document (mongoc_change_stream_t *stream,
bson_error_t *err,
const bson_t **reply);

Checks if an error has occurred when creating or iterating over a change stream.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ Synopsis

.. code-block:: c

const bson_t *
mongoc_change_stream_get_resume_token (mongoc_change_stream_t *stream);
const bson_t *
mongoc_change_stream_get_resume_token (mongoc_change_stream_t *stream);

This function returns the cached resume token, which may be passed as either the
``resumeAfter`` or ``startAfter`` option of a ``watch`` function to start a new
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.. _mongoc_change_stream_next
.. _mongoc_change_stream_next:

===========================
mongoc_change_stream_next()
===========================

Expand All @@ -8,9 +9,9 @@ Synopsis

.. code-block:: c

bool
mongoc_change_stream_next (mongoc_change_stream_t *stream,
const bson_t **bson);
bool
mongoc_change_stream_next (mongoc_change_stream_t *stream,
const bson_t **bson);

This function iterates the underlying cursor, setting ``bson`` to the next
document. This will block for a maximum of ``maxAwaitTimeMS`` milliseconds as
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ Parameters
- ``client_encryption``: A :ref:`mongoc_client_encryption_t`.
- ``keyid``: A UUID (BSON binary subtype 0x04) key ID of the key to add the key alternate name to.
- ``keyaltname``: The key alternate name to add.
- ``key_doc``: Optional. An uninitialized :ref:`bson_t` set to the value of the key document before addition of the alternate name, or an empty document if the key does not exist. Must be freed by :ref:`bson_destroy`.
- ``key_doc``: Optional. An uninitialized :ref:`bson_t` set to the value of the key document before
addition of the alternate name, or an empty document if the key does not exist. Must be freed by
:ref:`bson_destroy`.
- ``error``: Optional. :ref:`bson_error_t`.

Returns
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,18 @@ automatic encryption (see :ref:`mongoc_client_enable_auto_encryption` and
The created key document is inserted into the key vault collection (identified via
:ref:`mongoc_client_encryption_opts_set_keyvault_namespace`) with majority write concern.

``keyid`` is always initialized (even on error). Caller must call :ref:`bson_value_destroy()` on ``keyid`` to free.
``keyid`` is always initialized (even on error). Caller must call :ref:`bson_value_destroy`
on ``keyid`` to free.

Parameters
----------

- ``client_encryption``: A :ref:`mongoc_client_encryption_t`.
- ``kms_provider``: A string identifying the Key Management Service (KMS) provider used to encrypt the datakey (e.g. "aws" or "local").
- ``kms_provider``: A string identifying the Key Management Service (KMS) provider used to encrypt
the datakey (e.g. "aws" or "local").
- ``opts``: A :ref:`mongoc_client_encryption_datakey_opts_t`
- ``keyid``: Optional. An uninitialized :ref:`bson_value_t` set to the UUID (BSON binary subtype 0x04) of the newly created key. Must be freed by :ref:`bson_value_destroy`.
- ``keyid``: Optional. An uninitialized :ref:`bson_value_t` set to the UUID (BSON binary subtype 0x04)
of the newly created key. Must be freed by :ref:`bson_value_destroy`.
- ``error``: Optional. A :ref:`bson_error_t`.

Returns
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ Synopsis
mongoc_client_encryption_datakey_opts_set_masterkey (
mongoc_client_encryption_datakey_opts_t *opts, const bson_t *masterkey);

Identifies the masterkey for the Key Management Service (KMS) provider used to encrypt a new data key.
Identifies the masterkey for the Key Management Service (KMS) provider used to encrypt
a new data key.

Parameters
----------
Expand All @@ -24,7 +25,8 @@ Parameters
Description
-----------

Setting the masterkey is required when creating a data key with the KMS provider types: ``aws``, ``azure``, ``gcp``, and ``kmip``.
Setting the masterkey is required when creating a data key with the KMS provider types:
``aws``, ``azure``, ``gcp``, and ``kmip``.

Setting the masterkey is prohibited with the KMS provider type ``local``.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ Synopsis
Returns
-------

A new :ref:`mongoc_client_encryption_encrypt_opts_t` that must be freed with :ref:`mongoc_client_encryption_encrypt_opts_destroy`.
A new :ref:`mongoc_client_encryption_encrypt_opts_t` that must be freed with
:ref:`mongoc_client_encryption_encrypt_opts_destroy`.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Synopsis
The {+range-is-experimental+} {+api-is-experimental+}

Sets the minimum value of the range for explicit encryption.
Only applies when the algorithm set by :ref:`mongoc_client_encryption_encrypt_opts_set_algorithm()` is "RangePreview".
Only applies when the algorithm set by :ref:`mongoc_client_encryption_encrypt_opts_set_algorithm` is "RangePreview".
It is an error to set minimum when algorithm is not "RangePreview".

The minimum must match the value set in the encryptedFields of the destination collection.
Expand Down
2 changes: 1 addition & 1 deletion source/docs-libmongoc/api/mongoc_client_session_t.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Use a session for a sequence of operations, optionally with causal consistency.
Synopsis
--------

.. include:: includes/session-lifecycle.txt
.. include:: ../includes/session-lifecycle.txt

Fork Safety
-----------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ On error, returns NULL and sets ``error``.
Errors
------

This function can fail if the driver is not built with crypto support, if ``opts`` is misconfigured, or if the session is configured with options that the server does not support.
This function can fail if the driver is not built with crypto support, if ``opts`` is
misconfigured, or if the session is configured with options that the server does not support.

.. include:: includes/seealso/session.txt

This file was deleted.

Loading

0 comments on commit 8c49627

Please sign in to comment.