diff --git a/source/libmongoc/api/mongoc_client_encryption_t/mongoc_client_encryption_opts_set_tls_opts.txt b/source/libmongoc/api/mongoc_client_encryption_t/mongoc_client_encryption_opts_set_tls_opts.txt index feaf60a9..29577dfd 100644 --- a/source/libmongoc/api/mongoc_client_encryption_t/mongoc_client_encryption_opts_set_tls_opts.txt +++ b/source/libmongoc/api/mongoc_client_encryption_t/mongoc_client_encryption_opts_set_tls_opts.txt @@ -51,7 +51,7 @@ The BSON document for TLS options may contain the following keys: :end-before: END:mongoc_client_encryption_opts_set_tls_opts :dedent: 6 -See :ref:`configuring_tls` for a description of the behavior of these options. +See :ref:`mongoc_configuring_tls` for a description of the behavior of these options. .. seealso:: diff --git a/source/libmongoc/api/mongoc_collection_t/mongoc_collection_drop_with_opts.txt b/source/libmongoc/api/mongoc_collection_t/mongoc_collection_drop_with_opts.txt index fb414b1c..190ded8f 100644 --- a/source/libmongoc/api/mongoc_collection_t/mongoc_collection_drop_with_opts.txt +++ b/source/libmongoc/api/mongoc_collection_t/mongoc_collection_drop_with_opts.txt @@ -66,7 +66,7 @@ MONGOC_ERROR_QUERY_FAILURE; in this case check whether the error message is equa the string "ns not found". The ``encryptedFields`` document in ``opts`` may be used to drop a collection for -:ref:`Queryable Encryption `. If ``encryptedFields`` is specified, +:ref:`Queryable Encryption `. If ``encryptedFields`` is specified, the "ns not found" error is not returned. Errors diff --git a/source/libmongoc/api/mongoc_collection_t/mongoc_collection_write_command_with_opts.txt b/source/libmongoc/api/mongoc_collection_t/mongoc_collection_write_command_with_opts.txt index a2321f2b..1159ddd2 100644 --- a/source/libmongoc/api/mongoc_collection_t/mongoc_collection_write_command_with_opts.txt +++ b/source/libmongoc/api/mongoc_collection_t/mongoc_collection_write_command_with_opts.txt @@ -58,7 +58,7 @@ Do not use this function to call the basic write commands "insert", "update", an Those commands require special logic not implemented in ``mongoc_collection_write_command_with_opts``. For basic write operations use CRUD functions such as :ref:`mongoc_collection_insert_one` and the others described in :ref:`the CRUD tutorial `, or use the -:ref:`Bulk API `. +:ref:`Bulk API `. Example ------- diff --git a/source/libmongoc/api/mongoc_database_t/mongoc_database_create_collection.txt b/source/libmongoc/api/mongoc_database_t/mongoc_database_create_collection.txt index 6cb657bd..008136aa 100644 --- a/source/libmongoc/api/mongoc_database_t/mongoc_database_create_collection.txt +++ b/source/libmongoc/api/mongoc_database_t/mongoc_database_create_collection.txt @@ -32,7 +32,7 @@ This function creates a :ref:`mongoc_collection_t` from the given :ref:`mongoc_d If no write concern is provided in ``opts``, the database's write concern is used. The ``encryptedFields`` document in ``opts`` may be used to create a collection used for -:ref:`Queryable Encryption `. +:ref:`Queryable Encryption `. For a list of all options, see `the MongoDB Manual entry on the create command `__. diff --git a/source/libmongoc/api/mongoc_database_t/mongoc_database_drop_with_opts.txt b/source/libmongoc/api/mongoc_database_t/mongoc_database_drop_with_opts.txt index 7c8ac3fd..5963af55 100644 --- a/source/libmongoc/api/mongoc_database_t/mongoc_database_drop_with_opts.txt +++ b/source/libmongoc/api/mongoc_database_t/mongoc_database_drop_with_opts.txt @@ -32,7 +32,7 @@ This function attempts to drop a database on the MongoDB server. If no write concern is provided in ``opts``, the database's write concern is used. The ``encryptedFields`` document in ``opts`` may be used to drop a collection used for -:ref:`Queryable Encryption `. +:ref:`Queryable Encryption `. Errors ------ diff --git a/source/libmongoc/api/mongoc_database_t/mongoc_database_read_command_with_opts.txt b/source/libmongoc/api/mongoc_database_t/mongoc_database_read_command_with_opts.txt index 38d232fc..4321344e 100644 --- a/source/libmongoc/api/mongoc_database_t/mongoc_database_read_command_with_opts.txt +++ b/source/libmongoc/api/mongoc_database_t/mongoc_database_read_command_with_opts.txt @@ -21,8 +21,6 @@ Execute a command on the server, applying logic that is specific to commands tha read, and taking the MongoDB server version into account. To send a raw command to the server without any of this logic, use :ref:`mongoc_database_command_simple`. -.. ``opts-source`` replace:: ``database`` - .. include:: /libmongoc/includes/read-cmd-opts-sources.txt ``reply`` is always initialized, and must be freed with :ref:`bson_destroy`. diff --git a/source/libmongoc/api/mongoc_gridfs_t/mongoc_gridfs_bucket_open_upload_stream.txt b/source/libmongoc/api/mongoc_gridfs_t/mongoc_gridfs_bucket_open_upload_stream.txt index fa267987..b6c4904d 100644 --- a/source/libmongoc/api/mongoc_gridfs_t/mongoc_gridfs_bucket_open_upload_stream.txt +++ b/source/libmongoc/api/mongoc_gridfs_t/mongoc_gridfs_bucket_open_upload_stream.txt @@ -26,7 +26,7 @@ Parameters - ``file_id``: A :ref:`bson_value_t` to receive the generated id of the file or ``NULL``. - ``error``: A :ref:`bson_error_t` to receive any error or ``NULL``. -.. include:: includes/gridfs-bucket-upload-opts.txt +.. include:: /libmongoc/includes/gridfs-bucket-upload-opts.txt Description ----------- diff --git a/source/libmongoc/api/mongoc_gridfs_t/mongoc_gridfs_bucket_t.txt b/source/libmongoc/api/mongoc_gridfs_t/mongoc_gridfs_bucket_t.txt index d598a80b..4ad89453 100644 --- a/source/libmongoc/api/mongoc_gridfs_t/mongoc_gridfs_bucket_t.txt +++ b/source/libmongoc/api/mongoc_gridfs_t/mongoc_gridfs_bucket_t.txt @@ -46,18 +46,18 @@ Functions :titlesonly: :maxdepth: 1 - /mongoc_gridfs_bucket_tongoc_gridfs_bucket_abort_upload - /mongoc_gridfs_bucket_tongoc_gridfs_bucket_delete_by_id - /mongoc_gridfs_bucket_tongoc_gridfs_bucket_destroy - /mongoc_gridfs_bucket_tongoc_gridfs_bucket_download_to_stream - /mongoc_gridfs_bucket_tongoc_gridfs_bucket_find - /mongoc_gridfs_bucket_tongoc_gridfs_bucket_new - /mongoc_gridfs_bucket_tongoc_gridfs_bucket_open_download_stream - /mongoc_gridfs_bucket_tongoc_gridfs_bucket_open_upload_stream - /mongoc_gridfs_bucket_tongoc_gridfs_bucket_open_upload_stream_with_id - /mongoc_gridfs_bucket_tongoc_gridfs_bucket_stream_error - /mongoc_gridfs_bucket_tongoc_gridfs_bucket_upload_from_stream - /mongoc_gridfs_bucket_tongoc_gridfs_bucket_upload_from_stream_with_id + /libmongoc/api/mongoc_gridfs_t/mongoc_gridfs_bucket_abort_upload + /libmongoc/api/mongoc_gridfs_t/mongoc_gridfs_bucket_delete_by_id + /libmongoc/api/mongoc_gridfs_t/mongoc_gridfs_bucket_destroy + /libmongoc/api/mongoc_gridfs_t/mongoc_gridfs_bucket_download_to_stream + /libmongoc/api/mongoc_gridfs_t/mongoc_gridfs_bucket_find + /libmongoc/api/mongoc_gridfs_t/mongoc_gridfs_bucket_new + /libmongoc/api/mongoc_gridfs_t/mongoc_gridfs_bucket_open_download_stream + /libmongoc/api/mongoc_gridfs_t/mongoc_gridfs_bucket_open_upload_stream + /libmongoc/api/mongoc_gridfs_t/mongoc_gridfs_bucket_open_upload_stream_with_id + /libmongoc/api/mongoc_gridfs_t/mongoc_gridfs_bucket_stream_error + /libmongoc/api/mongoc_gridfs_t/mongoc_gridfs_bucket_upload_from_stream + /libmongoc/api/mongoc_gridfs_t/mongoc_gridfs_bucket_upload_from_stream_with_id .. seealso:: diff --git a/source/libmongoc/api/mongoc_gridfs_t/mongoc_gridfs_file_list_t.txt b/source/libmongoc/api/mongoc_gridfs_t/mongoc_gridfs_file_list_t.txt index d456e404..32e69eed 100644 --- a/source/libmongoc/api/mongoc_gridfs_t/mongoc_gridfs_file_list_t.txt +++ b/source/libmongoc/api/mongoc_gridfs_t/mongoc_gridfs_file_list_t.txt @@ -45,7 +45,7 @@ Functions :titlesonly: :maxdepth: 1 - mongoc_gridfs_file_list_destroy - mongoc_gridfs_file_list_error - mongoc_gridfs_file_list_next + /libmongoc/api/mongoc_gridfs_t/mongoc_gridfs_file_list_destroy + /libmongoc/api/mongoc_gridfs_t/mongoc_gridfs_file_list_error + /libmongoc/api/mongoc_gridfs_t/mongoc_gridfs_file_list_next diff --git a/source/libmongoc/api/mongoc_gridfs_t/mongoc_gridfs_file_t.txt b/source/libmongoc/api/mongoc_gridfs_t/mongoc_gridfs_file_t.txt index b46c5149..a236d523 100644 --- a/source/libmongoc/api/mongoc_gridfs_t/mongoc_gridfs_file_t.txt +++ b/source/libmongoc/api/mongoc_gridfs_t/mongoc_gridfs_file_t.txt @@ -32,30 +32,30 @@ Functions :titlesonly: :maxdepth: 1 - mongoc_gridfs_file_destroy - mongoc_gridfs_file_error - mongoc_gridfs_file_get_aliases - mongoc_gridfs_file_get_chunk_size - mongoc_gridfs_file_get_content_type - mongoc_gridfs_file_get_filename - mongoc_gridfs_file_get_id - mongoc_gridfs_file_get_length - mongoc_gridfs_file_get_md5 - mongoc_gridfs_file_get_metadata - mongoc_gridfs_file_get_upload_date - mongoc_gridfs_file_readv - mongoc_gridfs_file_remove - mongoc_gridfs_file_save - mongoc_gridfs_file_seek - mongoc_gridfs_file_set_aliases - mongoc_gridfs_file_set_content_type - mongoc_gridfs_file_set_filename - mongoc_gridfs_file_set_id - mongoc_gridfs_file_set_md5 - mongoc_gridfs_file_set_metadata - mongoc_gridfs_file_tell - mongoc_gridfs_file_writev - mongoc_stream_gridfs_new + /libmongoc/api/mongoc_gridfs_t/mongoc_gridfs_file_destroy + /libmongoc/api/mongoc_gridfs_t/mongoc_gridfs_file_error + /libmongoc/api/mongoc_gridfs_t/mongoc_gridfs_file_get_aliases + /libmongoc/api/mongoc_gridfs_t/mongoc_gridfs_file_get_chunk_size + /libmongoc/api/mongoc_gridfs_t/mongoc_gridfs_file_get_content_type + /libmongoc/api/mongoc_gridfs_t/mongoc_gridfs_file_get_filename + /libmongoc/api/mongoc_gridfs_t/mongoc_gridfs_file_get_id + /libmongoc/api/mongoc_gridfs_t/mongoc_gridfs_file_get_length + /libmongoc/api/mongoc_gridfs_t/mongoc_gridfs_file_get_md5 + /libmongoc/api/mongoc_gridfs_t/mongoc_gridfs_file_get_metadata + /libmongoc/api/mongoc_gridfs_t/mongoc_gridfs_file_get_upload_date + /libmongoc/api/mongoc_gridfs_t/mongoc_gridfs_file_readv + /libmongoc/api/mongoc_gridfs_t/mongoc_gridfs_file_remove + /libmongoc/api/mongoc_gridfs_t/mongoc_gridfs_file_save + /libmongoc/api/mongoc_gridfs_t/mongoc_gridfs_file_seek + /libmongoc/api/mongoc_gridfs_t/mongoc_gridfs_file_set_aliases + /libmongoc/api/mongoc_gridfs_t/mongoc_gridfs_file_set_content_type + /libmongoc/api/mongoc_gridfs_t/mongoc_gridfs_file_set_filename + /libmongoc/api/mongoc_gridfs_t/mongoc_gridfs_file_set_id + /libmongoc/api/mongoc_gridfs_t/mongoc_gridfs_file_set_md5 + /libmongoc/api/mongoc_gridfs_t/mongoc_gridfs_file_set_metadata + /libmongoc/api/mongoc_gridfs_t/mongoc_gridfs_file_tell + /libmongoc/api/mongoc_gridfs_t/mongoc_gridfs_file_writev + /libmongoc/api/mongoc_gridfs_t/mongoc_stream_gridfs_new Related ------- diff --git a/source/libmongoc/api/mongoc_index_opt_t/mongoc_index_opt_geo_t.txt b/source/libmongoc/api/mongoc_index_opt_t/mongoc_index_opt_geo_t.txt index d090f2d0..62f957b8 100644 --- a/source/libmongoc/api/mongoc_index_opt_t/mongoc_index_opt_geo_t.txt +++ b/source/libmongoc/api/mongoc_index_opt_t/mongoc_index_opt_geo_t.txt @@ -32,8 +32,8 @@ Functions :titlesonly: :maxdepth: 1 - mongoc_index_opt_geo_get_default - mongoc_index_opt_geo_init + /libmongoc/api/mongoc_index_opt_t/mongoc_index_opt_geo_get_default + /libmongoc/api/mongoc_index_opt_t/mongoc_index_opt_geo_init .. seealso:: diff --git a/source/libmongoc/api/mongoc_stream_t/mongoc_stream_gridfs_new.txt b/source/libmongoc/api/mongoc_stream_t/mongoc_stream_gridfs_new.txt deleted file mode 100644 index 1bc79963..00000000 --- a/source/libmongoc/api/mongoc_stream_t/mongoc_stream_gridfs_new.txt +++ /dev/null @@ -1,35 +0,0 @@ -.. _mongoc_stream_gridfs_new: - -========================== -mongoc_stream_gridfs_new() -========================== - -Synopsis --------- - -.. code-block:: c - - mongoc_stream_t * - mongoc_stream_gridfs_new (mongoc_gridfs_file_t *file) - BSON_GNUC_WARN_UNUSED_RESULT; - -Parameters ----------- - -- ``file``: A :ref:`mongoc_gridfs_file_t`. - -This function shall create a new :ref:`mongoc_stream_t` to read from and write to a -GridFS file. GridFS files are created with :ref:`mongoc_gridfs_create_file` or -:ref:`mongoc_gridfs_create_file_from_stream`. - -This function does not transfer ownership of ``file``. Therefore, ``file`` must remain -valid for the lifetime of this stream. - -Returns -------- - -A newly allocated :ref:`mongoc_stream_t` if successful, otherwise ``NULL``. - -Note, the returned stream ignores read and write timeouts passed to :ref:`mongoc_stream_readv`, -:ref:`mongoc_stream_writev`, and so on. It uses the "socketTimeoutMS" and "connectTimeoutMS" -values from the MongoDB URI. diff --git a/source/libmongoc/includes/bulk-opts.txt b/source/libmongoc/includes/bulk-opts.txt index 36bd84a2..527ebc09 100644 --- a/source/libmongoc/includes/bulk-opts.txt +++ b/source/libmongoc/includes/bulk-opts.txt @@ -7,6 +7,6 @@ * ``writeConcern``: Construct a :ref:`mongoc_write_concern_t` and use :ref:`mongoc_write_concern_append` to add the write concern to ``opts``. See the example code for :ref:`mongoc_client_write_command_with_opts`. * ``ordered``: set to ``false`` to attempt to insert all documents, continuing after errors. -* ``sessionId``: First, construct a :ref:`mongoc_client_session_t` with :ref:`mongoc_client_start_session`. You can begin a transaction with :ref:`mongoc_client_session_start_transaction`, optionally with a :ref:`mongoc_transaction_opt_t` that overrides the options inherited from |opts-source|, and use :ref:`mongoc_client_session_append` to add the session to ``opts``. See the example code for :ref:`mongoc_client_session_t`. +* ``sessionId``: First, construct a :ref:`mongoc_client_session_t` with :ref:`mongoc_client_start_session`. You can begin a transaction with :ref:`mongoc_client_session_start_transaction`, optionally with a :ref:`mongoc_transaction_opt_t` that overrides the options inherited from ``database,`` ``collection``, or ``client``, and use :ref:`mongoc_client_session_append` to add the session to ``opts``. See the example code for :ref:`mongoc_client_session_t`. * ``let``: A BSON document consisting of any number of parameter names, each followed by definitions of constants in the MQL Aggregate Expression language. * ``comment``: A :ref:`bson_value_t` specifying the comment to attach to this command. The comment will appear in log messages, profiler output, and currentOp output. Requires MongoDB 4.4 or later. diff --git a/source/libmongoc/includes/create-index-opts.txt b/source/libmongoc/includes/create-index-opts.txt index 28072eb7..3b6a95f4 100644 --- a/source/libmongoc/includes/create-index-opts.txt +++ b/source/libmongoc/includes/create-index-opts.txt @@ -6,4 +6,4 @@ ``command_opts`` may be NULL or a BSON document with additional command options: * ``writeConcern``: Construct a :ref:`mongoc_write_concern_t` and use :ref:`mongoc_write_concern_append` to add the write concern to ``opts``. See the example code for :ref:`mongoc_client_write_command_with_opts`. -* ``sessionId``: First, construct a :ref:`mongoc_client_session_t` with :ref:`mongoc_client_start_session`. You can begin a transaction with :ref:`mongoc_client_session_start_transaction`, optionally with a :ref:`mongoc_transaction_opt_t` that overrides the options inherited from |opts-source|, and use :ref:`mongoc_client_session_append` to add the session to ``opts``. See the example code for :ref:`mongoc_client_session_t`. +* ``sessionId``: First, construct a :ref:`mongoc_client_session_t` with :ref:`mongoc_client_start_session`. You can begin a transaction with :ref:`mongoc_client_session_start_transaction`, optionally with a :ref:`mongoc_transaction_opt_t` that overrides the options inherited from ``database,`` ``collection``, or ``client``, and use :ref:`mongoc_client_session_append` to add the session to ``opts``. See the example code for :ref:`mongoc_client_session_t`. diff --git a/source/libmongoc/includes/delete-many-opts.txt b/source/libmongoc/includes/delete-many-opts.txt index ee791684..2be8c919 100644 --- a/source/libmongoc/includes/delete-many-opts.txt +++ b/source/libmongoc/includes/delete-many-opts.txt @@ -6,7 +6,7 @@ ``opts`` may be NULL or a BSON document with additional command options: * ``writeConcern``: Construct a :ref:`mongoc_write_concern_t` and use :ref:`mongoc_write_concern_append` to add the write concern to ``opts``. See the example code for :ref:`mongoc_client_write_command_with_opts`. -* ``sessionId``: First, construct a :ref:`mongoc_client_session_t` with :ref:`mongoc_client_start_session`. You can begin a transaction with :ref:`mongoc_client_session_start_transaction`, optionally with a :ref:`mongoc_transaction_opt_t` that overrides the options inherited from |opts-source|, and use :ref:`mongoc_client_session_append` to add the session to ``opts``. See the example code for :ref:`mongoc_client_session_t`. +* ``sessionId``: First, construct a :ref:`mongoc_client_session_t` with :ref:`mongoc_client_start_session`. You can begin a transaction with :ref:`mongoc_client_session_start_transaction`, optionally with a :ref:`mongoc_transaction_opt_t` that overrides the options inherited from ``database,`` ``collection``, or ``client``, and use :ref:`mongoc_client_session_append` to add the session to ``opts``. See the example code for :ref:`mongoc_client_session_t`. * ``validate``: Construct a bitwise-or of all desired :ref:`bson_validate_flags_t `. Set to ``false`` to skip client-side validation of the provided BSON documents. * ``comment``: A :ref:`bson_value_t` specifying the comment to attach to this command. The comment will appear in log messages, profiler output, and currentOp output. Requires MongoDB 4.4 or later. * ``collation``: Configure textual comparisons. See :ref:`Setting Collation Order `, and `the MongoDB Manual entry on Collation `_. Collation requires MongoDB 3.2 or later, otherwise an error is returned. diff --git a/source/libmongoc/includes/delete-one-opts.txt b/source/libmongoc/includes/delete-one-opts.txt index ee791684..1883b407 100644 --- a/source/libmongoc/includes/delete-one-opts.txt +++ b/source/libmongoc/includes/delete-one-opts.txt @@ -6,7 +6,8 @@ ``opts`` may be NULL or a BSON document with additional command options: * ``writeConcern``: Construct a :ref:`mongoc_write_concern_t` and use :ref:`mongoc_write_concern_append` to add the write concern to ``opts``. See the example code for :ref:`mongoc_client_write_command_with_opts`. -* ``sessionId``: First, construct a :ref:`mongoc_client_session_t` with :ref:`mongoc_client_start_session`. You can begin a transaction with :ref:`mongoc_client_session_start_transaction`, optionally with a :ref:`mongoc_transaction_opt_t` that overrides the options inherited from |opts-source|, and use :ref:`mongoc_client_session_append` to add the session to ``opts``. See the example code for :ref:`mongoc_client_session_t`. +* ``sessionId``: First, construct a :ref:`mongoc_client_session_t` with :ref:`mongoc_client_start_session`. You can begin a transaction with :ref:`mongoc_client_session_start_transaction`, optionally with a :ref:`mongoc_transaction_opt_t` + that overrides the options inherited from ``collection``, and use :ref:`mongoc_client_session_append` to add the session to ``opts``. See the example code for :ref:`mongoc_client_session_t`. * ``validate``: Construct a bitwise-or of all desired :ref:`bson_validate_flags_t `. Set to ``false`` to skip client-side validation of the provided BSON documents. * ``comment``: A :ref:`bson_value_t` specifying the comment to attach to this command. The comment will appear in log messages, profiler output, and currentOp output. Requires MongoDB 4.4 or later. * ``collation``: Configure textual comparisons. See :ref:`Setting Collation Order `, and `the MongoDB Manual entry on Collation `_. Collation requires MongoDB 3.2 or later, otherwise an error is returned. diff --git a/source/libmongoc/includes/find-and-modify-appended-opts.txt b/source/libmongoc/includes/find-and-modify-appended-opts.txt index cb651ece..11608f53 100644 --- a/source/libmongoc/includes/find-and-modify-appended-opts.txt +++ b/source/libmongoc/includes/find-and-modify-appended-opts.txt @@ -6,7 +6,7 @@ ``extra`` may be NULL or a BSON document with additional command options: * ``writeConcern``: Construct a :ref:`mongoc_write_concern_t` and use :ref:`mongoc_write_concern_append` to add the write concern to ``opts``. See the example code for :ref:`mongoc_client_write_command_with_opts`. -* ``sessionId``: First, construct a :ref:`mongoc_client_session_t` with :ref:`mongoc_client_start_session`. You can begin a transaction with :ref:`mongoc_client_session_start_transaction`, optionally with a :ref:`mongoc_transaction_opt_t` that overrides the options inherited from |opts-source|, and use :ref:`mongoc_client_session_append` to add the session to ``opts``. See the example code for :ref:`mongoc_client_session_t`. +* ``sessionId``: First, construct a :ref:`mongoc_client_session_t` with :ref:`mongoc_client_start_session`. You can begin a transaction with :ref:`mongoc_client_session_start_transaction`, optionally with a :ref:`mongoc_transaction_opt_t` that overrides the options inherited from ``database,`` ``collection``, or ``client``, and use :ref:`mongoc_client_session_append` to add the session to ``opts``. See the example code for :ref:`mongoc_client_session_t`. * ``hint``: A document or string that specifies the index to use to support the query predicate. * ``let``: A BSON document consisting of any number of parameter names, each followed by definitions of constants in the MQL Aggregate Expression language. * ``comment``: A :ref:`bson_value_t` specifying the comment to attach to this command. The comment will appear in log messages, profiler output, and currentOp output. Requires MongoDB 4.4 or later. diff --git a/source/libmongoc/includes/generic-opts.txt b/source/libmongoc/includes/generic-opts.txt index bc760998..e01dc018 100644 --- a/source/libmongoc/includes/generic-opts.txt +++ b/source/libmongoc/includes/generic-opts.txt @@ -1,4 +1,4 @@ ``opts`` may be NULL or a BSON document with additional command options: -* ``sessionId``: First, construct a :ref:`mongoc_client_session_t` with :ref:`mongoc_client_start_session`. You can begin a transaction with :ref:`mongoc_client_session_start_transaction`, optionally with a :ref:`mongoc_transaction_opt_t` that overrides the options inherited from |opts-source|, and use :ref:`mongoc_client_session_append` to add the session to ``opts``. See the example code for :ref:`mongoc_client_session_t`. +* ``sessionId``: First, construct a :ref:`mongoc_client_session_t` with :ref:`mongoc_client_start_session`. You can begin a transaction with :ref:`mongoc_client_session_start_transaction`, optionally with a :ref:`mongoc_transaction_opt_t` that overrides the options inherited from ``database,`` ``collection``, or ``client``, and use :ref:`mongoc_client_session_append` to add the session to ``opts``. See the example code for :ref:`mongoc_client_session_t`. * ``serverId``: To target a specific server, include an int32 "serverId" field. Obtain the id by calling :ref:`mongoc_client_select_server`, then :ref:`mongoc_server_description_id` on its return value. diff --git a/source/libmongoc/includes/insert-many-opts.txt b/source/libmongoc/includes/insert-many-opts.txt index be924f34..e9bd924b 100644 --- a/source/libmongoc/includes/insert-many-opts.txt +++ b/source/libmongoc/includes/insert-many-opts.txt @@ -6,7 +6,7 @@ ``opts`` may be NULL or a BSON document with additional command options: * ``writeConcern``: Construct a :ref:`mongoc_write_concern_t` and use :ref:`mongoc_write_concern_append` to add the write concern to ``opts``. See the example code for :ref:`mongoc_client_write_command_with_opts`. -* ``sessionId``: First, construct a :ref:`mongoc_client_session_t` with :ref:`mongoc_client_start_session`. You can begin a transaction with :ref:`mongoc_client_session_start_transaction`, optionally with a :ref:`mongoc_transaction_opt_t` that overrides the options inherited from |opts-source|, and use :ref:`mongoc_client_session_append` to add the session to ``opts``. See the example code for :ref:`mongoc_client_session_t`. +* ``sessionId``: First, construct a :ref:`mongoc_client_session_t` with :ref:`mongoc_client_start_session`. You can begin a transaction with :ref:`mongoc_client_session_start_transaction`, optionally with a :ref:`mongoc_transaction_opt_t` that overrides the options inherited from ``database,`` ``collection``, or ``client``, and use :ref:`mongoc_client_session_append` to add the session to ``opts``. See the example code for :ref:`mongoc_client_session_t`. * ``validate``: Construct a bitwise-or of all desired :ref:`bson_validate_flags_t `. Set to ``false`` to skip client-side validation of the provided BSON documents. * ``comment``: A :ref:`bson_value_t` specifying the comment to attach to this command. The comment will appear in log messages, profiler output, and currentOp output. Requires MongoDB 4.4 or later. * ``ordered``: set to ``false`` to attempt to insert all documents, continuing after errors. diff --git a/source/libmongoc/includes/insert-one-opts.txt b/source/libmongoc/includes/insert-one-opts.txt index 459e08c0..4118e2f3 100644 --- a/source/libmongoc/includes/insert-one-opts.txt +++ b/source/libmongoc/includes/insert-one-opts.txt @@ -6,7 +6,7 @@ ``opts`` may be NULL or a BSON document with additional command options: * ``writeConcern``: Construct a :ref:`mongoc_write_concern_t` and use :ref:`mongoc_write_concern_append` to add the write concern to ``opts``. See the example code for :ref:`mongoc_client_write_command_with_opts`. -* ``sessionId``: First, construct a :ref:`mongoc_client_session_t` with :ref:`mongoc_client_start_session`. You can begin a transaction with :ref:`mongoc_client_session_start_transaction`, optionally with a :ref:`mongoc_transaction_opt_t` that overrides the options inherited from |opts-source|, and use :ref:`mongoc_client_session_append` to add the session to ``opts``. See the example code for :ref:`mongoc_client_session_t`. +* ``sessionId``: First, construct a :ref:`mongoc_client_session_t` with :ref:`mongoc_client_start_session`. You can begin a transaction with :ref:`mongoc_client_session_start_transaction`, optionally with a :ref:`mongoc_transaction_opt_t` that overrides the options inherited from ``collection``, and use :ref:`mongoc_client_session_append` to add the session to ``opts``. See the example code for :ref:`mongoc_client_session_t`. * ``validate``: Construct a bitwise-or of all desired :ref:`bson_validate_flags_t `. Set to ``false`` to skip client-side validation of the provided BSON documents. * ``comment``: A :ref:`bson_value_t` specifying the comment to attach to this command. The comment will appear in log messages, profiler output, and currentOp output. Requires MongoDB 4.4 or later. * ``bypassDocumentValidation``: Set to ``true`` to skip server-side schema validation of the provided BSON documents. diff --git a/source/libmongoc/includes/read-opts-sources.txt b/source/libmongoc/includes/read-opts-sources.txt index e9f5f29b..58dc1fdb 100644 --- a/source/libmongoc/includes/read-opts-sources.txt +++ b/source/libmongoc/includes/read-opts-sources.txt @@ -1,11 +1,13 @@ -Read preferences, read concern, and collation can be overridden by various sources. In a transaction, read concern and write concern are prohibited in ``opts`` and the read preference must be primary or NULL. The highest-priority sources for these options are listed first in the following table. No write concern is applied. +Read preferences, read concern, and collation can be overridden by various sources. In a transaction, read concern +and write concern are prohibited in ``opts`` and the read preference must be primary or NULL. The highest-priority +sources for these options are listed first in the following table. No write concern is applied. ================== ============== ========= Read Preferences Read Concern Collation ================== ============== ========= ``read_prefs`` ``opts`` ``opts`` Transaction Transaction -|opts-source| +``database,`` ``client``, ``collection`` ================== ============== ========= :ref:`See the example for transactions ` and for :ref:`the "distinct" command with opts `. diff --git a/source/libmongoc/includes/read-opts.txt b/source/libmongoc/includes/read-opts.txt index a0ba6b49..ebae7698 100644 --- a/source/libmongoc/includes/read-opts.txt +++ b/source/libmongoc/includes/read-opts.txt @@ -6,6 +6,6 @@ ``opts`` may be NULL or a BSON document with additional command options: * ``readConcern``: Construct a :ref:`mongoc_read_concern_t` and use :ref:`mongoc_read_concern_append` to add the read concern to ``opts``. See the example code for :ref:`mongoc_client_read_command_with_opts`. Read concern requires MongoDB 3.2 or later, otherwise an error is returned. -* ``sessionId``: First, construct a :ref:`mongoc_client_session_t` with :ref:`mongoc_client_start_session`. You can begin a transaction with :ref:`mongoc_client_session_start_transaction`, optionally with a :ref:`mongoc_transaction_opt_t` that overrides the options inherited from |opts-source|, and use :ref:`mongoc_client_session_append` to add the session to ``opts``. See the example code for :ref:`mongoc_client_session_t`. +* ``sessionId``: First, construct a :ref:`mongoc_client_session_t` with :ref:`mongoc_client_start_session`. You can begin a transaction with :ref:`mongoc_client_session_start_transaction`, optionally with a :ref:`mongoc_transaction_opt_t` that overrides the options inherited from ``database,`` ``collection``, or ``client``, and use :ref:`mongoc_client_session_append` to add the session to ``opts``. See the example code for :ref:`mongoc_client_session_t`. * ``collation``: Configure textual comparisons. See :ref:`Setting Collation Order `, and `the MongoDB Manual entry on Collation `_. Collation requires MongoDB 3.2 or later, otherwise an error is returned. * ``serverId``: To target a specific server, include an int32 "serverId" field. Obtain the id by calling :ref:`mongoc_client_select_server`, then :ref:`mongoc_server_description_id` on its return value. diff --git a/source/libmongoc/includes/read-write-opts-sources.txt b/source/libmongoc/includes/read-write-opts-sources.txt index 2eda77a6..410f3f4e 100644 --- a/source/libmongoc/includes/read-write-opts-sources.txt +++ b/source/libmongoc/includes/read-write-opts-sources.txt @@ -7,7 +7,7 @@ Read Concern Write Concern Collation ============== ============== ========= ``opts`` ``opts`` ``opts`` Transaction Transaction -|opts-source| |opts-source| +``database,`` ``collection``, or ``client`` ``database,`` ``collection``, or ``client`` ============== ============== ========= :ref:`See the example for transactions ` and for :ref:`the "distinct" command with opts `. diff --git a/source/libmongoc/includes/read-write-opts.txt b/source/libmongoc/includes/read-write-opts.txt index 42bb3dc8..49b7db3d 100644 --- a/source/libmongoc/includes/read-write-opts.txt +++ b/source/libmongoc/includes/read-write-opts.txt @@ -7,6 +7,6 @@ * ``readConcern``: Construct a :ref:`mongoc_read_concern_t` and use :ref:`mongoc_read_concern_append` to add the read concern to ``opts``. See the example code for :ref:`mongoc_client_read_command_with_opts`. Read concern requires MongoDB 3.2 or later, otherwise an error is returned. * ``writeConcern``: Construct a :ref:`mongoc_write_concern_t` and use :ref:`mongoc_write_concern_append` to add the write concern to ``opts``. See the example code for :ref:`mongoc_client_write_command_with_opts`. -* ``sessionId``: First, construct a :ref:`mongoc_client_session_t` with :ref:`mongoc_client_start_session`. You can begin a transaction with :ref:`mongoc_client_session_start_transaction`, optionally with a :ref:`mongoc_transaction_opt_t` that overrides the options inherited from |opts-source|, and use :ref:`mongoc_client_session_append` to add the session to ``opts``. See the example code for :ref:`mongoc_client_session_t`. +* ``sessionId``: First, construct a :ref:`mongoc_client_session_t` with :ref:`mongoc_client_start_session`. You can begin a transaction with :ref:`mongoc_client_session_start_transaction`, optionally with a :ref:`mongoc_transaction_opt_t` that overrides the options inherited from ``database,`` ``collection``, or ``client``, and use :ref:`mongoc_client_session_append` to add the session to ``opts``. See the example code for :ref:`mongoc_client_session_t`. * ``collation``: Configure textual comparisons. See :ref:`Setting Collation Order `, and `the MongoDB Manual entry on Collation `_. Collation requires MongoDB 3.2 or later, otherwise an error is returned. * ``serverId``: To target a specific server, include an int32 "serverId" field. Obtain the id by calling :ref:`mongoc_client_select_server`, then :ref:`mongoc_server_description_id` on its return value. diff --git a/source/libmongoc/includes/replace-one-opts.txt b/source/libmongoc/includes/replace-one-opts.txt index dd118a37..6d5a7125 100644 --- a/source/libmongoc/includes/replace-one-opts.txt +++ b/source/libmongoc/includes/replace-one-opts.txt @@ -6,7 +6,7 @@ ``opts`` may be NULL or a BSON document with additional command options: * ``writeConcern``: Construct a :ref:`mongoc_write_concern_t` and use :ref:`mongoc_write_concern_append` to add the write concern to ``opts``. See the example code for :ref:`mongoc_client_write_command_with_opts`. -* ``sessionId``: First, construct a :ref:`mongoc_client_session_t` with :ref:`mongoc_client_start_session`. You can begin a transaction with :ref:`mongoc_client_session_start_transaction`, optionally with a :ref:`mongoc_transaction_opt_t` that overrides the options inherited from |opts-source|, and use :ref:`mongoc_client_session_append` to add the session to ``opts``. See the example code for :ref:`mongoc_client_session_t`. +* ``sessionId``: First, construct a :ref:`mongoc_client_session_t` with :ref:`mongoc_client_start_session`. You can begin a transaction with :ref:`mongoc_client_session_start_transaction`, optionally with a :ref:`mongoc_transaction_opt_t` that overrides the options inherited from ``database,`` ``collection``, or ``client``, and use :ref:`mongoc_client_session_append` to add the session to ``opts``. See the example code for :ref:`mongoc_client_session_t`. * ``validate``: Construct a bitwise-or of all desired :ref:`bson_validate_flags_t `. Set to ``false`` to skip client-side validation of the provided BSON documents. * ``comment``: A :ref:`bson_value_t` specifying the comment to attach to this command. The comment will appear in log messages, profiler output, and currentOp output. Requires MongoDB 4.4 or later. * ``bypassDocumentValidation``: Set to ``true`` to skip server-side schema validation of the provided BSON documents. diff --git a/source/libmongoc/includes/retryable-read-command.txt b/source/libmongoc/includes/retryable-read-command.txt index 90538bd1..f5db3cf1 100644 --- a/source/libmongoc/includes/retryable-read-command.txt +++ b/source/libmongoc/includes/retryable-read-command.txt @@ -1,2 +1,2 @@ Retry logic occurs regardless of the underlying command. Retrying ``mapReduce`` has the potential for degraded performance. -Retrying a ``getMore`` command has the potential to miss results. For those commands, use generic command helpers (like |generic-cmd|) instead. \ No newline at end of file +Retrying a ``getMore`` command has the potential to miss results. For those commands, use generic command helpers instead. \ No newline at end of file diff --git a/source/libmongoc/includes/session-lifecycle.txt b/source/libmongoc/includes/session-lifecycle.txt index 9eae9ab7..aeacf78b 100644 --- a/source/libmongoc/includes/session-lifecycle.txt +++ b/source/libmongoc/includes/session-lifecycle.txt @@ -1,6 +1,6 @@ -Start a session with :ref:`mongoc_client_start_session`, use the session for a sequence of operations and multi-document transactions, then free it with :ref:`mongoc_client_session_destroy()`. Any :ref:`mongoc_cursor_t` or :ref:`mongoc_change_stream_t` using a session must be destroyed before the session, and a session must be destroyed before the :ref:`mongoc_client_t` it came from. +Start a session with :ref:`mongoc_client_start_session`, use the session for a sequence of operations and multi-document transactions, then free it with :ref:`mongoc_client_session_destroy`. Any :ref:`mongoc_cursor_t` or :ref:`mongoc_change_stream_t` using a session must be destroyed before the session, and a session must be destroyed before the :ref:`mongoc_client_t` it came from. -By default, sessions are `causally consistent `_. To disable causal consistency, before starting a session create a :ref:`mongoc_session_opt_t` with :ref:`mongoc_session_opts_new()` and call :ref:`mongoc_session_opts_set_causal_consistency()`, then free the struct with :ref:`mongoc_session_opts_destroy`. +By default, sessions are `causally consistent `_. To disable causal consistency, before starting a session create a :ref:`mongoc_session_opt_t` with :ref:`mongoc_session_opts_new` and call :ref:`mongoc_session_opts_set_causal_consistency`, then free the struct with :ref:`mongoc_session_opts_destroy`. Unacknowledged writes are prohibited with sessions. diff --git a/source/libmongoc/includes/update-many-opts.txt b/source/libmongoc/includes/update-many-opts.txt index 9cdfba26..adf07e72 100644 --- a/source/libmongoc/includes/update-many-opts.txt +++ b/source/libmongoc/includes/update-many-opts.txt @@ -6,7 +6,7 @@ ``opts`` may be NULL or a BSON document with additional command options: * ``writeConcern``: Construct a :ref:`mongoc_write_concern_t` and use :ref:`mongoc_write_concern_append` to add the write concern to ``opts``. See the example code for :ref:`mongoc_client_write_command_with_opts`. -* ``sessionId``: First, construct a :ref:`mongoc_client_session_t` with :ref:`mongoc_client_start_session`. You can begin a transaction with :ref:`mongoc_client_session_start_transaction`, optionally with a :ref:`mongoc_transaction_opt_t` that overrides the options inherited from |opts-source|, and use :ref:`mongoc_client_session_append` to add the session to ``opts``. See the example code for :ref:`mongoc_client_session_t`. +* ``sessionId``: First, construct a :ref:`mongoc_client_session_t` with :ref:`mongoc_client_start_session`. You can begin a transaction with :ref:`mongoc_client_session_start_transaction`, optionally with a :ref:`mongoc_transaction_opt_t` that overrides the options inherited from ``database,`` ``collection``, or ``client``, and use :ref:`mongoc_client_session_append` to add the session to ``opts``. See the example code for :ref:`mongoc_client_session_t`. * ``validate``: Construct a bitwise-or of all desired :ref:`bson_validate_flags_t `. Set to ``false`` to skip client-side validation of the provided BSON documents. * ``comment``: A :ref:`bson_value_t` specifying the comment to attach to this command. The comment will appear in log messages, profiler output, and currentOp output. Requires MongoDB 4.4 or later. * ``bypassDocumentValidation``: Set to ``true`` to skip server-side schema validation of the provided BSON documents. diff --git a/source/libmongoc/includes/update-one-opts.txt b/source/libmongoc/includes/update-one-opts.txt index 9cdfba26..adf07e72 100644 --- a/source/libmongoc/includes/update-one-opts.txt +++ b/source/libmongoc/includes/update-one-opts.txt @@ -6,7 +6,7 @@ ``opts`` may be NULL or a BSON document with additional command options: * ``writeConcern``: Construct a :ref:`mongoc_write_concern_t` and use :ref:`mongoc_write_concern_append` to add the write concern to ``opts``. See the example code for :ref:`mongoc_client_write_command_with_opts`. -* ``sessionId``: First, construct a :ref:`mongoc_client_session_t` with :ref:`mongoc_client_start_session`. You can begin a transaction with :ref:`mongoc_client_session_start_transaction`, optionally with a :ref:`mongoc_transaction_opt_t` that overrides the options inherited from |opts-source|, and use :ref:`mongoc_client_session_append` to add the session to ``opts``. See the example code for :ref:`mongoc_client_session_t`. +* ``sessionId``: First, construct a :ref:`mongoc_client_session_t` with :ref:`mongoc_client_start_session`. You can begin a transaction with :ref:`mongoc_client_session_start_transaction`, optionally with a :ref:`mongoc_transaction_opt_t` that overrides the options inherited from ``database,`` ``collection``, or ``client``, and use :ref:`mongoc_client_session_append` to add the session to ``opts``. See the example code for :ref:`mongoc_client_session_t`. * ``validate``: Construct a bitwise-or of all desired :ref:`bson_validate_flags_t `. Set to ``false`` to skip client-side validation of the provided BSON documents. * ``comment``: A :ref:`bson_value_t` specifying the comment to attach to this command. The comment will appear in log messages, profiler output, and currentOp output. Requires MongoDB 4.4 or later. * ``bypassDocumentValidation``: Set to ``true`` to skip server-side schema validation of the provided BSON documents. diff --git a/source/libmongoc/includes/write-opts-sources.txt b/source/libmongoc/includes/write-opts-sources.txt index 245ab2a5..2b1783d2 100644 --- a/source/libmongoc/includes/write-opts-sources.txt +++ b/source/libmongoc/includes/write-opts-sources.txt @@ -5,7 +5,7 @@ Write Concern Collation ============== ========= ``opts`` ``opts`` Transaction -|opts-source| +``database,`` ``collection``, or ``client`` ============== ========= :ref:`See the example for transactions ` and for :ref:`the "distinct" command with opts `. diff --git a/source/libmongoc/includes/write-opts.txt b/source/libmongoc/includes/write-opts.txt index 576e2130..382cc0d5 100644 --- a/source/libmongoc/includes/write-opts.txt +++ b/source/libmongoc/includes/write-opts.txt @@ -6,6 +6,6 @@ ``opts`` may be NULL or a BSON document with additional command options: * ``writeConcern``: Construct a :ref:`mongoc_write_concern_t` and use :ref:`mongoc_write_concern_append` to add the write concern to ``opts``. See the example code for :ref:`mongoc_client_write_command_with_opts`. -* ``sessionId``: First, construct a :ref:`mongoc_client_session_t` with :ref:`mongoc_client_start_session`. You can begin a transaction with :ref:`mongoc_client_session_start_transaction`, optionally with a :ref:`mongoc_transaction_opt_t` that overrides the options inherited from |opts-source|, and use :ref:`mongoc_client_session_append` to add the session to ``opts``. See the example code for :ref:`mongoc_client_session_t`. +* ``sessionId``: First, construct a :ref:`mongoc_client_session_t` with :ref:`mongoc_client_start_session`. You can begin a transaction with :ref:`mongoc_client_session_start_transaction`, optionally with a :ref:`mongoc_transaction_opt_t` that overrides the options inherited from ``database,`` ``collection``, or ``client``, and use :ref:`mongoc_client_session_append` to add the session to ``opts``. See the example code for :ref:`mongoc_client_session_t`. * ``collation``: Configure textual comparisons. See :ref:`Setting Collation Order `, and `the MongoDB Manual entry on Collation `_. Collation requires MongoDB 3.2 or later, otherwise an error is returned. * ``serverId``: To target a specific server, include an int32 "serverId" field. Obtain the id by calling :ref:`mongoc_client_select_server`, then :ref:`mongoc_server_description_id` on its return value.