From 7edaaa54a5fefed86532ef93ed520e755a88d83c Mon Sep 17 00:00:00 2001 From: Jeremy Mikola Date: Mon, 27 Nov 2023 17:01:14 -0500 Subject: [PATCH 01/18] Fix BulkWriteResult::getModifiedCount() return type --- .../method/MongoDBBulkWriteResult-getModifiedCount.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/method/MongoDBBulkWriteResult-getModifiedCount.txt b/docs/reference/method/MongoDBBulkWriteResult-getModifiedCount.txt index 2e8f708b0..da115c5ff 100644 --- a/docs/reference/method/MongoDBBulkWriteResult-getModifiedCount.txt +++ b/docs/reference/method/MongoDBBulkWriteResult-getModifiedCount.txt @@ -20,7 +20,7 @@ Definition .. code-block:: php - function getModifiedCount(): integer|null + function getModifiedCount(): integer This method should only be called if the write was acknowledged. From 14919b5b93ea293f891f356a1b43b02e2d1b303a Mon Sep 17 00:00:00 2001 From: Jeremy Mikola Date: Mon, 27 Nov 2023 14:50:43 -0500 Subject: [PATCH 02/18] Replace apiargs for functions --- docs/reference/function/add_logger.txt | 19 +++++++++++-- docs/reference/function/remove_logger.txt | 19 +++++++++++-- docs/reference/function/with_transaction.txt | 29 ++++++++++++++++++-- 3 files changed, 61 insertions(+), 6 deletions(-) diff --git a/docs/reference/function/add_logger.txt b/docs/reference/function/add_logger.txt index ada7c9de7..bcc160074 100644 --- a/docs/reference/function/add_logger.txt +++ b/docs/reference/function/add_logger.txt @@ -23,9 +23,24 @@ Definition function add_logger(Psr\Log\LoggerInterface $logger): void - This method has the following parameters: +Parameters +---------- + +This function has the following parameters: + +.. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - $logger + - Psr\\Log\\LoggerInterface + - A logger to register. - .. include:: /includes/apiargs/function-add_logger-param.rst + If the logger is already registered, the method will have no effect. Behavior -------- diff --git a/docs/reference/function/remove_logger.txt b/docs/reference/function/remove_logger.txt index d183f94b2..51e8e571b 100644 --- a/docs/reference/function/remove_logger.txt +++ b/docs/reference/function/remove_logger.txt @@ -23,9 +23,24 @@ Definition function remove_logger(Psr\Log\LoggerInterface $logger): void - This method has the following parameters: +Parameters +---------- + +This function has the following parameters: + +.. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - $logger + - Psr\\Log\\LoggerInterface + - A logger to unregister. - .. include:: /includes/apiargs/function-remove_logger-param.rst + If the logger is not registered, the method will have no effect. Errors/Exceptions ----------------- diff --git a/docs/reference/function/with_transaction.txt b/docs/reference/function/with_transaction.txt index f7b7b92d5..31d29d3ab 100644 --- a/docs/reference/function/with_transaction.txt +++ b/docs/reference/function/with_transaction.txt @@ -23,9 +23,34 @@ Definition function with_transaction(MongoDB\Driver\Session $session, callable $callback, array $transactionOptions = []): void - This method has the following parameters: +Parameters +---------- + +This function has the following parameters: + +.. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - $session + - :php:`MongoDB\\Driver\\Session ` + - A client session used to execute the transaction. + + * - $callback + - :php:`callable ` + - A callback that will be run inside the transaction. The callback must + accept a :php:`MongoDB\\Driver\\Session ` object + as first argument. - .. include:: /includes/apiargs/function-with_transaction-param.rst + * - $transactionOptions + - array + - Transaction options, which will be passed to + :php:`MongoDB\\Driver\\Session::startTransaction `. + See the extension documentation for a list of supported options. Behavior -------- From 6c1008240ce2ccb14e45aacfd59c36ebd43a5398 Mon Sep 17 00:00:00 2001 From: Jeremy Mikola Date: Thu, 30 Nov 2023 20:48:05 -0500 Subject: [PATCH 03/18] Change RST syntax for function params --- docs/reference/function/add_logger.txt | 17 ++------- docs/reference/function/remove_logger.txt | 17 ++------- docs/reference/function/with_transaction.txt | 39 ++++++++------------ 3 files changed, 21 insertions(+), 52 deletions(-) diff --git a/docs/reference/function/add_logger.txt b/docs/reference/function/add_logger.txt index bcc160074..f00039df8 100644 --- a/docs/reference/function/add_logger.txt +++ b/docs/reference/function/add_logger.txt @@ -26,21 +26,10 @@ Definition Parameters ---------- -This function has the following parameters: +``$logger`` : Psr\\Log\\LoggerInterface + A logger to register. -.. list-table:: - :header-rows: 1 - :widths: 20 20 80 - - * - Name - - Type - - Description - - * - $logger - - Psr\\Log\\LoggerInterface - - A logger to register. - - If the logger is already registered, the method will have no effect. + If the logger is already registered, the method will have no effect. Behavior -------- diff --git a/docs/reference/function/remove_logger.txt b/docs/reference/function/remove_logger.txt index 51e8e571b..5ced6f0ac 100644 --- a/docs/reference/function/remove_logger.txt +++ b/docs/reference/function/remove_logger.txt @@ -26,21 +26,10 @@ Definition Parameters ---------- -This function has the following parameters: +``$logger`` : Psr\\Log\\LoggerInterface + A logger to unregister. -.. list-table:: - :header-rows: 1 - :widths: 20 20 80 - - * - Name - - Type - - Description - - * - $logger - - Psr\\Log\\LoggerInterface - - A logger to unregister. - - If the logger is not registered, the method will have no effect. + If the logger is not registered, the method will have no effect. Errors/Exceptions ----------------- diff --git a/docs/reference/function/with_transaction.txt b/docs/reference/function/with_transaction.txt index 31d29d3ab..438ea7a13 100644 --- a/docs/reference/function/with_transaction.txt +++ b/docs/reference/function/with_transaction.txt @@ -21,36 +21,27 @@ Definition .. code-block:: php - function with_transaction(MongoDB\Driver\Session $session, callable $callback, array $transactionOptions = []): void + function with_transaction( + MongoDB\Driver\Session $session, + callable $callback, + array $transactionOptions = [] + ): void Parameters ---------- -This function has the following parameters: +``$session`` : :php:`MongoDB\\Driver\\Session ` + A client session used to execute the transaction. -.. list-table:: - :header-rows: 1 - :widths: 20 20 80 +``$callback`` : :php:`callable ` + A callback that will be run inside the transaction. The callback must accept a + :php:`MongoDB\\Driver\\Session ` object as its first + argument. - * - Name - - Type - - Description - - * - $session - - :php:`MongoDB\\Driver\\Session ` - - A client session used to execute the transaction. - - * - $callback - - :php:`callable ` - - A callback that will be run inside the transaction. The callback must - accept a :php:`MongoDB\\Driver\\Session ` object - as first argument. - - * - $transactionOptions - - array - - Transaction options, which will be passed to - :php:`MongoDB\\Driver\\Session::startTransaction `. - See the extension documentation for a list of supported options. +``$transactionOptions`` : array + Transaction options, which will be passed to + :php:`MongoDB\\Driver\\Session::startTransaction `. + See the extension documentation for a list of supported options. Behavior -------- From 912d0c085f4f8a6fa533a6380c11938d8520c5a1 Mon Sep 17 00:00:00 2001 From: Jeremy Mikola Date: Fri, 1 Dec 2023 11:09:43 -0500 Subject: [PATCH 04/18] Fix apiargs replacement token in GridFS params --- .../apiargs-MongoDBGridFSBucket-method-delete-param.yaml | 2 +- ...iargs-MongoDBGridFSBucket-method-downloadToStream-param.yaml | 2 +- ...MongoDBGridFSBucket-method-downloadToStreamByName-param.yaml | 2 +- ...rgs-MongoDBGridFSBucket-method-openDownloadStream-param.yaml | 2 +- ...ngoDBGridFSBucket-method-openDownloadStreamByName-param.yaml | 2 +- ...iargs-MongoDBGridFSBucket-method-openUploadStream-param.yaml | 2 +- .../apiargs-MongoDBGridFSBucket-method-rename-param.yaml | 2 +- ...iargs-MongoDBGridFSBucket-method-uploadFromStream-param.yaml | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/includes/apiargs-MongoDBGridFSBucket-method-delete-param.yaml b/docs/includes/apiargs-MongoDBGridFSBucket-method-delete-param.yaml index 7e8baa214..f582864a3 100644 --- a/docs/includes/apiargs-MongoDBGridFSBucket-method-delete-param.yaml +++ b/docs/includes/apiargs-MongoDBGridFSBucket-method-delete-param.yaml @@ -2,5 +2,5 @@ source: file: apiargs-MongoDBGridFSBucket-common-param.yaml ref: $id replacement: - resource: " to delete" + action: " to delete" ... diff --git a/docs/includes/apiargs-MongoDBGridFSBucket-method-downloadToStream-param.yaml b/docs/includes/apiargs-MongoDBGridFSBucket-method-downloadToStream-param.yaml index 39d48dc5d..333ebf7ac 100644 --- a/docs/includes/apiargs-MongoDBGridFSBucket-method-downloadToStream-param.yaml +++ b/docs/includes/apiargs-MongoDBGridFSBucket-method-downloadToStream-param.yaml @@ -2,7 +2,7 @@ source: file: apiargs-MongoDBGridFSBucket-common-param.yaml ref: $id replacement: - resource: " to download" + action: " to download" --- source: file: apiargs-MongoDBGridFSBucket-common-param.yaml diff --git a/docs/includes/apiargs-MongoDBGridFSBucket-method-downloadToStreamByName-param.yaml b/docs/includes/apiargs-MongoDBGridFSBucket-method-downloadToStreamByName-param.yaml index 2704877be..ff9c81de7 100644 --- a/docs/includes/apiargs-MongoDBGridFSBucket-method-downloadToStreamByName-param.yaml +++ b/docs/includes/apiargs-MongoDBGridFSBucket-method-downloadToStreamByName-param.yaml @@ -2,7 +2,7 @@ source: file: apiargs-MongoDBGridFSBucket-common-param.yaml ref: $filename replacement: - resource: " to download" + action: " to download" --- source: file: apiargs-MongoDBGridFSBucket-common-param.yaml diff --git a/docs/includes/apiargs-MongoDBGridFSBucket-method-openDownloadStream-param.yaml b/docs/includes/apiargs-MongoDBGridFSBucket-method-openDownloadStream-param.yaml index 54e7c8c21..6e4032d44 100644 --- a/docs/includes/apiargs-MongoDBGridFSBucket-method-openDownloadStream-param.yaml +++ b/docs/includes/apiargs-MongoDBGridFSBucket-method-openDownloadStream-param.yaml @@ -2,5 +2,5 @@ source: file: apiargs-MongoDBGridFSBucket-common-param.yaml ref: $id replacement: - resource: " to download" + action: " to download" ... diff --git a/docs/includes/apiargs-MongoDBGridFSBucket-method-openDownloadStreamByName-param.yaml b/docs/includes/apiargs-MongoDBGridFSBucket-method-openDownloadStreamByName-param.yaml index eb8ec932c..02acce378 100644 --- a/docs/includes/apiargs-MongoDBGridFSBucket-method-openDownloadStreamByName-param.yaml +++ b/docs/includes/apiargs-MongoDBGridFSBucket-method-openDownloadStreamByName-param.yaml @@ -2,7 +2,7 @@ source: file: apiargs-MongoDBGridFSBucket-common-param.yaml ref: $filename replacement: - resource: " to download" + action: " to download" --- source: file: apiargs-common-param.yaml diff --git a/docs/includes/apiargs-MongoDBGridFSBucket-method-openUploadStream-param.yaml b/docs/includes/apiargs-MongoDBGridFSBucket-method-openUploadStream-param.yaml index 6b8efb347..a4fa839b8 100644 --- a/docs/includes/apiargs-MongoDBGridFSBucket-method-openUploadStream-param.yaml +++ b/docs/includes/apiargs-MongoDBGridFSBucket-method-openUploadStream-param.yaml @@ -2,7 +2,7 @@ source: file: apiargs-MongoDBGridFSBucket-common-param.yaml ref: $filename replacement: - resource: " to create" + action: " to create" --- source: file: apiargs-common-param.yaml diff --git a/docs/includes/apiargs-MongoDBGridFSBucket-method-rename-param.yaml b/docs/includes/apiargs-MongoDBGridFSBucket-method-rename-param.yaml index e1b140aea..45d89936c 100644 --- a/docs/includes/apiargs-MongoDBGridFSBucket-method-rename-param.yaml +++ b/docs/includes/apiargs-MongoDBGridFSBucket-method-rename-param.yaml @@ -2,7 +2,7 @@ source: file: apiargs-MongoDBGridFSBucket-common-param.yaml ref: $id replacement: - resource: " to rename" + action: " to rename" --- arg_name: param name: $newFilename diff --git a/docs/includes/apiargs-MongoDBGridFSBucket-method-uploadFromStream-param.yaml b/docs/includes/apiargs-MongoDBGridFSBucket-method-uploadFromStream-param.yaml index 48fa2db4c..2a42e2e7f 100644 --- a/docs/includes/apiargs-MongoDBGridFSBucket-method-uploadFromStream-param.yaml +++ b/docs/includes/apiargs-MongoDBGridFSBucket-method-uploadFromStream-param.yaml @@ -2,7 +2,7 @@ source: file: apiargs-MongoDBGridFSBucket-common-param.yaml ref: $filename replacement: - resource: " to create" + action: " to create" --- arg_name: param name: $source From ffdc786a01063c60a9ea2b5ae1529bc9c27ea08b Mon Sep 17 00:00:00 2001 From: Jeremy Mikola Date: Fri, 1 Dec 2023 16:29:35 -0500 Subject: [PATCH 05/18] Replace apiargs for Client methods --- docs/includes/option-collation.rst | 5 + docs/includes/option-comment.rst | 4 + docs/includes/option-maxTimeMS.rst | 3 + docs/includes/option-readConcern.rst | 2 + docs/includes/option-readPreference.rst | 2 + docs/includes/option-session.rst | 1 + docs/includes/option-typeMap.rst | 3 + docs/includes/option-writeConcern.rst | 2 + docs/includes/watch-options.rst | 185 +++++++++++++++++ .../method/MongoDBClient-addSubscriber.txt | 19 +- .../MongoDBClient-createClientEncryption.txt | 17 +- .../method/MongoDBClient-dropDatabase.txt | 44 +++- .../MongoDBClient-listDatabaseNames.txt | 52 ++++- .../method/MongoDBClient-listDatabases.txt | 54 ++++- .../method/MongoDBClient-removeSubscriber.txt | 16 +- .../method/MongoDBClient-selectCollection.txt | 46 ++++- .../method/MongoDBClient-selectDatabase.txt | 42 +++- .../method/MongoDBClient-startSession.txt | 10 +- docs/reference/method/MongoDBClient-watch.txt | 17 +- .../method/MongoDBClient__construct.txt | 190 +++++++++++++++++- docs/reference/method/MongoDBClient__get.txt | 6 +- 21 files changed, 661 insertions(+), 59 deletions(-) create mode 100644 docs/includes/option-collation.rst create mode 100644 docs/includes/option-comment.rst create mode 100644 docs/includes/option-maxTimeMS.rst create mode 100644 docs/includes/option-readConcern.rst create mode 100644 docs/includes/option-readPreference.rst create mode 100644 docs/includes/option-session.rst create mode 100644 docs/includes/option-typeMap.rst create mode 100644 docs/includes/option-writeConcern.rst create mode 100644 docs/includes/watch-options.rst diff --git a/docs/includes/option-collation.rst b/docs/includes/option-collation.rst new file mode 100644 index 000000000..aedb6fe2d --- /dev/null +++ b/docs/includes/option-collation.rst @@ -0,0 +1,5 @@ +:manual:`Collation ` allows users to specify +language-specific rules for string comparison, such as rules for lettercase +and accent marks. When specifying collation, the ``locale`` field is mandatory; +all other collation fields are optional. For descriptions of the fields, +see :manual:`Collation Document `. diff --git a/docs/includes/option-comment.rst b/docs/includes/option-comment.rst new file mode 100644 index 000000000..0ada01599 --- /dev/null +++ b/docs/includes/option-comment.rst @@ -0,0 +1,4 @@ +Enables users to specify an arbitrary comment to help trace the operation +through the :manual:`database profiler `, +:manual:`currentOp ` output, and +:manual:`logs `. diff --git a/docs/includes/option-maxTimeMS.rst b/docs/includes/option-maxTimeMS.rst new file mode 100644 index 000000000..0032f7d92 --- /dev/null +++ b/docs/includes/option-maxTimeMS.rst @@ -0,0 +1,3 @@ +The cumulative time limit in milliseconds for processing operations on the +cursor. MongoDB aborts the operation at the earliest following +:term:`interrupt point`. diff --git a/docs/includes/option-readConcern.rst b/docs/includes/option-readConcern.rst new file mode 100644 index 000000000..abf3ec76b --- /dev/null +++ b/docs/includes/option-readConcern.rst @@ -0,0 +1,2 @@ +:manual:`Read concern ` to use for the operation. +Defaults to the |parent|'s read concern. diff --git a/docs/includes/option-readPreference.rst b/docs/includes/option-readPreference.rst new file mode 100644 index 000000000..18f2ba4ff --- /dev/null +++ b/docs/includes/option-readPreference.rst @@ -0,0 +1,2 @@ +:manual:`Read preference ` to use for the operation. +Defaults to the |parent|'s read preference. diff --git a/docs/includes/option-session.rst b/docs/includes/option-session.rst new file mode 100644 index 000000000..96bd1f27d --- /dev/null +++ b/docs/includes/option-session.rst @@ -0,0 +1 @@ +Client session to associate with the operation. diff --git a/docs/includes/option-typeMap.rst b/docs/includes/option-typeMap.rst new file mode 100644 index 000000000..0fe5c463e --- /dev/null +++ b/docs/includes/option-typeMap.rst @@ -0,0 +1,3 @@ +The :php:`type map ` +to apply to cursors, which determines how BSON documents are converted to PHP +values. Defaults to the |parent|'s type map. \ No newline at end of file diff --git a/docs/includes/option-writeConcern.rst b/docs/includes/option-writeConcern.rst new file mode 100644 index 000000000..f7717032f --- /dev/null +++ b/docs/includes/option-writeConcern.rst @@ -0,0 +1,2 @@ +:manual:`Write concern ` to use for the operation. +Defaults to the |parent|'s write concern. diff --git a/docs/includes/watch-options.rst b/docs/includes/watch-options.rst new file mode 100644 index 000000000..fbc6fac61 --- /dev/null +++ b/docs/includes/watch-options.rst @@ -0,0 +1,185 @@ +.. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - batchSize + - integer + - Specifies the batch size for the cursor, which will apply to both the + initial ``aggregate`` command and any subsequent ``getMore`` commands. + This determines the maximum number of change events to return in each + response from the server. + + .. note:: + + Irrespective of the ``batchSize`` option, the initial ``aggregate`` + command response for a change stream generally does not include any + documents unless another option is used to configure its starting + point (e.g. ``startAfter``). + + * - collation + - array|object + - .. include:: /includes/option-collation.rst + + * - comment + - mixed + - .. include:: /includes/option-comment.rst + + The comment can be any valid BSON type for server versions 4.4 and above. + Earlier server versions only support string values. + + .. versionadded:: 1.13 + + * - fullDocument + - string + - Determines how the ``fullDocument`` response field will be populated for + update operations. + + By default, change streams only return the delta of fields (via an + ``updateDescription`` field) for update operations and ``fullDocument`` + is omitted. Insert and replace operations always include the + ``fullDocument`` field. Delete operations omit the field as the document + no longer exists. + + Specify "updateLookup" to return the current majority-committed version + of the updated document. + + MongoDB 6.0+ allows returning the post-image of the modified document if + the collection has ``changeStreamPreAndPostImages`` enabled. Specify + "whenAvailable" to return the post-image if available or a null value if + not. Specify "required" to return the post-image if available or raise an + error if not. + + The following values are supported: + + - ``MongoDB\Operation\Watch::FULL_DOCUMENT_UPDATE_LOOKUP`` + - ``MongoDB\Operation\Watch::FULL_DOCUMENT_WHEN_AVAILABLE`` + - ``MongoDB\Operation\Watch::FULL_DOCUMENT_REQUIRED`` + + .. note:: + + This is an option of the ``$changeStream`` pipeline stage. + + * - fullDocumentBeforeChange + - string + - Determines how the ``fullDocumentBeforeChange`` response field will be + populated. By default, the field is omitted. + + MongoDB 6.0+ allows returning the pre-image of the modified document if + the collection has ``changeStreamPreAndPostImages`` enabled. Specify + "whenAvailable" to return the pre-image if available or a null value if + not. Specify "required" to return the pre-image if available or raise an + error if not. + + The following values are supported: + + - ``MongoDB\Operation\Watch::FULL_DOCUMENT_BEFORE_CHANGE_WHEN_AVAILABLE`` + - ``MongoDB\Operation\Watch::FULL_DOCUMENT_BEFORE_CHANGE_REQUIRED`` + + .. note:: + + This is an option of the ``$changeStream`` pipeline stage. + + .. versionadded: 1.13 + + * - maxAwaitTimeMS + - integer + - Positive integer denoting the time limit in milliseconds for the server + to block a getMore operation if no data is available. + + * - readConcern + - :php:`MongoDB\\Driver\\ReadConcern ` + - .. include:: /includes/option-readConcern.rst + + * - readPreference + - :php:`MongoDB\\Driver\\ReadPreference ` + - .. include:: /includes/option-readPreference.rst + + This is used for both the initial change stream aggregation and for + server selection during an automatic resume. + + * - resumeAfter + - array|object + - Specifies the logical starting point for the new change stream. The + ``_id`` field in documents returned by the change stream may be used + here. + + Using this option in conjunction with ``startAfter`` and/or + ``startAtOperationTime`` will result in a server error. The options are + mutually exclusive. + + .. note:: + + This is an option of the ``$changeStream`` pipeline stage. + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/option-session.rst + + * - showExpandedEvents + - boolean + - If true, instructs the server to include additional DDL events in the + change stream. The additional events that may be included are: + + - ``createIndexes`` + - ``dropIndexes`` + - ``modify`` + - ``create`` + - ``shardCollection`` + - ``reshardCollection`` (server 6.1+) + - ``refineCollectionShardKey`` (server 6.1+) + + This is not supported for server versions prior to 6.0 and will result in + an exception at execution time if used. + + .. note:: + + This is an option of the ``$changeStream`` pipeline stage. + + .. versionadded:: 1.13 + + * - startAfter + - array|object + - Specifies the logical starting point for the new change stream. The + ``_id`` field in documents returned by the change stream may be used + here. Unlike ``resumeAfter``, this option can be used with a resume token + from an "invalidate" event. + + Using this option in conjunction with ``resumeAfter`` and/or + ``startAtOperationTime`` will result in a server error. The options are + mutually exclusive. + + This is not supported for server versions prior to 4.2 and will result in + an exception at execution time if used. + + .. note:: + + This is an option of the ``$changeStream`` pipeline stage. + + .. versionadded: 1.5 + + * - startAtOperationTime + - :php:`MongoDB\\BSON\\TimestampInterface ` + - If specified, the change stream will only provide changes that occurred + at or after the specified timestamp. Command responses from a MongoDB + 4.0+ server include an ``operationTime`` that can be used here. By + default, the ``operationTime`` returned by the initial ``aggregate`` + command will be used if available. + + Using this option in conjunction with ``resumeAfter`` and/or + ``startAfter`` will result in a server error. The options are mutually + exclusive. + + This is not supported for server versions prior to 4.0 and will result in + an exception at execution time if used. + + .. note:: + + This is an option of the ``$changeStream`` pipeline stage. + + * - typeMap + - array + - .. include:: /includes/option-typeMap.rst diff --git a/docs/reference/method/MongoDBClient-addSubscriber.txt b/docs/reference/method/MongoDBClient-addSubscriber.txt index e55a94841..2bf16cd5d 100644 --- a/docs/reference/method/MongoDBClient-addSubscriber.txt +++ b/docs/reference/method/MongoDBClient-addSubscriber.txt @@ -24,15 +24,11 @@ Definition function addSubscriber(MongoDB\Driver\Monitoring\Subscriber $subscriber): void - This method has the following parameters: - - .. include:: /includes/apiargs/MongoDBClient-method-addSubscriber-param.rst - - .. note:: +Parameters +---------- - If ``$subscriber`` is already registered with this Client, this function - is a no-op. If ``$subscriber`` is also registered globally, it will still - only be notified once of each event for this Client. +``$subscriber`` : :php:`MongoDB\\Driver\\Monitoring\\Subscriber ` + A monitoring event subscriber to register with this Client. Errors/Exceptions ----------------- @@ -44,6 +40,13 @@ if subscriber is a :php:`MongoDB\\Driver\\Monitoring\\LogSubscriber `. +Behavior +-------- + +If ``$subscriber`` is already registered with this Client, this function is a +no-op. If ``$subscriber`` is also registered globally, it will still only be +notified once of each event for this Client. + Example ------- diff --git a/docs/reference/method/MongoDBClient-createClientEncryption.txt b/docs/reference/method/MongoDBClient-createClientEncryption.txt index 9b6f817ea..0dd925cd1 100644 --- a/docs/reference/method/MongoDBClient-createClientEncryption.txt +++ b/docs/reference/method/MongoDBClient-createClientEncryption.txt @@ -22,15 +22,18 @@ Definition function createClientEncryption(array $options): MongoDB\Driver\ClientEncryption - This method has the following parameters: +Parameters +---------- - .. include:: /includes/apiargs/MongoDBClient-method-createClientEncryption-param.rst +``$options`` : array + An array specifying the desired options. Refer to the + :php:`MongoDB\\Driver\\Manager::createClientEncryption() ` + extension documentation for a list of supported options. - The ``$options`` parameter supports all options documented in the - :php:`extension manual `. - For the ``keyVaultClient`` option, an instance of :phpclass:`MongoDB\\Client` - is automatically unwrapped and the :php:`MongoDB\\Driver\\Manager ` - instance is passed to the extension. + If a :phpclass:`MongoDB\\Client` is provided for the ``keyVaultClient`` + option, it will be unwrapped into a + :php:`MongoDB\\Driver\\Manager ` for the + extension. Return Values ------------- diff --git a/docs/reference/method/MongoDBClient-dropDatabase.txt b/docs/reference/method/MongoDBClient-dropDatabase.txt index 3e963ee5c..29ceb10ec 100644 --- a/docs/reference/method/MongoDBClient-dropDatabase.txt +++ b/docs/reference/method/MongoDBClient-dropDatabase.txt @@ -21,13 +21,49 @@ Definition function dropDatabase(string $databaseName, array $options = []): array|object - This method has the following parameters: +Parameters +---------- + +``$databaseName`` : string + The name of the database to drop. + +``$options`` : array + An array specifying the desired options. + + .. |parent| replace:: client + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - comment + - mixed + - .. include:: /includes/option-comment.rst + + This is not supported for server versions prior to 4.4 and will result + in an exception at execution time if used. + + .. versionadded:: 1.13 + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/option-session.rst + + .. versionadded:: 1.3 - .. include:: /includes/apiargs/MongoDBClient-method-dropDatabase-param.rst + * - typeMap + - array + - .. include:: /includes/option-typeMap.rst - The ``$options`` parameter supports the following options: + This will be used for the returned command result document. - .. include:: /includes/apiargs/MongoDBClient-method-dropDatabase-option.rst + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - .. include:: /includes/option-writeConcern.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBClient-listDatabaseNames.txt b/docs/reference/method/MongoDBClient-listDatabaseNames.txt index bf4fb48fe..c6ec17767 100644 --- a/docs/reference/method/MongoDBClient-listDatabaseNames.txt +++ b/docs/reference/method/MongoDBClient-listDatabaseNames.txt @@ -23,13 +23,57 @@ Definition function listDatabaseNames(array $options = []): Iterator - This method has the following parameters: +Parameters +---------- + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - authorizedDatabases + - boolean + - A flag that determines which databases are returned based on the user + privileges when access control is enabled. For more information, see the + `listDatabases command documentation `_. + + For servers < 4.0.5, this option is ignored. + + .. versionadded:: 1.7 + + * - comment + - mixed + - .. include:: /includes/option-comment.rst + + This is not supported for server versions prior to 4.4 and will result + in an exception at execution time if used. + + .. versionadded:: 1.13 + + * - filter + - array|object + - A query expression to filter the list of databases. + + You can specify a query expression for database fields (e.g. ``name``, + ``sizeOnDisk``, ``empty``). + + .. versionadded:: 1.3 - .. include:: /includes/apiargs/MongoDBClient-method-listDatabases-param.rst + * - maxTimeMS + - integer + - .. include:: /includes/option-maxTimeMS.rst - The ``$options`` parameter supports the following options: + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/option-session.rst - .. include:: /includes/apiargs/MongoDBClient-method-listDatabases-option.rst + .. versionadded:: 1.3 Return Values ------------- diff --git a/docs/reference/method/MongoDBClient-listDatabases.txt b/docs/reference/method/MongoDBClient-listDatabases.txt index 822f98d7c..547d1b7cf 100644 --- a/docs/reference/method/MongoDBClient-listDatabases.txt +++ b/docs/reference/method/MongoDBClient-listDatabases.txt @@ -21,13 +21,59 @@ Definition function listDatabases(array $options = []): MongoDB\Model\DatabaseInfoIterator - This method has the following parameters: +Parameters +---------- + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - authorizedDatabases + - boolean + - A flag that determines which databases are returned based on the user + privileges when access control is enabled. For more information, see the + `listDatabases command documentation `_. + + For servers < 4.0.5, this option is ignored. + + .. versionadded:: 1.7 + + * - comment + - mixed + - .. include:: /includes/option-comment.rst + + This is not supported for server versions prior to 4.4 and will result + in an exception at execution time if used. + + .. versionadded:: 1.13 + + * - filter + - array|object + - A query expression to filter the list of databases. + + You can specify a query expression for database fields (e.g. ``name``, + ``sizeOnDisk``, ``empty``). + + .. versionadded:: 1.3 + + * - maxTimeMS + - integer + - .. include:: /includes/option-maxTimeMS.rst + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/option-session.rst - .. include:: /includes/apiargs/MongoDBClient-method-listDatabases-param.rst + .. versionadded:: 1.3 - The ``$options`` parameter supports the following options: - .. include:: /includes/apiargs/MongoDBClient-method-listDatabases-option.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBClient-removeSubscriber.txt b/docs/reference/method/MongoDBClient-removeSubscriber.txt index 619fb70cd..d0a6ac5d1 100644 --- a/docs/reference/method/MongoDBClient-removeSubscriber.txt +++ b/docs/reference/method/MongoDBClient-removeSubscriber.txt @@ -23,20 +23,22 @@ Definition function removeSubscriber(MongoDB\Driver\Monitoring\Subscriber $subscriber): void - This method has the following parameters: - - .. include:: /includes/apiargs/MongoDBClient-method-removeSubscriber-param.rst - - .. note:: +Parameters +---------- - If ``$subscriber`` is not registered with this Client, this function - is a no-op. +``$subscriber`` : :php:`MongoDB\\Driver\\Monitoring\\Subscriber ` + A monitoring event subscriber to unregister with this Client. Errors/Exceptions ----------------- .. include:: /includes/extracts/error-invalidargumentexception.rst +Behavior +-------- + +If ``$subscriber`` is not registered with this Client, this function is a no-op. + See Also -------- diff --git a/docs/reference/method/MongoDBClient-selectCollection.txt b/docs/reference/method/MongoDBClient-selectCollection.txt index 88828c29b..fbbcbcf81 100644 --- a/docs/reference/method/MongoDBClient-selectCollection.txt +++ b/docs/reference/method/MongoDBClient-selectCollection.txt @@ -19,15 +19,51 @@ Definition .. code-block:: php - function selectCollection(string $databaseName, string $collectionName, array $options = []): MongoDB\Collection + function selectCollection( + string $databaseName, + string $collectionName, + array $options = [] + ): MongoDB\Collection - This method has the following parameters: +Parameters +---------- + +``$databaseName`` : string + The name of the database containing the collection to select. + +``$collectionName`` : string + The name of the collection to select. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - readConcern + - :php:`MongoDB\\Driver\\ReadConcern ` + - The default read concern to use for collection operations. Defaults to + the client's read concern. - .. include:: /includes/apiargs/MongoDBClient-method-selectCollection-param.rst + * - readPreference + - :php:`MongoDB\\Driver\\ReadPreference ` + - The default read preference to use for collection operations. Defaults + to the client's read preference. - The ``$options`` parameter supports the following options: + * - typeMap + - array + - .. |parent| replace:: client + .. include:: /includes/option-typeMap.rst - .. include:: /includes/apiargs/MongoDBClient-method-selectCollection-option.rst + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - The default write concern to use for collection operations. Defaults to + to the client's write concern. Return Values ------------- diff --git a/docs/reference/method/MongoDBClient-selectDatabase.txt b/docs/reference/method/MongoDBClient-selectDatabase.txt index a556a06ae..3971842f7 100644 --- a/docs/reference/method/MongoDBClient-selectDatabase.txt +++ b/docs/reference/method/MongoDBClient-selectDatabase.txt @@ -19,15 +19,47 @@ Definition .. code-block:: php - function selectDatabase(string $databaseName, array $options = []): MongoDB\Database + function selectDatabase( + string $databaseName, + array $options = [] + ): MongoDB\Database - This method has the following parameters: +Parameters +---------- + +``$databaseName`` : string + The name of the database to select. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - readConcern + - :php:`MongoDB\\Driver\\ReadConcern ` + - The default read concern to use for database operations. Defaults to + the client's read concern. - .. include:: /includes/apiargs/MongoDBClient-method-selectDatabase-param.rst + * - readPreference + - :php:`MongoDB\\Driver\\ReadPreference ` + - The default read preference to use for database operations. Defaults to + the client's read preference. - The ``$options`` parameter supports the following options: + * - typeMap + - array + - .. |parent| replace:: client + .. include:: /includes/option-typeMap.rst - .. include:: /includes/apiargs/MongoDBClient-method-selectDatabase-option.rst + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - The default write concern to use for database operations. Defaults to + the client's write concern. Return Values ------------- diff --git a/docs/reference/method/MongoDBClient-startSession.txt b/docs/reference/method/MongoDBClient-startSession.txt index 07a9b2b20..8de00ee09 100644 --- a/docs/reference/method/MongoDBClient-startSession.txt +++ b/docs/reference/method/MongoDBClient-startSession.txt @@ -23,9 +23,13 @@ Definition function startSession(array $options = []): MongoDB\Driver\Session - Refer to the :php:`MongoDB\\Driver\\Manager::startSession() - ` extension reference for accepted - options. +Parameters +---------- + +``$options`` : array + An array specifying the desired options. Refer to the + :php:`MongoDB\\Driver\\Manager::startSession() ` + extension documentation for a list of supported options. Return Values ------------- diff --git a/docs/reference/method/MongoDBClient-watch.txt b/docs/reference/method/MongoDBClient-watch.txt index 0e7aab34a..4f5d42459 100644 --- a/docs/reference/method/MongoDBClient-watch.txt +++ b/docs/reference/method/MongoDBClient-watch.txt @@ -22,15 +22,22 @@ Definition .. code-block:: php - function watch(array $pipeline = [], array $options = []): MongoDB\ChangeStream + function watch( + array $pipeline = [], + array $options = [] + ): MongoDB\ChangeStream - This method has the following parameters: +Parameters +---------- - .. include:: /includes/apiargs/MongoDBClient-method-watch-param.rst +``$pipeline`` : array|object + The pipeline of stages to append to an initial ``$changeStream`` stage. - The ``$options`` parameter supports the following options: +``$options`` : array + An array specifying the desired options. - .. include:: /includes/apiargs/MongoDBClient-method-watch-option.rst + .. |parent| replace:: client + .. include:: /includes/watch-options.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBClient__construct.txt b/docs/reference/method/MongoDBClient__construct.txt index 07694c91e..1134df67b 100644 --- a/docs/reference/method/MongoDBClient__construct.txt +++ b/docs/reference/method/MongoDBClient__construct.txt @@ -19,15 +19,195 @@ Definition .. code-block:: php - function __construct(?string $uri = null, array $uriOptions = [], array $driverOptions = []) + function __construct( + ?string $uri = null, + array $uriOptions = [], + array $driverOptions = [] + ) - This constructor has the following parameters: +Parameters +---------- + +``$uri`` : string + The MongoDB connection string. Refer to + :manual:`Connection Strings ` in the MongoDB + manual for more information. + + Defaults to ``"mongodb://127.0.0.1:27017"`` if unspecified. + + Any special characters in the URI components need to be encoded according to + `RFC 3986 `_. This is particularly + relevant to the username and password, which can often include special + characters such as ``@``, ``:``, or ``%``. When connecting via a Unix domain + socket, the socket path may contain special characters such as slashes and + must be encoded. The :php:`rawurlencode() ` function may be used + to encode constituent parts of the URI. + +``$uriOptions`` : array + Specifies additional URI options, such as authentication credentials or query + string parameters. The options specified in ``$uriOptions`` take precedence + over any analogous options present in the ``$uri`` string and do not need to + be encoded according to `RFC 3986 `_. + + Refer to the :php:`MongoDB\\Driver\\Manager::__construct() + ` extension documentation for a list of + supported options. + +``$driverOptions`` : array + Specifies options specific to the PHP driver. In addition to driver options + supported by the :php:`extension `, the library + additionally supports specifying a default + :php:`type map ` + to apply to the cursors it creates. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - autoEncryption + - array + - Options to configure client-side field-level encryption in the driver. + Refer to the + :php:`extension documentation ` + for a list of supported encryption options. + + If a :phpclass:`MongoDB\\Client` is provided for the ``keyVaultClient`` + option, it will be unwrapped into a + :php:`MongoDB\\Driver\\Manager ` for the + extension. + + .. versionadded:: 1.6 + + * - driver + - array + - Additional driver metadata to be passed on to the server handshake. + This is an array containing ``name``, ``version``, and ``platform`` + string fields. For example: + + .. code-block:: php + + [ + 'name' => 'my-driver', + 'version' => '1.2.3-dev', + 'platform' => 'some-platform', + ] + + .. note:: + + This feature is primarily designed for custom drivers and ODMs, + which may want to identify themselves to the server for diagnostic + purposes. Applications wishing to identify themselves should use the + ``appName`` URI option instead of this option. + + .. versionadded:: 1.7 + + * - serverApi + - :php:`MongoDB\\Driver\\ServerApi ` + - Used to declare an API version on the client. Refer to + :manual:`Stable API tutorial ` for additional + information. + + .. versionadded:: 1.9 + + * - typeMap + - array + - Default :php:`type map ` + to apply to cursors, which determines how BSON documents are converted + to PHP values. The library uses the following type map by default: + + .. code-block:: php + + [ + 'array' => 'MongoDB\Model\BSONArray', + 'document' => 'MongoDB\Model\BSONDocument', + 'root' => 'MongoDB\Model\BSONDocument', + ] + + * - allow_invalid_hostname + - boolean + - Disables hostname validation if ``true``. Defaults to ``false``. + + Allowing invalid hostnames may expose the driver to a + `man-in-the-middle attack `__. + + .. deprecated:: 1.6 + + This option has been deprecated. Use the + ``tlsAllowInvalidHostnames`` URI option instead. + + * - ca_dir + - string + - Path to a correctly hashed certificate directory. The system + certificate store will be used by default. + + Falls back to the deprecated ``capath`` SSL context option if not + specified. + + * - ca_file + - string + - Path to a certificate authority file. The system certificate store will + be used by default. + + Falls back to the deprecated ``cafile`` SSL context option if not + specified. + + .. deprecated:: 1.6 + + This option has been deprecated. Use the ``tlsCAFile`` URI option + instead. + + * - crl_file + - string + - Path to a certificate revocation list file. + + * - pem_file + - string + - Path to a PEM encoded certificate to use for client authentication. + + Falls back to the deprecated ``local_cert`` SSL context option if not + specified. + + .. deprecated:: 1.6 + + This option has been deprecated. Use the ``tlsCertificateKeyFile`` + URI option instead. + + * - pem_pwd + - string + - Passphrase for the PEM encoded certificate (if applicable). + + Falls back to the deprecated ``passphrase`` SSL context option if not + specified. + + .. deprecated:: 1.6 + + This option has been deprecated. Use the + ``tlsCertificateKeyFilePassword`` URI option instead. + + * - weak_cert_validation + - boolean + - Disables certificate validation ``true``. Defaults to ``false``. + + Falls back to the deprecated ``allow_self_signed`` SSL context option + if not specified. + + .. deprecated:: 1.6 - .. include:: /includes/apiargs/MongoDBClient-method-construct-param.rst + This option has been deprecated. Use the + ``tlsAllowInvalidCertificates`` URI option instead. - The ``$driverOptions`` parameter supports the following options: + * - context + - resource + - :php:`SSL context options ` to be used as + fallbacks for other driver options (as specified). Note that the driver + does not consult the default stream context. - .. include:: /includes/apiargs/MongoDBClient-method-construct-driverOptions.rst + This option is supported for backwards compatibility, but should be + considered deprecated. Errors/Exceptions ----------------- diff --git a/docs/reference/method/MongoDBClient__get.txt b/docs/reference/method/MongoDBClient__get.txt index 5e4097b2d..88de4725f 100644 --- a/docs/reference/method/MongoDBClient__get.txt +++ b/docs/reference/method/MongoDBClient__get.txt @@ -23,9 +23,11 @@ Definition function __get(string $databaseName): MongoDB\Database - This method has the following parameters: +Parameters +---------- - .. include:: /includes/apiargs/MongoDBClient-method-get-param.rst +``$databaseName`` : string + The name of the database to select. Return Values ------------- From 185438dcfc2016ed67fe9fc86b2030f86f331dce Mon Sep 17 00:00:00 2001 From: Jeremy Mikola Date: Fri, 1 Dec 2023 22:25:25 -0500 Subject: [PATCH 06/18] Replace apiargs for Database methods --- .../method/MongoDBDatabase-aggregate.txt | 102 +++++- .../method/MongoDBDatabase-command.txt | 38 ++- .../MongoDBDatabase-createCollection.txt | 304 +++++++++++++++++- ...goDBDatabase-createEncryptedCollection.txt | 38 ++- .../reference/method/MongoDBDatabase-drop.txt | 41 ++- .../method/MongoDBDatabase-dropCollection.txt | 69 +++- .../MongoDBDatabase-listCollectionNames.txt | 49 ++- .../MongoDBDatabase-listCollections.txt | 51 ++- .../MongoDBDatabase-modifyCollection.txt | 51 ++- .../MongoDBDatabase-renameCollection.txt | 63 +++- .../MongoDBDatabase-selectCollection.txt | 40 ++- .../MongoDBDatabase-selectGridFSBucket.txt | 49 ++- .../method/MongoDBDatabase-watch.txt | 17 +- .../method/MongoDBDatabase-withOptions.txt | 36 ++- .../method/MongoDBDatabase__construct.txt | 61 +++- .../reference/method/MongoDBDatabase__get.txt | 6 +- 16 files changed, 937 insertions(+), 78 deletions(-) diff --git a/docs/reference/method/MongoDBDatabase-aggregate.txt b/docs/reference/method/MongoDBDatabase-aggregate.txt index a7884bfe1..fe036ff17 100644 --- a/docs/reference/method/MongoDBDatabase-aggregate.txt +++ b/docs/reference/method/MongoDBDatabase-aggregate.txt @@ -24,15 +24,107 @@ Definition .. code-block:: php - function aggregate(array $pipeline, array $options = []): Traversable + function aggregate( + array $pipeline, + array $options = [] + ): Traversable - This method has the following parameters: +Parameters +---------- + +``$pipeline`` : array + Specifies an :manual:`aggregation pipeline ` + operation. + +``$options`` : array + An array specifying the desired options. + + .. |parent| replace:: database + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - allowDiskUse + - boolean + - Enables writing to temporary files. When set to ``true``, aggregation + stages can write data to the ``_tmp`` sub-directory in the ``dbPath`` + directory. + + * - batchSize + - integer + - Specifies the batch size for the cursor, which will apply to both the + initial ``aggregate`` command and any subsequent ``getMore`` commands. + This determines the maximum number of documents to return in each + response from the server. + + A batchSize of ``0`` is special in that and will only apply to the + initial ``aggregate`` command; subsequent ``getMore`` commands will use + the server's default batch size. This may be useful for quickly + returning a cursor or failure from ``aggregate`` without doing + significant server-side work. + + * - bypassDocumentValidation + - boolean + - If ``true``, allows the write operation to circumvent document level + validation. Defaults to ``false``. + + This only applies when using the :ref:`$out ` and + :ref:`$out ` stages. + + * - collation + - array|object + - .. include:: /includes/option-collation.rst + + * - comment + - mixed + - .. include:: /includes/option-comment.rst + + The comment can be any valid BSON type for server versions 4.4 and + above. Earlier server versions only support string values. + + * - explain + - boolean + - Specifies whether or not to return the information on the processing of + the pipeline. + + * - hint + - string|array|object + - .. include:: /includes/option-hint.rst + + * - let + - array|object + - .. include:: /includes/option-let.rst + + .. versionadded:: 1.9 + + * - maxTimeMS + - integer + - .. include:: /includes/option-maxTimeMS.rst + + * - readConcern + - :php:`MongoDB\\Driver\\ReadConcern ` + - .. include:: /includes/option-readConcern.rst + + * - readPreference + - :php:`MongoDB\\Driver\\ReadPreference ` + - .. include:: /includes/option-readPreference.rst - .. include:: /includes/apiargs/MongoDBDatabase-method-aggregate-param.rst + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/option-session.rst - The ``$options`` parameter supports the following options: + * - typeMap + - array + - .. include:: /includes/option-typeMap.rst - .. include:: /includes/apiargs/MongoDBDatabase-method-aggregate-option.rst + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - .. include:: /includes/option-writeConcern.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBDatabase-command.txt b/docs/reference/method/MongoDBDatabase-command.txt index 6853daad8..5545abb00 100644 --- a/docs/reference/method/MongoDBDatabase-command.txt +++ b/docs/reference/method/MongoDBDatabase-command.txt @@ -21,15 +21,43 @@ Definition .. code-block:: php - function command(array|object $command, array $options = []): MongoDB\Driver\Cursor + function command( + array|object $command, + array $options = [] + ): MongoDB\Driver\Cursor - This method has the following parameters: +Parameters +---------- + +``$command`` : array|object + The :manual:`database command ` document. + +``$options`` : array + An array specifying the desired options. + + .. |parent| replace:: database + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - readPreference + - :php:`MongoDB\\Driver\\ReadPreference ` + - .. include:: /includes/option-readPreference.rst - .. include:: /includes/apiargs/MongoDBDatabase-method-command-param.rst + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/option-session.rst - The ``$options`` parameter supports the following options: + .. versionadded:: 1.3 - .. include:: /includes/apiargs/MongoDBDatabase-method-command-option.rst + * - typeMap + - array + - .. include:: /includes/option-typeMap.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBDatabase-createCollection.txt b/docs/reference/method/MongoDBDatabase-createCollection.txt index 56129b975..a4297e71f 100644 --- a/docs/reference/method/MongoDBDatabase-createCollection.txt +++ b/docs/reference/method/MongoDBDatabase-createCollection.txt @@ -19,7 +19,10 @@ Definition .. code-block:: php - function createCollection(string $collectionName, array $options = []): array|object + function createCollection( + string $collectionName, + array $options = [] + ): array|object MongoDB creates collections implicitly when you first reference the collection in a command, such as when inserting a document into a new @@ -33,17 +36,302 @@ Definition :manual:`document validation criteria `, or configure your storage engine or indexing options. - This method has the following parameters: +Parameters +---------- + +``$collectionName`` : string + The name of the collection to create. + +``$options`` : array + An array specifying the desired options. + + .. note:: + + Not all options are available on all versions of MongoDB. Refer to the + :manual:`create ` command reference in the + MongoDB manual for compatibility considerations. + + .. |parent| replace:: database + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - autoIndexId + - boolean + - Specify ``false`` to disable the automatic creation of an index on the + ``_id`` field. + + .. important:: + + For replica sets, do not set ``autoIndexId`` to ``false``. + + .. deprecated:: 1.4 + This option has been deprecated since MongoDB 3.2. As of MongoDB + 4.0, this option cannot be ``false`` when creating a replicated + collection (i.e. a collection outside of the ``local`` database in + any mongod mode). + + * - capped + - boolean + - To create a capped collection, specify ``true``. If you specify + ``true``, you must also set a maximum size in the ``size`` option. + + * - changeStreamPreAndPostImages + - document + - Used to configure support for pre- and post-images in change streams. + See the :manual:`create ` command + documentation for more information. + + This option is available in MongoDB 6.0+ and will result in an + exception at execution time if specified for an older server version. + + .. versionadded:: 1.13 + + * - clusteredIndex + - document + - A clustered index specification. See + :manual:`Clustered Collections ` or the + :manual:`create ` command documentation for + more information. + + This option is available in MongoDB 5.3+ and will result in an + exception at execution time if specified for an older server version. + + .. versionadded:: 1.13 + + * - collation + - array|object + - .. include:: /includes/option-collation.rst + + * - comment + - mixed + - .. include:: /includes/option-comment.rst + + This is not supported for server versions prior to 4.4 and will result + in an exception at execution time if used. + + .. versionadded:: 1.13 + + * - encryptedFields + - document + - A document describing encrypted fields for queryable encryption. If + omitted, the ``encryptedFieldsMap`` option within the + ``autoEncryption`` driver option will be consulted. See + `Field Encryption and Queryability `_ + in the MongoDB manual for more information. + + This option is available in MongoDB 7.0+ and will result in an + exception at execution time if specified for an older server version. + + .. versionadded:: 1.13 + + * - expireAfterSeconds + - integer + - Used to automatically delete documents in time series collections. See + the :manual:`create ` command documentation + for more information. + + This option is available in MongoDB 5.0+ and will result in an + exception at execution time if specified for an older server version. + + .. versionadded:: 1.9 + + * - flags + - integer + - Available for the MMAPv1 storage engine only to set the + ``usePowerOf2Sizes`` and ``noPadding`` flags. + + The library provides constants that you can combine with a + :php:`bitwise OR operator ` to set the flag + values: + + - ``MongoDB\Operation\CreateCollection::USE_POWER_OF_2_SIZES``: ``1`` + - ``MongoDB\Operation\CreateCollection::NO_PADDING``: ``2`` + + Defaults to ``1``. + + .. note:: + + MongoDB 3.0 and later ignores the ``usePowerOf2Sizes`` flag. See + :manual:`collMod ` and + :manual:`db.createCollection() + ` for more information. + + * - indexOptionDefaults + - array|object + - Allows users to specify a default configuration for indexes when + creating a collection. + + The ``indexOptionDefaults`` option accepts a ``storageEngine`` + document, which should take the following form: + + .. code-block:: none + + { : } + + Storage engine configurations specified when creating indexes are + validated and logged to the :term:`oplog` during replication to support + replica sets with members that use different storage engines. + + * - max + - integer + - The maximum number of documents allowed in the capped collection. The + ``size`` option takes precedence over this limit. If a capped + collection reaches the ``size`` limit before it reaches the maximum + number of documents, MongoDB removes old documents. If you prefer to + use the ``max`` limit, ensure that the ``size`` limit, which is + required for a capped collection, is sufficient to contain the maximum + number of documents. + + * - maxTimeMS + - integer + - .. include:: /includes/option-maxTimeMS.rst + + * - pipeline + - array + - An array that consists of the aggregation pipeline stage(s), which will + be applied to the collection or view specified by ``viewOn``. See the + :manual:`create ` command documentation for + more information. + + .. versionadded:: 1.13 + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/option-session.rst + + .. versionadded:: 1.3 + + * - size + - integer + - Specify a maximum size in bytes for a capped collection. Once a capped + collection reaches its maximum size, MongoDB removes the older + documents to make space for the new documents. The ``size`` option is + required for capped collections and ignored for other collections. + + * - storageEngine + - array|object + - Available for the WiredTiger storage engine only. + + Allows users to specify configuration to the storage engine on a + per-collection basis when creating a collection. The value of the + ``storageEngine`` option should take the following form: + + .. code-block:: none + + { : } + + Storage engine configurations specified when creating collections are + validated and logged to the :term:`oplog` during replication to support + replica sets with members that use different storage engines. + + * - timeseries + - array|object + - An object containing options for creating time series collections. See + the :manual:`create ` command documentation + for supported options. + + This option is available in MongoDB 5.0+ and will result in an + exception at execution time if specified for an older server version. + + .. versionadded:: 1.9 + + * - typeMap + - array + - .. include:: /includes/option-typeMap.rst + + This will be used for the returned command result document. + + * - validator + - array|object + - Allows users to specify :manual:`validation rules or expressions + ` for the collection. For more information, + see :manual:`Document Validation ` in the + MongoDB manual. + + The ``validator`` option takes an array that specifies the validation + rules or expressions. You can specify the expressions using the same + operators as MongoDB's + :manual:`query operators ` with the + exception of :query:`$geoNear`, :query:`$near`, :query:`$nearSphere`, + :query:`$text`, and :query:`$where`. + + .. note:: + + - Validation occurs during updates and inserts. Existing documents + do not undergo validation checks until modification. + + - You cannot specify a validator for collections in the ``admin``, + ``local``, and ``config`` databases. + + - You cannot specify a validator for ``system.*`` collections. + + * - validationAction + - string + - Determines whether to ``error`` on invalid documents or just ``warn`` + about the violations but allow invalid documents to be inserted. + + .. important:: + + Validation of documents only applies to those documents as + determined by the ``validationLevel``. + + .. list-table:: + :header-rows: 1 + + * - ``validationAction`` + - Description + + * - ``"error"`` + - **Default**. Documents must pass validation before the write + occurs. Otherwise, the write operation fails. + + * - ``"warn"`` + - Documents do not have to pass validation. If the document fails + validation, the write operation logs the validation failure. + + * - validationLevel + - string + - Determines how strictly MongoDB applies the validation rules to + existing documents during an update. + + .. list-table:: + :header-rows: 1 + + * - ``validationLevel`` + - Description + + * - ``"off"`` + - No validation for inserts or updates. + + * - ``"strict"`` + - **Default**. Apply validation rules to all inserts and all updates. + + * - ``"moderate"`` + - Apply validation rules to inserts and to updates on existing + *valid* documents. Do not apply rules to updates on existing + *invalid* documents. + + * - viewOn + - string + - The name of the source collection or view from which to create the view. - .. include:: /includes/apiargs/MongoDBDatabase-method-createCollection-param.rst + .. note:: - The ``$options`` parameter supports the following options: + The name is not the full namespace of the collection or view (i.e. + it does not include the database name). Views must be created in the + same databases as the source collection or view. - .. include:: /includes/apiargs/MongoDBDatabase-method-createCollection-option.rst + .. versionadded:: 1.13 - Note that not all options are available on all versions of MongoDB. Refer to - the :manual:`create ` command reference in the - MongoDB manual for compatibility considerations. + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - .. include:: /includes/option-writeConcern.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBDatabase-createEncryptedCollection.txt b/docs/reference/method/MongoDBDatabase-createEncryptedCollection.txt index 64c643f03..390f99c68 100644 --- a/docs/reference/method/MongoDBDatabase-createEncryptedCollection.txt +++ b/docs/reference/method/MongoDBDatabase-createEncryptedCollection.txt @@ -21,7 +21,13 @@ Definition .. code-block:: php - function createEncryptedCollection(string $collectionName, MongoDB\Driver\ClientEncryption $clientEncryption, string $kmsProvider, ?array $masterKey, array $options): array + function createEncryptedCollection( + string $collectionName, + MongoDB\Driver\ClientEncryption $clientEncryption, + string $kmsProvider, + ?array $masterKey, + array $options + ): array This method will automatically create data keys for any encrypted fields where ``keyId`` is ``null``. Data keys will be created using @@ -34,13 +40,33 @@ Definition :phpclass:`MongoDB\\Client` objects. Users must configure auto encryption after creating the encrypted collection with ``createEncryptedCollection()``. - This method has the following parameters: +Parameters +---------- + +``$collectionName`` : string + The name of the encrypted collection to create. + +``$clientEncryption`` : :php:`MongoDB\\Driver\\ClientEncryption ` + The ClientEncryption object used to create data keys. + +``$kmsProvider`` : string + KMS provider (e.g. "local", "aws") that will be used to encrypt new data keys. + This corresponds to the ``$kmsProvider`` parameter for + :php:`MongoDB\\Driver\\ClientEncryption::createDataKey() `. + +``$masterKey`` : array|null + KMS-specific key options that will be used to encrypt new data keys. This + corresponds to the ``masterKey`` option for + :php:`MongoDB\\Driver\\ClientEncryption::createDataKey() `. + + If ``$kmsProvider`` is "local", this should be ``null``. - .. include:: /includes/apiargs/MongoDBDatabase-method-createEncryptedCollection-param.rst +``$options`` : array + An array specifying the desired options. - The ``$options`` parameter supports the same options as - :phpmethod:`MongoDB\\Database::createCollection()`. The ``encryptedFields`` - option is required. + The ``$options`` parameter supports the same options as + :phpmethod:`MongoDB\\Database::createCollection()`. The ``encryptedFields`` + option is required. Return Values ------------- diff --git a/docs/reference/method/MongoDBDatabase-drop.txt b/docs/reference/method/MongoDBDatabase-drop.txt index eae1bb6b8..9b1ba616c 100644 --- a/docs/reference/method/MongoDBDatabase-drop.txt +++ b/docs/reference/method/MongoDBDatabase-drop.txt @@ -21,13 +21,46 @@ Definition function drop(array $options = []): array|object - This method has the following parameters: +Parameters +---------- + +``$options`` : array + An array specifying the desired options. + + .. |parent| replace:: database + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - comment + - mixed + - .. include:: /includes/option-comment.rst + + This is not supported for server versions prior to 4.4 and will result + in an exception at execution time if used. + + .. versionadded:: 1.13 + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/option-session.rst + + .. versionadded:: 1.3 - .. include:: /includes/apiargs/MongoDBDatabase-method-drop-param.rst + * - typeMap + - array + - .. include:: /includes/option-typeMap.rst - The ``$options`` parameter supports the following options: + This will be used for the returned command result document. - .. include:: /includes/apiargs/MongoDBDatabase-method-drop-option.rst + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - .. include:: /includes/option-writeConcern.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBDatabase-dropCollection.txt b/docs/reference/method/MongoDBDatabase-dropCollection.txt index 028e63f00..4c9a5f55b 100644 --- a/docs/reference/method/MongoDBDatabase-dropCollection.txt +++ b/docs/reference/method/MongoDBDatabase-dropCollection.txt @@ -19,15 +19,74 @@ Definition .. code-block:: php - function dropCollection(string $collectionName, array $options = []): array|object + function dropCollection( + string $collectionName, + array $options = [] + ): array|object - This method has the following parameters: +Parameters +---------- + +``$collectionName`` : string + The name of the collection to drop. + +``$options`` : array + An array specifying the desired options. + + .. |parent| replace:: database + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - encryptedFields + - array|object + - A document describing encrypted fields for queryable encryption. If + omitted, the ``encryptedFieldsMap`` option within the + ``autoEncryption`` driver option will be consulted. If + ``encryptedFieldsMap`` was defined but does not specify this + collection, the library will make a final attempt to consult the + server-side value for ``encryptedFields``. See + `Field Encryption and Queryability `_ + in the MongoDB manual for more information. + + .. note:: + + This option is not passed to the + :manual:`drop ` command. The library uses + it to determine related metadata collections that should be dropped + in addition to an encrypted collection. + + .. versionadded:: 1.13 + + * - comment + - mixed + - .. include:: /includes/option-comment.rst + + This is not supported for server versions prior to 4.4 and will result + in an exception at execution time if used. + + .. versionadded:: 1.13 + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/option-session.rst + + .. versionadded:: 1.3 - .. include:: /includes/apiargs/MongoDBDatabase-method-dropCollection-param.rst + * - typeMap + - array + - .. include:: /includes/option-typeMap.rst - The ``$options`` parameter supports the following options: + This will be used for the returned command result document. - .. include:: /includes/apiargs/MongoDBDatabase-method-dropCollection-option.rst + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - .. include:: /includes/option-writeConcern.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBDatabase-listCollectionNames.txt b/docs/reference/method/MongoDBDatabase-listCollectionNames.txt index b6eaa4ce5..52eb0e676 100644 --- a/docs/reference/method/MongoDBDatabase-listCollectionNames.txt +++ b/docs/reference/method/MongoDBDatabase-listCollectionNames.txt @@ -23,13 +23,54 @@ Definition function listCollectionNames(array $options = []): Iterator - This method has the following parameters: +Parameters +---------- + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - authorizedCollections + - boolean + - A flag that determines which collections are returned based on the user + privileges when access control is enabled. For more information, see + the :manual:`listCollections ` + command documentation. + + For servers < 4.0, this option is ignored. + + .. versionadded:: 1.12 + + * - comment + - mixed + - .. include:: /includes/option-comment.rst + + This is not supported for server versions prior to 4.4 and will result + in an exception at execution time if used. + + .. versionadded:: 1.13 + + * - filter + - array|object + - A query expression to filter the list of collections. - .. include:: /includes/apiargs/MongoDBDatabase-method-listCollections-param.rst + You can specify a query expression for collection fields (e.g. + ``name``, ``options``). - The ``$options`` parameter supports the following options: + * - maxTimeMS + - integer + - .. include:: /includes/option-maxTimeMS.rst - .. include:: /includes/apiargs/MongoDBDatabase-method-listCollections-option.rst + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/option-session.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBDatabase-listCollections.txt b/docs/reference/method/MongoDBDatabase-listCollections.txt index 421b6cab4..f9107adf7 100644 --- a/docs/reference/method/MongoDBDatabase-listCollections.txt +++ b/docs/reference/method/MongoDBDatabase-listCollections.txt @@ -21,13 +21,56 @@ Definition function listCollections(array $options = []): MongoDB\Model\CollectionInfoIterator - This method has the following parameters: +Parameters +---------- + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - authorizedCollections + - boolean + - A flag that determines which collections are returned based on the user + privileges when access control is enabled. For more information, see + the :manual:`listCollections ` + command documentation. + + For servers < 4.0, this option is ignored. + + .. versionadded:: 1.12 + + * - comment + - mixed + - .. include:: /includes/option-comment.rst + + This is not supported for server versions prior to 4.4 and will result + in an exception at execution time if used. + + .. versionadded:: 1.13 + + * - filter + - array|object + - A query expression to filter the list of collections. + + You can specify a query expression for collection fields (e.g. + ``name``, ``options``). - .. include:: /includes/apiargs/MongoDBDatabase-method-listCollections-param.rst + * - maxTimeMS + - integer + - .. include:: /includes/option-maxTimeMS.rst - The ``$options`` parameter supports the following options: + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/option-session.rst - .. include:: /includes/apiargs/MongoDBDatabase-method-listCollections-option.rst + .. versionadded:: 1.3 Return Values ------------- diff --git a/docs/reference/method/MongoDBDatabase-modifyCollection.txt b/docs/reference/method/MongoDBDatabase-modifyCollection.txt index 86c1ff523..c5e001cb7 100644 --- a/docs/reference/method/MongoDBDatabase-modifyCollection.txt +++ b/docs/reference/method/MongoDBDatabase-modifyCollection.txt @@ -22,15 +22,56 @@ Definition .. code-block:: php - function modifyCollection(string $collectionName, array $collectionOptions, array $options = []): array|object + function modifyCollection( + string $collectionName, + array $collectionOptions, + array $options = [] + ): array|object - This method has the following parameters: +Parameters +---------- + +``$collectionName`` : string + The name of the collection or view to modify. + +``$collectionOptions`` : array + Collection or view options to assign. + +``$options`` : array + An array specifying the desired options. + + .. |parent| replace:: database + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - comment + - mixed + - .. include:: /includes/option-comment.rst + + This is not supported for server versions prior to 4.4 and will result + in an exception at execution time if used. + + .. versionadded:: 1.13 + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/option-session.rst - .. include:: /includes/apiargs/MongoDBDatabase-method-modifyCollection-param.rst + * - typeMap + - array + - .. include:: /includes/option-typeMap.rst - The ``$options`` parameter supports the following options: + This will be used for the returned command result document. - .. include:: /includes/apiargs/MongoDBDatabase-method-modifyCollection-option.rst + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - .. include:: /includes/option-writeConcern.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBDatabase-renameCollection.txt b/docs/reference/method/MongoDBDatabase-renameCollection.txt index 8bbe5b8e9..24a0380a9 100644 --- a/docs/reference/method/MongoDBDatabase-renameCollection.txt +++ b/docs/reference/method/MongoDBDatabase-renameCollection.txt @@ -21,15 +21,68 @@ Definition .. code-block:: php - function renameCollection(string $fromCollectionName, string $toCollectionName, ?string $toDatabaseName = null, array $options = []): array|object + function renameCollection( + string $fromCollectionName, + string $toCollectionName, + ?string $toDatabaseName = null, + array $options = [] + ): array|object + +Parameters +---------- + +``$fromCollectionName`` : string + The name of the collection to rename. + +``$toCollectionName`` : string + The new name of the collection. + +``$toDatabaseName`` : string + The new database name of the collection. If a new database name is not + specified, the current database will be used. If the new name specifies a + different database, the command copies the collection to the new database + and drops the source collection. + +``$options`` : array + An array specifying the desired options. + + .. |parent| replace:: database + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - comment + - mixed + - .. include:: /includes/option-comment.rst + + This is not supported for server versions prior to 4.4 and will result + in an exception at execution time if used. + + .. versionadded:: 1.13 + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/option-session.rst - This method has the following parameters: + * - typeMap + - array + - .. include:: /includes/option-typeMap.rst - .. include:: /includes/apiargs/MongoDBDatabase-method-renameCollection-param.rst + This will be used for the returned command result document. - The ``$options`` parameter supports the following options: + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - .. include:: /includes/option-writeConcern.rst - .. include:: /includes/apiargs/MongoDBDatabase-method-renameCollection-option.rst + * - dropTarget + - boolean + - If ``true``, MongoDB will drop the target before renaming the + collection. The default value is ``false``. Return Values ------------- diff --git a/docs/reference/method/MongoDBDatabase-selectCollection.txt b/docs/reference/method/MongoDBDatabase-selectCollection.txt index 148854100..cb13e23f4 100644 --- a/docs/reference/method/MongoDBDatabase-selectCollection.txt +++ b/docs/reference/method/MongoDBDatabase-selectCollection.txt @@ -19,15 +19,45 @@ Definition .. code-block:: php - function selectCollection(string $collectionName, array $options = []): MongoDB\Collection + function selectCollection( + string $collectionName, + array $options = [] + ): MongoDB\Collection - This method has the following parameters: +Parameters +---------- + +``$collectionName`` : string + The name of the collection to select. + +``$options`` : array + An array specifying the desired options. + + .. |parent| replace:: database + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - readConcern + - :php:`MongoDB\\Driver\\ReadConcern ` + - .. include:: /includes/option-readConcern.rst - .. include:: /includes/apiargs/MongoDBDatabase-method-selectCollection-param.rst + * - readPreference + - :php:`MongoDB\\Driver\\ReadPreference ` + - .. include:: /includes/option-readPreference.rst - The ``$options`` parameter supports the following options: + * - typeMap + - array + - .. include:: /includes/option-typeMap.rst - .. include:: /includes/apiargs/MongoDBDatabase-method-selectCollection-option.rst + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - .. include:: /includes/option-writeConcern.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBDatabase-selectGridFSBucket.txt b/docs/reference/method/MongoDBDatabase-selectGridFSBucket.txt index f93906276..8b5c00419 100644 --- a/docs/reference/method/MongoDBDatabase-selectGridFSBucket.txt +++ b/docs/reference/method/MongoDBDatabase-selectGridFSBucket.txt @@ -21,13 +21,54 @@ Definition function selectGridFSBucket(array $options = []): MongoDB\GridFS\Bucket - This method has the following parameters: +Parameters +---------- + +``$options`` : array + An array specifying the desired options. + + .. |parent| replace:: database + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - bucketName + - string + - The bucket name, which will be used as a prefix for the files and + chunks collections. Defaults to ``"fs"``. + + * - chunkSizeBytes + - integer + - The chunk size in bytes. Defaults to ``261120`` (i.e. 255 KiB). + + * - disableMD5 + - boolean + - Whether to disable automatic MD5 generation when storing files. + + Defaults to ``false``. + + .. versionadded: 1.4 + + * - readConcern + - :php:`MongoDB\\Driver\\ReadConcern ` + - .. include:: /includes/option-readConcern.rst - .. include:: /includes/apiargs/MongoDBDatabase-method-selectGridFSBucket-param.rst + * - readPreference + - :php:`MongoDB\\Driver\\ReadPreference ` + - .. include:: /includes/option-readPreference.rst - The ``$options`` parameter supports the following options: + * - typeMap + - array + - .. include:: /includes/option-typeMap.rst - .. include:: /includes/apiargs/MongoDBDatabase-method-selectGridFSBucket-option.rst + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - .. include:: /includes/option-writeConcern.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBDatabase-watch.txt b/docs/reference/method/MongoDBDatabase-watch.txt index 7ff19b73a..ca64f8454 100644 --- a/docs/reference/method/MongoDBDatabase-watch.txt +++ b/docs/reference/method/MongoDBDatabase-watch.txt @@ -22,15 +22,22 @@ Definition .. code-block:: php - function watch(array $pipeline = [], array $options = []): MongoDB\ChangeStream + function watch( + array $pipeline = [], + array $options = [] + ): MongoDB\ChangeStream - This method has the following parameters: +Parameters +---------- - .. include:: /includes/apiargs/MongoDBDatabase-method-watch-param.rst +``$pipeline`` : array|object + The pipeline of stages to append to an initial ``$changeStream`` stage. - The ``$options`` parameter supports the following options: +``$options`` : array + An array specifying the desired options. - .. include:: /includes/apiargs/MongoDBDatabase-method-watch-option.rst + .. |parent| replace:: database + .. include:: /includes/watch-options.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBDatabase-withOptions.txt b/docs/reference/method/MongoDBDatabase-withOptions.txt index 6f732eacc..538bea869 100644 --- a/docs/reference/method/MongoDBDatabase-withOptions.txt +++ b/docs/reference/method/MongoDBDatabase-withOptions.txt @@ -21,13 +21,41 @@ Definition function withOptions(array $options = []): MongoDB\Database - This method has the following parameters: +Parameters +---------- + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - readConcern + - :php:`MongoDB\\Driver\\ReadConcern ` + - The default read concern to use for database operations. Defaults to + the original database's read concern. + + * - readPreference + - :php:`MongoDB\\Driver\\ReadPreference ` + - The default read preference to use for database operations. Defaults to + the original database's read preference. + + * - typeMap + - array + - .. |parent| replace:: original database + .. include:: /includes/option-typeMap.rst - .. include:: /includes/apiargs/MongoDBDatabase-method-withOptions-param.rst + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - The default write concern to use for database operations. Defaults + to the original database's write concern. - The ``$options`` parameter supports the following options: - .. include:: /includes/apiargs/MongoDBDatabase-method-withOptions-option.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBDatabase__construct.txt b/docs/reference/method/MongoDBDatabase__construct.txt index 2d3e7f57b..e2674ae3a 100644 --- a/docs/reference/method/MongoDBDatabase__construct.txt +++ b/docs/reference/method/MongoDBDatabase__construct.txt @@ -19,15 +19,62 @@ Definition .. code-block:: php - function __construct(MongoDB\Driver\Manager $manager, $databaseName, array $options = []) + function __construct( + MongoDB\Driver\Manager $manager, + string $databaseName, + array $options = [] + ) - This constructor has the following parameters: - - .. include:: /includes/apiargs/MongoDBDatabase-method-construct-param.rst - - The ``$options`` parameter supports the following options: +Parameters +---------- - .. include:: /includes/apiargs/MongoDBDatabase-method-construct-option.rst +``$manager`` : :php:`MongoDB\\Driver\\Manager ` + The :php:`Manager ` instance from the driver. The + manager maintains connections between the driver and your MongoDB instances. + +``$databaseName`` : string + The name of the database. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - readConcern + - :php:`MongoDB\\Driver\\ReadConcern ` + - The default read concern to use for database operations. Defaults to the + manager's read concern. + + * - readPreference + - :php:`MongoDB\\Driver\\ReadPreference ` + - The default read preference to use for database operations. Defaults to + the manager's read preference. + + * - typeMap + - array + - Default :php:`type map + ` + to apply to cursors, which determines how BSON documents are converted + to PHP values. The library uses the following type map by default: + + .. code-block:: php + + [ + 'array' => 'MongoDB\Model\BSONArray', + 'document' => 'MongoDB\Model\BSONDocument', + 'root' => 'MongoDB\Model\BSONDocument', + ] + + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - The default write concern to use for database operations. Defaults + to the manager's write concern. Errors/Exceptions ----------------- diff --git a/docs/reference/method/MongoDBDatabase__get.txt b/docs/reference/method/MongoDBDatabase__get.txt index 53cef6f9d..c888a7161 100644 --- a/docs/reference/method/MongoDBDatabase__get.txt +++ b/docs/reference/method/MongoDBDatabase__get.txt @@ -21,9 +21,11 @@ Definition function __get(string $collectionName): MongoDB\Collection - This method has the following parameters: +Parameters +---------- - .. include:: /includes/apiargs/MongoDBDatabase-method-get-param.rst +``$collectionName`` : string + The name of the database to select. Return Values ------------- From 77a9799312429c14144b165ba49cfaedb2009cf5 Mon Sep 17 00:00:00 2001 From: Jeremy Mikola Date: Fri, 1 Dec 2023 22:26:01 -0500 Subject: [PATCH 07/18] Fix position of type map anchor This was inadvertently moved in 1043a3a5fb2e1e737c00eccd24a0d87c937ab0d2 --- docs/tutorial/modeling-bson-data.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorial/modeling-bson-data.txt b/docs/tutorial/modeling-bson-data.txt index 24486d1e1..5cf09197a 100644 --- a/docs/tutorial/modeling-bson-data.txt +++ b/docs/tutorial/modeling-bson-data.txt @@ -10,6 +10,7 @@ Modeling BSON Data :depth: 2 :class: singlecol +.. _php-type-map: Type Maps --------- @@ -155,7 +156,6 @@ The same document in the MongoDB shell might display as: :php:`MongoDB\\BSON\\Persistable ` may only be used for root and embedded BSON documents. It may not be used for BSON arrays. -.. _php-type-map: Working with Enums ------------------ From 5e42e290ab1a91197e1b6f5988683b00304cecc4 Mon Sep 17 00:00:00 2001 From: Jeremy Mikola Date: Tue, 5 Dec 2023 17:42:35 -0500 Subject: [PATCH 08/18] Use extracts for option includes --- docs/includes/extracts-bucket-option.yaml | 28 ++++++++ docs/includes/extracts-client-option.yaml | 28 ++++++++ docs/includes/extracts-collection-option.yaml | 38 ++++++++++ docs/includes/extracts-common-option.yaml | 69 +++++++++++++++++++ docs/includes/extracts-database-option.yaml | 28 ++++++++ docs/includes/option-collation.rst | 5 -- docs/includes/option-comment.rst | 4 -- docs/includes/option-maxTimeMS.rst | 3 - docs/includes/option-readConcern.rst | 2 - docs/includes/option-readPreference.rst | 2 - docs/includes/option-session.rst | 1 - docs/includes/option-typeMap.rst | 3 - docs/includes/option-writeConcern.rst | 2 - docs/includes/watch-options.rst | 12 ++-- .../method/MongoDBClient-dropDatabase.txt | 10 ++- .../MongoDBClient-listDatabaseNames.txt | 6 +- .../method/MongoDBClient-listDatabases.txt | 6 +- .../method/MongoDBClient-selectCollection.txt | 6 +- .../method/MongoDBClient-selectDatabase.txt | 4 +- docs/reference/method/MongoDBClient-watch.txt | 1 - .../method/MongoDBDatabase-aggregate.txt | 22 +++--- .../method/MongoDBDatabase-command.txt | 8 +-- .../MongoDBDatabase-createCollection.txt | 14 ++-- .../reference/method/MongoDBDatabase-drop.txt | 10 ++- .../method/MongoDBDatabase-dropCollection.txt | 10 ++- .../MongoDBDatabase-listCollectionNames.txt | 6 +- .../MongoDBDatabase-listCollections.txt | 6 +- .../MongoDBDatabase-modifyCollection.txt | 10 ++- .../MongoDBDatabase-renameCollection.txt | 10 ++- .../MongoDBDatabase-selectCollection.txt | 14 ++-- .../MongoDBDatabase-selectGridFSBucket.txt | 14 ++-- .../method/MongoDBDatabase-watch.txt | 2 - .../method/MongoDBDatabase-withOptions.txt | 2 +- 33 files changed, 270 insertions(+), 116 deletions(-) create mode 100644 docs/includes/extracts-bucket-option.yaml create mode 100644 docs/includes/extracts-client-option.yaml create mode 100644 docs/includes/extracts-collection-option.yaml create mode 100644 docs/includes/extracts-common-option.yaml create mode 100644 docs/includes/extracts-database-option.yaml delete mode 100644 docs/includes/option-collation.rst delete mode 100644 docs/includes/option-comment.rst delete mode 100644 docs/includes/option-maxTimeMS.rst delete mode 100644 docs/includes/option-readConcern.rst delete mode 100644 docs/includes/option-readPreference.rst delete mode 100644 docs/includes/option-session.rst delete mode 100644 docs/includes/option-typeMap.rst delete mode 100644 docs/includes/option-writeConcern.rst diff --git a/docs/includes/extracts-bucket-option.yaml b/docs/includes/extracts-bucket-option.yaml new file mode 100644 index 000000000..0492ae9f0 --- /dev/null +++ b/docs/includes/extracts-bucket-option.yaml @@ -0,0 +1,28 @@ +ref: bucket-option-readConcern +source: + ref: common-option-readConcern + file: extracts-common-option.yaml +replacement: + object: bucket +--- +ref: bucket-option-readPreference +source: + ref: common-option-readPreference + file: extracts-common-option.yaml +replacement: + object: bucket +--- +ref: bucket-option-typeMap +source: + ref: common-option-typeMap + file: extracts-common-option.yaml +replacement: + object: bucket +--- +ref: bucket-option-writeConcern +source: + ref: common-option-writeConcern + file: extracts-common-option.yaml +replacement: + object: bucket +... diff --git a/docs/includes/extracts-client-option.yaml b/docs/includes/extracts-client-option.yaml new file mode 100644 index 000000000..9b9020bda --- /dev/null +++ b/docs/includes/extracts-client-option.yaml @@ -0,0 +1,28 @@ +ref: client-option-readConcern +source: + ref: common-option-readConcern + file: extracts-common-option.yaml +replacement: + object: client +--- +ref: client-option-readPreference +source: + ref: common-option-readPreference + file: extracts-common-option.yaml +replacement: + object: client +--- +ref: client-option-typeMap +source: + ref: common-option-typeMap + file: extracts-common-option.yaml +replacement: + object: client +--- +ref: client-option-writeConcern +source: + ref: common-option-writeConcern + file: extracts-common-option.yaml +replacement: + object: client +... diff --git a/docs/includes/extracts-collection-option.yaml b/docs/includes/extracts-collection-option.yaml new file mode 100644 index 000000000..94d9b9b04 --- /dev/null +++ b/docs/includes/extracts-collection-option.yaml @@ -0,0 +1,38 @@ +ref: collection-option-collation +source: + ref: common-option-collation + file: extracts-common-option.yaml +post: | + If the collation is unspecified but the collection has a default collation, + the operation uses the collation specified for the collection. If no + collation is specified for the collection or for the operation, MongoDB uses + the simple binary comparison used in prior versions for string comparisons. +--- +ref: collection-option-readConcern +source: + ref: common-option-readConcern + file: extracts-common-option.yaml +replacement: + object: collection +--- +ref: collection-option-readPreference +source: + ref: common-option-readPreference + file: extracts-common-option.yaml +replacement: + object: collection +--- +ref: collection-option-typeMap +source: + ref: common-option-typeMap + file: extracts-common-option.yaml +replacement: + object: collection +--- +ref: collection-option-writeConcern +source: + ref: common-option-writeConcern + file: extracts-common-option.yaml +replacement: + object: collection +... diff --git a/docs/includes/extracts-common-option.yaml b/docs/includes/extracts-common-option.yaml new file mode 100644 index 000000000..2df3b1c5d --- /dev/null +++ b/docs/includes/extracts-common-option.yaml @@ -0,0 +1,69 @@ +ref: common-option-collation +content: | + :manual:`Collation ` allows users to specify + language-specific rules for string comparison, such as rules for lettercase + and accent marks. When specifying collation, the ``locale`` field is + mandatory; all other collation fields are optional. For descriptions of the + fields, see :manual:`Collation Document `. +--- +ref: common-option-comment +content: | + Enables users to specify an arbitrary comment to help trace the operation + through the :manual:`database profiler `, + :manual:`currentOp ` output, and + :manual:`logs `. +--- +ref: common-option-hint +content: | + The index to use. Specify either the index name as a string or the index key + pattern as a document. If specified, then the query system will only consider + plans using the hinted index. +--- +ref: common-option-let +content: | + Map of parameter names and values. Values must be constant or closed + expressions that do not reference document fields. Parameters can then be + accessed as variables in an aggregate expression context (e.g. ``$$var``). + + This is not supported for server versions prior to 5.0 and will result in an + exception at execution time if used. +--- +ref: common-option-maxTimeMS +content: | + The cumulative time limit in milliseconds for processing operations on the + cursor. MongoDB aborts the operation at the earliest following + :term:`interrupt point`. +--- +ref: common-option-readConcern +content: | + :manual:`Read concern ` to use for the operation. + Defaults to the {{object}}'s read concern. +replacement: + object: object +--- +ref: common-option-readPreference +content: | + :manual:`Read preference ` to use for the + operation. Defaults to the {{object}}'s read preference. +replacement: + object: object +--- +ref: common-option-session +content: | + Client session to associate with the operation. +--- +ref: common-option-typeMap +content: | + The :php:`type map ` + to apply to cursors, which determines how BSON documents are converted to PHP + values. Defaults to the {{object}}'s type map. +replacement: + object: object +--- +ref: common-option-writeConcern +content: | + :manual:`Write concern ` to use for the operation. + Defaults to the {{object}}'s write concern. +replacement: + object: object +... diff --git a/docs/includes/extracts-database-option.yaml b/docs/includes/extracts-database-option.yaml new file mode 100644 index 000000000..e83c7abf9 --- /dev/null +++ b/docs/includes/extracts-database-option.yaml @@ -0,0 +1,28 @@ +ref: database-option-readConcern +source: + ref: common-option-readConcern + file: extracts-common-option.yaml +replacement: + object: database +--- +ref: database-option-readPreference +source: + ref: common-option-readPreference + file: extracts-common-option.yaml +replacement: + object: database +--- +ref: database-option-typeMap +source: + ref: common-option-typeMap + file: extracts-common-option.yaml +replacement: + object: database +--- +ref: database-option-writeConcern +source: + ref: common-option-writeConcern + file: extracts-common-option.yaml +replacement: + object: database +... diff --git a/docs/includes/option-collation.rst b/docs/includes/option-collation.rst deleted file mode 100644 index aedb6fe2d..000000000 --- a/docs/includes/option-collation.rst +++ /dev/null @@ -1,5 +0,0 @@ -:manual:`Collation ` allows users to specify -language-specific rules for string comparison, such as rules for lettercase -and accent marks. When specifying collation, the ``locale`` field is mandatory; -all other collation fields are optional. For descriptions of the fields, -see :manual:`Collation Document `. diff --git a/docs/includes/option-comment.rst b/docs/includes/option-comment.rst deleted file mode 100644 index 0ada01599..000000000 --- a/docs/includes/option-comment.rst +++ /dev/null @@ -1,4 +0,0 @@ -Enables users to specify an arbitrary comment to help trace the operation -through the :manual:`database profiler `, -:manual:`currentOp ` output, and -:manual:`logs `. diff --git a/docs/includes/option-maxTimeMS.rst b/docs/includes/option-maxTimeMS.rst deleted file mode 100644 index 0032f7d92..000000000 --- a/docs/includes/option-maxTimeMS.rst +++ /dev/null @@ -1,3 +0,0 @@ -The cumulative time limit in milliseconds for processing operations on the -cursor. MongoDB aborts the operation at the earliest following -:term:`interrupt point`. diff --git a/docs/includes/option-readConcern.rst b/docs/includes/option-readConcern.rst deleted file mode 100644 index abf3ec76b..000000000 --- a/docs/includes/option-readConcern.rst +++ /dev/null @@ -1,2 +0,0 @@ -:manual:`Read concern ` to use for the operation. -Defaults to the |parent|'s read concern. diff --git a/docs/includes/option-readPreference.rst b/docs/includes/option-readPreference.rst deleted file mode 100644 index 18f2ba4ff..000000000 --- a/docs/includes/option-readPreference.rst +++ /dev/null @@ -1,2 +0,0 @@ -:manual:`Read preference ` to use for the operation. -Defaults to the |parent|'s read preference. diff --git a/docs/includes/option-session.rst b/docs/includes/option-session.rst deleted file mode 100644 index 96bd1f27d..000000000 --- a/docs/includes/option-session.rst +++ /dev/null @@ -1 +0,0 @@ -Client session to associate with the operation. diff --git a/docs/includes/option-typeMap.rst b/docs/includes/option-typeMap.rst deleted file mode 100644 index 0fe5c463e..000000000 --- a/docs/includes/option-typeMap.rst +++ /dev/null @@ -1,3 +0,0 @@ -The :php:`type map ` -to apply to cursors, which determines how BSON documents are converted to PHP -values. Defaults to the |parent|'s type map. \ No newline at end of file diff --git a/docs/includes/option-writeConcern.rst b/docs/includes/option-writeConcern.rst deleted file mode 100644 index f7717032f..000000000 --- a/docs/includes/option-writeConcern.rst +++ /dev/null @@ -1,2 +0,0 @@ -:manual:`Write concern ` to use for the operation. -Defaults to the |parent|'s write concern. diff --git a/docs/includes/watch-options.rst b/docs/includes/watch-options.rst index fbc6fac61..29bddfe27 100644 --- a/docs/includes/watch-options.rst +++ b/docs/includes/watch-options.rst @@ -22,11 +22,11 @@ * - collation - array|object - - .. include:: /includes/option-collation.rst + - .. include:: /includes/extracts/common-option-collation.rst * - comment - mixed - - .. include:: /includes/option-comment.rst + - .. include:: /includes/extracts/common-option-comment.rst The comment can be any valid BSON type for server versions 4.4 and above. Earlier server versions only support string values. @@ -92,11 +92,11 @@ * - readConcern - :php:`MongoDB\\Driver\\ReadConcern ` - - .. include:: /includes/option-readConcern.rst + - .. include:: /includes/extracts/common-option-readConcern.rst * - readPreference - :php:`MongoDB\\Driver\\ReadPreference ` - - .. include:: /includes/option-readPreference.rst + - .. include:: /includes/extracts/common-option-readPreference.rst This is used for both the initial change stream aggregation and for server selection during an automatic resume. @@ -117,7 +117,7 @@ * - session - :php:`MongoDB\\Driver\\Session ` - - .. include:: /includes/option-session.rst + - .. include:: /includes/extracts/common-option-session.rst * - showExpandedEvents - boolean @@ -182,4 +182,4 @@ * - typeMap - array - - .. include:: /includes/option-typeMap.rst + - .. include:: /includes/extracts/common-option-typeMap.rst diff --git a/docs/reference/method/MongoDBClient-dropDatabase.txt b/docs/reference/method/MongoDBClient-dropDatabase.txt index 29ceb10ec..e8b1863ff 100644 --- a/docs/reference/method/MongoDBClient-dropDatabase.txt +++ b/docs/reference/method/MongoDBClient-dropDatabase.txt @@ -30,8 +30,6 @@ Parameters ``$options`` : array An array specifying the desired options. - .. |parent| replace:: client - .. list-table:: :header-rows: 1 :widths: 20 20 80 @@ -42,7 +40,7 @@ Parameters * - comment - mixed - - .. include:: /includes/option-comment.rst + - .. include:: /includes/extracts/common-option-comment.rst This is not supported for server versions prior to 4.4 and will result in an exception at execution time if used. @@ -51,19 +49,19 @@ Parameters * - session - :php:`MongoDB\\Driver\\Session ` - - .. include:: /includes/option-session.rst + - .. include:: /includes/extracts/common-option-session.rst .. versionadded:: 1.3 * - typeMap - array - - .. include:: /includes/option-typeMap.rst + - .. include:: /includes/extracts/client-option-typeMap.rst This will be used for the returned command result document. * - writeConcern - :php:`MongoDB\\Driver\\WriteConcern ` - - .. include:: /includes/option-writeConcern.rst + - .. include:: /includes/extracts/client-option-writeConcern.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBClient-listDatabaseNames.txt b/docs/reference/method/MongoDBClient-listDatabaseNames.txt index c6ec17767..5d5b237df 100644 --- a/docs/reference/method/MongoDBClient-listDatabaseNames.txt +++ b/docs/reference/method/MongoDBClient-listDatabaseNames.txt @@ -49,7 +49,7 @@ Parameters * - comment - mixed - - .. include:: /includes/option-comment.rst + - .. include:: /includes/extracts/common-option-comment.rst This is not supported for server versions prior to 4.4 and will result in an exception at execution time if used. @@ -67,11 +67,11 @@ Parameters * - maxTimeMS - integer - - .. include:: /includes/option-maxTimeMS.rst + - .. include:: /includes/extracts/common-option-maxTimeMS.rst * - session - :php:`MongoDB\\Driver\\Session ` - - .. include:: /includes/option-session.rst + - .. include:: /includes/extracts/common-option-session.rst .. versionadded:: 1.3 diff --git a/docs/reference/method/MongoDBClient-listDatabases.txt b/docs/reference/method/MongoDBClient-listDatabases.txt index 547d1b7cf..2ba5935d2 100644 --- a/docs/reference/method/MongoDBClient-listDatabases.txt +++ b/docs/reference/method/MongoDBClient-listDatabases.txt @@ -47,7 +47,7 @@ Parameters * - comment - mixed - - .. include:: /includes/option-comment.rst + - .. include:: /includes/extracts/common-option-comment.rst This is not supported for server versions prior to 4.4 and will result in an exception at execution time if used. @@ -65,11 +65,11 @@ Parameters * - maxTimeMS - integer - - .. include:: /includes/option-maxTimeMS.rst + - .. include:: /includes/extracts/common-option-maxTimeMS.rst * - session - :php:`MongoDB\\Driver\\Session ` - - .. include:: /includes/option-session.rst + - .. include:: /includes/extracts/common-option-session.rst .. versionadded:: 1.3 diff --git a/docs/reference/method/MongoDBClient-selectCollection.txt b/docs/reference/method/MongoDBClient-selectCollection.txt index fbbcbcf81..6700f0233 100644 --- a/docs/reference/method/MongoDBClient-selectCollection.txt +++ b/docs/reference/method/MongoDBClient-selectCollection.txt @@ -57,13 +57,13 @@ Parameters * - typeMap - array - - .. |parent| replace:: client - .. include:: /includes/option-typeMap.rst + - The default type map to use for collection operations. Defaults to the + client's type map. * - writeConcern - :php:`MongoDB\\Driver\\WriteConcern ` - The default write concern to use for collection operations. Defaults to - to the client's write concern. + the client's write concern. Return Values ------------- diff --git a/docs/reference/method/MongoDBClient-selectDatabase.txt b/docs/reference/method/MongoDBClient-selectDatabase.txt index 3971842f7..b18145167 100644 --- a/docs/reference/method/MongoDBClient-selectDatabase.txt +++ b/docs/reference/method/MongoDBClient-selectDatabase.txt @@ -53,8 +53,8 @@ Parameters * - typeMap - array - - .. |parent| replace:: client - .. include:: /includes/option-typeMap.rst + - The default type map to use for database operations. Defaults to the + client's type map. * - writeConcern - :php:`MongoDB\\Driver\\WriteConcern ` diff --git a/docs/reference/method/MongoDBClient-watch.txt b/docs/reference/method/MongoDBClient-watch.txt index 4f5d42459..d1da4b892 100644 --- a/docs/reference/method/MongoDBClient-watch.txt +++ b/docs/reference/method/MongoDBClient-watch.txt @@ -36,7 +36,6 @@ Parameters ``$options`` : array An array specifying the desired options. - .. |parent| replace:: client .. include:: /includes/watch-options.rst Return Values diff --git a/docs/reference/method/MongoDBDatabase-aggregate.txt b/docs/reference/method/MongoDBDatabase-aggregate.txt index fe036ff17..96d409aea 100644 --- a/docs/reference/method/MongoDBDatabase-aggregate.txt +++ b/docs/reference/method/MongoDBDatabase-aggregate.txt @@ -39,8 +39,6 @@ Parameters ``$options`` : array An array specifying the desired options. - .. |parent| replace:: database - .. list-table:: :header-rows: 1 :widths: 20 20 80 @@ -78,11 +76,11 @@ Parameters * - collation - array|object - - .. include:: /includes/option-collation.rst + - .. include:: /includes/extracts/common-option-collation.rst * - comment - mixed - - .. include:: /includes/option-comment.rst + - .. include:: /includes/extracts/common-option-comment.rst The comment can be any valid BSON type for server versions 4.4 and above. Earlier server versions only support string values. @@ -94,37 +92,37 @@ Parameters * - hint - string|array|object - - .. include:: /includes/option-hint.rst + - .. include:: /includes/extracts/common-option-hint.rst * - let - array|object - - .. include:: /includes/option-let.rst + - .. include:: /includes/extracts/common-option-let.rst .. versionadded:: 1.9 * - maxTimeMS - integer - - .. include:: /includes/option-maxTimeMS.rst + - .. include:: /includes/extracts/common-option-maxTimeMS.rst * - readConcern - :php:`MongoDB\\Driver\\ReadConcern ` - - .. include:: /includes/option-readConcern.rst + - .. include:: /includes/extracts/database-option-readConcern.rst * - readPreference - :php:`MongoDB\\Driver\\ReadPreference ` - - .. include:: /includes/option-readPreference.rst + - .. include:: /includes/extracts/database-option-readPreference.rst * - session - :php:`MongoDB\\Driver\\Session ` - - .. include:: /includes/option-session.rst + - .. include:: /includes/extracts/common-option-session.rst * - typeMap - array - - .. include:: /includes/option-typeMap.rst + - .. include:: /includes/extracts/database-option-typeMap.rst * - writeConcern - :php:`MongoDB\\Driver\\WriteConcern ` - - .. include:: /includes/option-writeConcern.rst + - .. include:: /includes/extracts/database-option-writeConcern.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBDatabase-command.txt b/docs/reference/method/MongoDBDatabase-command.txt index 5545abb00..50ebfe794 100644 --- a/docs/reference/method/MongoDBDatabase-command.txt +++ b/docs/reference/method/MongoDBDatabase-command.txt @@ -35,8 +35,6 @@ Parameters ``$options`` : array An array specifying the desired options. - .. |parent| replace:: database - .. list-table:: :header-rows: 1 :widths: 20 20 80 @@ -47,17 +45,17 @@ Parameters * - readPreference - :php:`MongoDB\\Driver\\ReadPreference ` - - .. include:: /includes/option-readPreference.rst + - .. include:: /includes/extracts/database-option-readPreference.rst * - session - :php:`MongoDB\\Driver\\Session ` - - .. include:: /includes/option-session.rst + - .. include:: /includes/extracts/common-option-session.rst .. versionadded:: 1.3 * - typeMap - array - - .. include:: /includes/option-typeMap.rst + - .. include:: /includes/extracts/database-option-typeMap.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBDatabase-createCollection.txt b/docs/reference/method/MongoDBDatabase-createCollection.txt index a4297e71f..4cb10d2ad 100644 --- a/docs/reference/method/MongoDBDatabase-createCollection.txt +++ b/docs/reference/method/MongoDBDatabase-createCollection.txt @@ -51,8 +51,6 @@ Parameters :manual:`create ` command reference in the MongoDB manual for compatibility considerations. - .. |parent| replace:: database - .. list-table:: :header-rows: 1 :widths: 20 20 80 @@ -106,11 +104,11 @@ Parameters * - collation - array|object - - .. include:: /includes/option-collation.rst + - .. include:: /includes/extracts/common-option-collation.rst * - comment - mixed - - .. include:: /includes/option-comment.rst + - .. include:: /includes/extracts/common-option-comment.rst This is not supported for server versions prior to 4.4 and will result in an exception at execution time if used. @@ -190,7 +188,7 @@ Parameters * - maxTimeMS - integer - - .. include:: /includes/option-maxTimeMS.rst + - .. include:: /includes/extracts/common-option-maxTimeMS.rst * - pipeline - array @@ -203,7 +201,7 @@ Parameters * - session - :php:`MongoDB\\Driver\\Session ` - - .. include:: /includes/option-session.rst + - .. include:: /includes/extracts/common-option-session.rst .. versionadded:: 1.3 @@ -243,7 +241,7 @@ Parameters * - typeMap - array - - .. include:: /includes/option-typeMap.rst + - .. include:: /includes/extracts/database-option-typeMap.rst This will be used for the returned command result document. @@ -331,7 +329,7 @@ Parameters * - writeConcern - :php:`MongoDB\\Driver\\WriteConcern ` - - .. include:: /includes/option-writeConcern.rst + - .. include:: /includes/extracts/database-option-writeConcern.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBDatabase-drop.txt b/docs/reference/method/MongoDBDatabase-drop.txt index 9b1ba616c..9e4ab7992 100644 --- a/docs/reference/method/MongoDBDatabase-drop.txt +++ b/docs/reference/method/MongoDBDatabase-drop.txt @@ -27,8 +27,6 @@ Parameters ``$options`` : array An array specifying the desired options. - .. |parent| replace:: database - .. list-table:: :header-rows: 1 :widths: 20 20 80 @@ -39,7 +37,7 @@ Parameters * - comment - mixed - - .. include:: /includes/option-comment.rst + - .. include:: /includes/extracts/common-option-comment.rst This is not supported for server versions prior to 4.4 and will result in an exception at execution time if used. @@ -48,19 +46,19 @@ Parameters * - session - :php:`MongoDB\\Driver\\Session ` - - .. include:: /includes/option-session.rst + - .. include:: /includes/extracts/common-option-session.rst .. versionadded:: 1.3 * - typeMap - array - - .. include:: /includes/option-typeMap.rst + - .. include:: /includes/extracts/database-option-typeMap.rst This will be used for the returned command result document. * - writeConcern - :php:`MongoDB\\Driver\\WriteConcern ` - - .. include:: /includes/option-writeConcern.rst + - .. include:: /includes/extracts/database-option-writeConcern.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBDatabase-dropCollection.txt b/docs/reference/method/MongoDBDatabase-dropCollection.txt index 4c9a5f55b..4cfa05902 100644 --- a/docs/reference/method/MongoDBDatabase-dropCollection.txt +++ b/docs/reference/method/MongoDBDatabase-dropCollection.txt @@ -33,8 +33,6 @@ Parameters ``$options`` : array An array specifying the desired options. - .. |parent| replace:: database - .. list-table:: :header-rows: 1 :widths: 20 20 80 @@ -65,7 +63,7 @@ Parameters * - comment - mixed - - .. include:: /includes/option-comment.rst + - .. include:: /includes/extracts/common-option-comment.rst This is not supported for server versions prior to 4.4 and will result in an exception at execution time if used. @@ -74,19 +72,19 @@ Parameters * - session - :php:`MongoDB\\Driver\\Session ` - - .. include:: /includes/option-session.rst + - .. include:: /includes/extracts/common-option-session.rst .. versionadded:: 1.3 * - typeMap - array - - .. include:: /includes/option-typeMap.rst + - .. include:: /includes/extracts/database-option-typeMap.rst This will be used for the returned command result document. * - writeConcern - :php:`MongoDB\\Driver\\WriteConcern ` - - .. include:: /includes/option-writeConcern.rst + - .. include:: /includes/extracts/database-option-writeConcern.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBDatabase-listCollectionNames.txt b/docs/reference/method/MongoDBDatabase-listCollectionNames.txt index 52eb0e676..14bb4c352 100644 --- a/docs/reference/method/MongoDBDatabase-listCollectionNames.txt +++ b/docs/reference/method/MongoDBDatabase-listCollectionNames.txt @@ -50,7 +50,7 @@ Parameters * - comment - mixed - - .. include:: /includes/option-comment.rst + - .. include:: /includes/extracts/common-option-comment.rst This is not supported for server versions prior to 4.4 and will result in an exception at execution time if used. @@ -66,11 +66,11 @@ Parameters * - maxTimeMS - integer - - .. include:: /includes/option-maxTimeMS.rst + - .. include:: /includes/extracts/common-option-maxTimeMS.rst * - session - :php:`MongoDB\\Driver\\Session ` - - .. include:: /includes/option-session.rst + - .. include:: /includes/extracts/common-option-session.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBDatabase-listCollections.txt b/docs/reference/method/MongoDBDatabase-listCollections.txt index f9107adf7..ebb3d717d 100644 --- a/docs/reference/method/MongoDBDatabase-listCollections.txt +++ b/docs/reference/method/MongoDBDatabase-listCollections.txt @@ -48,7 +48,7 @@ Parameters * - comment - mixed - - .. include:: /includes/option-comment.rst + - .. include:: /includes/extracts/common-option-comment.rst This is not supported for server versions prior to 4.4 and will result in an exception at execution time if used. @@ -64,11 +64,11 @@ Parameters * - maxTimeMS - integer - - .. include:: /includes/option-maxTimeMS.rst + - .. include:: /includes/extracts/common-option-maxTimeMS.rst * - session - :php:`MongoDB\\Driver\\Session ` - - .. include:: /includes/option-session.rst + - .. include:: /includes/extracts/common-option-session.rst .. versionadded:: 1.3 diff --git a/docs/reference/method/MongoDBDatabase-modifyCollection.txt b/docs/reference/method/MongoDBDatabase-modifyCollection.txt index c5e001cb7..fec9144e1 100644 --- a/docs/reference/method/MongoDBDatabase-modifyCollection.txt +++ b/docs/reference/method/MongoDBDatabase-modifyCollection.txt @@ -40,8 +40,6 @@ Parameters ``$options`` : array An array specifying the desired options. - .. |parent| replace:: database - .. list-table:: :header-rows: 1 :widths: 20 20 80 @@ -52,7 +50,7 @@ Parameters * - comment - mixed - - .. include:: /includes/option-comment.rst + - .. include:: /includes/extracts/common-option-comment.rst This is not supported for server versions prior to 4.4 and will result in an exception at execution time if used. @@ -61,17 +59,17 @@ Parameters * - session - :php:`MongoDB\\Driver\\Session ` - - .. include:: /includes/option-session.rst + - .. include:: /includes/extracts/common-option-session.rst * - typeMap - array - - .. include:: /includes/option-typeMap.rst + - .. include:: /includes/extracts/database-option-typeMap.rst This will be used for the returned command result document. * - writeConcern - :php:`MongoDB\\Driver\\WriteConcern ` - - .. include:: /includes/option-writeConcern.rst + - .. include:: /includes/extracts/database-option-writeConcern.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBDatabase-renameCollection.txt b/docs/reference/method/MongoDBDatabase-renameCollection.txt index 24a0380a9..31f7ba28e 100644 --- a/docs/reference/method/MongoDBDatabase-renameCollection.txt +++ b/docs/reference/method/MongoDBDatabase-renameCollection.txt @@ -46,8 +46,6 @@ Parameters ``$options`` : array An array specifying the desired options. - .. |parent| replace:: database - .. list-table:: :header-rows: 1 :widths: 20 20 80 @@ -58,7 +56,7 @@ Parameters * - comment - mixed - - .. include:: /includes/option-comment.rst + - .. include:: /includes/extracts/common-option-comment.rst This is not supported for server versions prior to 4.4 and will result in an exception at execution time if used. @@ -67,17 +65,17 @@ Parameters * - session - :php:`MongoDB\\Driver\\Session ` - - .. include:: /includes/option-session.rst + - .. include:: /includes/extracts/common-option-session.rst * - typeMap - array - - .. include:: /includes/option-typeMap.rst + - .. include:: /includes/extracts/database-option-typeMap.rst This will be used for the returned command result document. * - writeConcern - :php:`MongoDB\\Driver\\WriteConcern ` - - .. include:: /includes/option-writeConcern.rst + - .. include:: /includes/extracts/database-option-writeConcern.rst * - dropTarget - boolean diff --git a/docs/reference/method/MongoDBDatabase-selectCollection.txt b/docs/reference/method/MongoDBDatabase-selectCollection.txt index cb13e23f4..887d4a4d7 100644 --- a/docs/reference/method/MongoDBDatabase-selectCollection.txt +++ b/docs/reference/method/MongoDBDatabase-selectCollection.txt @@ -33,8 +33,6 @@ Parameters ``$options`` : array An array specifying the desired options. - .. |parent| replace:: database - .. list-table:: :header-rows: 1 :widths: 20 20 80 @@ -45,19 +43,23 @@ Parameters * - readConcern - :php:`MongoDB\\Driver\\ReadConcern ` - - .. include:: /includes/option-readConcern.rst + - The default read concern to use for collection operations. Defaults to + the database's read concern. * - readPreference - :php:`MongoDB\\Driver\\ReadPreference ` - - .. include:: /includes/option-readPreference.rst + - The default read preference to use for collection operations. Defaults + to the database's read preference. * - typeMap - array - - .. include:: /includes/option-typeMap.rst + - The default type map to use for collection operations. Defaults to the + database's type map. * - writeConcern - :php:`MongoDB\\Driver\\WriteConcern ` - - .. include:: /includes/option-writeConcern.rst + - The default write concern to use for collection operations. Defaults to + the database's write concern. Return Values ------------- diff --git a/docs/reference/method/MongoDBDatabase-selectGridFSBucket.txt b/docs/reference/method/MongoDBDatabase-selectGridFSBucket.txt index 8b5c00419..0d115d9b9 100644 --- a/docs/reference/method/MongoDBDatabase-selectGridFSBucket.txt +++ b/docs/reference/method/MongoDBDatabase-selectGridFSBucket.txt @@ -27,8 +27,6 @@ Parameters ``$options`` : array An array specifying the desired options. - .. |parent| replace:: database - .. list-table:: :header-rows: 1 :widths: 20 20 80 @@ -56,19 +54,23 @@ Parameters * - readConcern - :php:`MongoDB\\Driver\\ReadConcern ` - - .. include:: /includes/option-readConcern.rst + - The default read concern to use for bucket operations. Defaults to the + database's read concern. * - readPreference - :php:`MongoDB\\Driver\\ReadPreference ` - - .. include:: /includes/option-readPreference.rst + - The default read preference to use for bucket operations. Defaults to + the database's read concern. * - typeMap - array - - .. include:: /includes/option-typeMap.rst + - The default type map to use for bucket operations. Defaults to the + database's type map. * - writeConcern - :php:`MongoDB\\Driver\\WriteConcern ` - - .. include:: /includes/option-writeConcern.rst + - The default write concern to use for bucket operations. Defaults to the + database's write concern. Return Values ------------- diff --git a/docs/reference/method/MongoDBDatabase-watch.txt b/docs/reference/method/MongoDBDatabase-watch.txt index ca64f8454..61a7680ba 100644 --- a/docs/reference/method/MongoDBDatabase-watch.txt +++ b/docs/reference/method/MongoDBDatabase-watch.txt @@ -35,8 +35,6 @@ Parameters ``$options`` : array An array specifying the desired options. - - .. |parent| replace:: database .. include:: /includes/watch-options.rst Return Values diff --git a/docs/reference/method/MongoDBDatabase-withOptions.txt b/docs/reference/method/MongoDBDatabase-withOptions.txt index 538bea869..d5a50d8bf 100644 --- a/docs/reference/method/MongoDBDatabase-withOptions.txt +++ b/docs/reference/method/MongoDBDatabase-withOptions.txt @@ -48,7 +48,7 @@ Parameters * - typeMap - array - .. |parent| replace:: original database - .. include:: /includes/option-typeMap.rst + .. include:: /includes/extracts/database-option-typeMap.rst * - writeConcern - :php:`MongoDB\\Driver\\WriteConcern ` From 6cfd63a2026ed3754a7adb6ae4fd44e3431f9890 Mon Sep 17 00:00:00 2001 From: Jeremy Mikola Date: Tue, 5 Dec 2023 17:43:18 -0500 Subject: [PATCH 09/18] Remove old apiargs includes --- .../apiargs-MongoDBClient-common-option.yaml | 34 -- ...goDBClient-method-addSubscriber-param.yaml | 9 - ...Client-method-construct-driverOptions.yaml | 189 --------- ...-MongoDBClient-method-construct-param.yaml | 51 --- ...t-method-createClientEncryption-param.yaml | 4 - ...goDBClient-method-dropDatabase-option.yaml | 25 -- ...ngoDBClient-method-dropDatabase-param.yaml | 10 - ...piargs-MongoDBClient-method-get-param.yaml | 6 - ...oDBClient-method-listDatabases-option.yaml | 47 --- ...goDBClient-method-listDatabases-param.yaml | 4 - ...BClient-method-removeSubscriber-param.yaml | 9 - ...Client-method-selectCollection-option.yaml | 27 -- ...BClient-method-selectCollection-param.yaml | 16 - ...DBClient-method-selectDatabase-option.yaml | 27 -- ...oDBClient-method-selectDatabase-param.yaml | 10 - ...rgs-MongoDBClient-method-watch-option.yaml | 71 ---- ...args-MongoDBClient-method-watch-param.yaml | 8 - ...iargs-MongoDBCollection-common-option.yaml | 86 ----- ...piargs-MongoDBCollection-common-param.yaml | 33 -- ...oDBCollection-method-aggregate-option.yaml | 72 ---- ...goDBCollection-method-aggregate-param.yaml | 14 - ...oDBCollection-method-bulkWrite-option.yaml | 44 --- ...goDBCollection-method-bulkWrite-param.yaml | 37 -- ...oDBCollection-method-construct-option.yaml | 25 -- ...goDBCollection-method-construct-param.yaml | 16 - ...MongoDBCollection-method-count-option.yaml | 64 --- ...-MongoDBCollection-method-count-param.yaml | 11 - ...llection-method-countDocuments-option.yaml | 56 --- ...ollection-method-countDocuments-param.yaml | 11 - ...BCollection-method-createIndex-option.yaml | 117 ------ ...DBCollection-method-createIndex-param.yaml | 20 - ...ollection-method-createIndexes-option.yaml | 29 -- ...Collection-method-createIndexes-param.yaml | 23 -- ...ction-method-createSearchIndex-option.yaml | 17 - ...ection-method-createSearchIndex-param.yaml | 14 - ...ion-method-createSearchIndexes-option.yaml | 4 - ...tion-method-createSearchIndexes-param.yaml | 21 - ...DBCollection-method-deleteMany-option.yaml | 38 -- ...oDBCollection-method-deleteMany-param.yaml | 11 - ...oDBCollection-method-deleteOne-option.yaml | 38 -- ...goDBCollection-method-deleteOne-param.yaml | 11 - ...goDBCollection-method-distinct-option.yaml | 37 -- ...ngoDBCollection-method-distinct-param.yaml | 20 - ...-MongoDBCollection-method-drop-option.yaml | 31 -- ...s-MongoDBCollection-method-drop-param.yaml | 4 - ...oDBCollection-method-dropIndex-option.yaml | 31 -- ...goDBCollection-method-dropIndex-param.yaml | 15 - ...BCollection-method-dropIndexes-option.yaml | 29 -- ...DBCollection-method-dropIndexes-param.yaml | 4 - ...lection-method-dropSearchIndex-option.yaml | 4 - ...llection-method-dropSearchIndex-param.yaml | 13 - ...n-method-estimateDocumentCount-option.yaml | 25 -- ...on-method-estimateDocumentCount-param.yaml | 4 - ...ngoDBCollection-method-explain-option.yaml | 31 -- ...ongoDBCollection-method-explain-param.yaml | 13 - ...-MongoDBCollection-method-find-option.yaml | 263 ------------- ...s-MongoDBCollection-method-find-param.yaml | 11 - ...ngoDBCollection-method-findOne-option.yaml | 84 ---- ...ongoDBCollection-method-findOne-param.yaml | 11 - ...ection-method-findOneAndDelete-option.yaml | 56 --- ...lection-method-findOneAndDelete-param.yaml | 11 - ...ction-method-findOneAndReplace-option.yaml | 77 ---- ...ection-method-findOneAndReplace-param.yaml | 15 - ...ection-method-findOneAndUpdate-option.yaml | 83 ---- ...lection-method-findOneAndUpdate-param.yaml | 15 - ...DBCollection-method-insertMany-option.yaml | 27 -- ...oDBCollection-method-insertMany-param.yaml | 13 - ...oDBCollection-method-insertOne-option.yaml | 23 -- ...goDBCollection-method-insertOne-param.yaml | 13 - ...BCollection-method-listIndexes-option.yaml | 19 - ...DBCollection-method-listIndexes-param.yaml | 4 - ...ction-method-listSearchIndexes-option.yaml | 44 --- ...ection-method-listSearchIndexes-param.yaml | 4 - ...oDBCollection-method-mapReduce-option.yaml | 113 ------ ...goDBCollection-method-mapReduce-param.yaml | 46 --- ...ongoDBCollection-method-rename-option.yaml | 33 -- ...MongoDBCollection-method-rename-param.yaml | 25 -- ...DBCollection-method-replaceOne-option.yaml | 46 --- ...oDBCollection-method-replaceOne-param.yaml | 15 - ...DBCollection-method-updateMany-option.yaml | 52 --- ...oDBCollection-method-updateMany-param.yaml | 15 - ...oDBCollection-method-updateOne-option.yaml | 52 --- ...goDBCollection-method-updateOne-param.yaml | 15 - ...ction-method-updateSearchIndex-option.yaml | 4 - ...ection-method-updateSearchIndex-param.yaml | 25 -- ...MongoDBCollection-method-watch-option.yaml | 73 ---- ...-MongoDBCollection-method-watch-param.yaml | 8 - ...BCollection-method-withOptions-option.yaml | 27 -- ...DBCollection-method-withOptions-param.yaml | 4 - ...apiargs-MongoDBDatabase-common-option.yaml | 36 -- ...ngoDBDatabase-method-aggregate-option.yaml | 64 --- ...ongoDBDatabase-method-aggregate-param.yaml | 14 - ...MongoDBDatabase-method-command-option.yaml | 17 - ...-MongoDBDatabase-method-command-param.yaml | 13 - ...ngoDBDatabase-method-construct-option.yaml | 25 -- ...ongoDBDatabase-method-construct-param.yaml | 12 - ...tabase-method-createCollection-option.yaml | 363 ------------------ ...atabase-method-createCollection-param.yaml | 10 - ...ethod-createEncryptedCollection-param.yaml | 47 --- ...gs-MongoDBDatabase-method-drop-option.yaml | 25 -- ...rgs-MongoDBDatabase-method-drop-param.yaml | 4 - ...Database-method-dropCollection-option.yaml | 31 -- ...BDatabase-method-dropCollection-param.yaml | 10 - ...args-MongoDBDatabase-method-get-param.yaml | 6 - ...atabase-method-listCollections-option.yaml | 46 --- ...Database-method-listCollections-param.yaml | 4 - ...tabase-method-modifyCollection-option.yaml | 23 -- ...atabase-method-modifyCollection-param.yaml | 20 - ...tabase-method-renameCollection-option.yaml | 33 -- ...atabase-method-renameCollection-param.yaml | 34 -- ...tabase-method-selectCollection-option.yaml | 27 -- ...atabase-method-selectCollection-param.yaml | 10 - ...base-method-selectGridFSBucket-option.yaml | 52 --- ...abase-method-selectGridFSBucket-param.yaml | 4 - ...s-MongoDBDatabase-method-watch-option.yaml | 71 ---- ...gs-MongoDBDatabase-method-watch-param.yaml | 8 - ...oDBDatabase-method-withOptions-option.yaml | 27 -- ...goDBDatabase-method-withOptions-param.yaml | 4 - ...rgs-MongoDBGridFSBucket-common-option.yaml | 61 --- ...args-MongoDBGridFSBucket-common-param.yaml | 39 -- ...BGridFSBucket-method-construct-option.yaml | 50 --- ...DBGridFSBucket-method-construct-param.yaml | 12 - ...ngoDBGridFSBucket-method-delete-param.yaml | 6 - ...SBucket-method-downloadToStream-param.yaml | 10 - ...-method-downloadToStreamByName-option.yaml | 4 - ...t-method-downloadToStreamByName-param.yaml | 14 - ...ongoDBGridFSBucket-method-find-option.yaml | 76 ---- ...oDBGridFSBucket-method-findOne-option.yaml | 46 --- ...method-getFileDocumentForStream-param.yaml | 4 - ...ucket-method-getFileIdForStream-param.yaml | 4 - ...ucket-method-openDownloadStream-param.yaml | 6 - ...ethod-openDownloadStreamByName-option.yaml | 4 - ...method-openDownloadStreamByName-param.yaml | 10 - ...Bucket-method-openUploadStream-option.yaml | 18 - ...SBucket-method-openUploadStream-param.yaml | 10 - ...ngoDBGridFSBucket-method-rename-param.yaml | 15 - ...Bucket-method-uploadFromStream-option.yaml | 18 - ...SBucket-method-uploadFromStream-param.yaml | 19 - docs/includes/apiargs-aggregate-option.yaml | 43 --- docs/includes/apiargs-common-option.yaml | 124 ------ docs/includes/apiargs-common-param.yaml | 42 -- .../apiargs-dropCollection-option.yaml | 21 - .../apiargs-function-add_logger-param.yaml | 11 - .../apiargs-function-remove_logger-param.yaml | 11 - ...iargs-function-with_transaction-param.yaml | 31 -- .../includes/apiargs-method-watch-option.yaml | 178 --------- docs/includes/apiargs-method-watch-param.yaml | 13 - 147 files changed, 4886 deletions(-) delete mode 100644 docs/includes/apiargs-MongoDBClient-common-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBClient-method-addSubscriber-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBClient-method-construct-driverOptions.yaml delete mode 100644 docs/includes/apiargs-MongoDBClient-method-construct-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBClient-method-createClientEncryption-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBClient-method-dropDatabase-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBClient-method-dropDatabase-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBClient-method-get-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBClient-method-listDatabases-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBClient-method-listDatabases-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBClient-method-removeSubscriber-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBClient-method-selectCollection-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBClient-method-selectCollection-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBClient-method-selectDatabase-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBClient-method-selectDatabase-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBClient-method-watch-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBClient-method-watch-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-common-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-common-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-aggregate-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-aggregate-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-bulkWrite-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-bulkWrite-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-construct-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-construct-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-count-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-count-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-countDocuments-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-countDocuments-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-createIndex-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-createIndex-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-createIndexes-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-createIndexes-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-createSearchIndex-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-createSearchIndex-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-createSearchIndexes-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-createSearchIndexes-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-deleteMany-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-deleteMany-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-deleteOne-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-deleteOne-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-distinct-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-distinct-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-drop-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-drop-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-dropIndex-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-dropIndex-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-dropIndexes-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-dropIndexes-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-dropSearchIndex-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-dropSearchIndex-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-estimateDocumentCount-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-estimateDocumentCount-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-explain-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-explain-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-find-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-find-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-findOne-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-findOne-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-findOneAndDelete-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-findOneAndDelete-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-findOneAndReplace-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-findOneAndReplace-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-findOneAndUpdate-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-findOneAndUpdate-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-insertMany-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-insertMany-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-insertOne-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-insertOne-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-listIndexes-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-listIndexes-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-listSearchIndexes-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-listSearchIndexes-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-mapReduce-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-mapReduce-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-rename-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-rename-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-replaceOne-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-replaceOne-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-updateMany-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-updateMany-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-updateOne-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-updateOne-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-updateSearchIndex-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-updateSearchIndex-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-watch-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-watch-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-withOptions-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBCollection-method-withOptions-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBDatabase-common-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBDatabase-method-aggregate-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBDatabase-method-aggregate-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBDatabase-method-command-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBDatabase-method-command-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBDatabase-method-construct-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBDatabase-method-construct-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBDatabase-method-createCollection-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBDatabase-method-createCollection-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBDatabase-method-createEncryptedCollection-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBDatabase-method-drop-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBDatabase-method-drop-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBDatabase-method-dropCollection-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBDatabase-method-dropCollection-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBDatabase-method-get-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBDatabase-method-listCollections-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBDatabase-method-listCollections-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBDatabase-method-modifyCollection-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBDatabase-method-modifyCollection-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBDatabase-method-renameCollection-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBDatabase-method-renameCollection-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBDatabase-method-selectCollection-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBDatabase-method-selectCollection-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBDatabase-method-selectGridFSBucket-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBDatabase-method-selectGridFSBucket-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBDatabase-method-watch-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBDatabase-method-watch-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBDatabase-method-withOptions-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBDatabase-method-withOptions-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBGridFSBucket-common-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBGridFSBucket-common-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBGridFSBucket-method-construct-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBGridFSBucket-method-construct-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBGridFSBucket-method-delete-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBGridFSBucket-method-downloadToStream-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBGridFSBucket-method-downloadToStreamByName-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBGridFSBucket-method-downloadToStreamByName-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBGridFSBucket-method-find-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBGridFSBucket-method-findOne-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBGridFSBucket-method-getFileDocumentForStream-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBGridFSBucket-method-getFileIdForStream-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBGridFSBucket-method-openDownloadStream-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBGridFSBucket-method-openDownloadStreamByName-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBGridFSBucket-method-openDownloadStreamByName-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBGridFSBucket-method-openUploadStream-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBGridFSBucket-method-openUploadStream-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBGridFSBucket-method-rename-param.yaml delete mode 100644 docs/includes/apiargs-MongoDBGridFSBucket-method-uploadFromStream-option.yaml delete mode 100644 docs/includes/apiargs-MongoDBGridFSBucket-method-uploadFromStream-param.yaml delete mode 100644 docs/includes/apiargs-aggregate-option.yaml delete mode 100644 docs/includes/apiargs-common-option.yaml delete mode 100644 docs/includes/apiargs-common-param.yaml delete mode 100644 docs/includes/apiargs-dropCollection-option.yaml delete mode 100644 docs/includes/apiargs-function-add_logger-param.yaml delete mode 100644 docs/includes/apiargs-function-remove_logger-param.yaml delete mode 100644 docs/includes/apiargs-function-with_transaction-param.yaml delete mode 100644 docs/includes/apiargs-method-watch-option.yaml delete mode 100644 docs/includes/apiargs-method-watch-param.yaml diff --git a/docs/includes/apiargs-MongoDBClient-common-option.yaml b/docs/includes/apiargs-MongoDBClient-common-option.yaml deleted file mode 100644 index 4ffc52a92..000000000 --- a/docs/includes/apiargs-MongoDBClient-common-option.yaml +++ /dev/null @@ -1,34 +0,0 @@ -arg_name: option -name: readConcern -type: :php:`MongoDB\\Driver\\ReadConcern ` -description: | - :manual:`Read concern ` to use for the operation. - Defaults to the client's read concern. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: readPreference -type: :php:`MongoDB\\Driver\\ReadPreference ` -description: | - :manual:`Read preference ` to use for the - operation. Defaults to the client's read preference. -interface: phpmethod -operation: ~ -optional: true ---- -source: - file: apiargs-common-option.yaml - ref: typeMap ---- -arg_name: option -name: writeConcern -type: :php:`MongoDB\\Driver\\WriteConcern ` -description: | - :manual:`Write concern ` to use for the operation. - Defaults to the client's write concern. -interface: phpmethod -operation: ~ -optional: true -... diff --git a/docs/includes/apiargs-MongoDBClient-method-addSubscriber-param.yaml b/docs/includes/apiargs-MongoDBClient-method-addSubscriber-param.yaml deleted file mode 100644 index 27de61506..000000000 --- a/docs/includes/apiargs-MongoDBClient-method-addSubscriber-param.yaml +++ /dev/null @@ -1,9 +0,0 @@ -arg_name: param -name: $subscriber -type: :php:`MongoDB\\Driver\\Monitoring\\Subscriber ` -description: | - A monitoring event subscriber to register with this Client. -interface: phpmethod -operation: ~ -optional: false -... diff --git a/docs/includes/apiargs-MongoDBClient-method-construct-driverOptions.yaml b/docs/includes/apiargs-MongoDBClient-method-construct-driverOptions.yaml deleted file mode 100644 index 8406bd091..000000000 --- a/docs/includes/apiargs-MongoDBClient-method-construct-driverOptions.yaml +++ /dev/null @@ -1,189 +0,0 @@ -arg_name: option -name: autoEncryption -type: array -description: | - Options to configure client-side field-level encryption in the driver. The - encryption options are documented in the :php:`extension documentation - `. - For the ``keyVaultClient`` option, you may pass a :phpclass:`MongoDB\\Client` - instance, which will be unwrapped to provide a :php:`MongoDB\\Driver\\Manager ` - to the extension. - - .. versionadded:: 1.6 -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: driver -type: array -description: | - Additional driver metadata to be passed on to the server handshake. This is an - array containing ``name``, ``version``, and ``platform`` fields: - - .. code-block:: php - - [ - 'name' => 'my-driver', - 'version' => '1.2.3-dev', - 'platform' => 'some-platform', - ] - - .. note:: - - This feature is primarily designed for custom drivers and ODMs, which may - want to identify themselves to the server for diagnostic purposes. - Applications should use the ``appName`` URI option instead of driver - metadata. - - .. versionadded:: 1.7 -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: serverApi -type: :php:`MongoDB\\Driver\\ServerApi ` -description: | - Used to declare an API version on the client. See the - :manual:`Stable API tutorial ` for usage. - - .. versionadded:: 1.9 -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: typeMap -type: array -description: | - Default :php:`type map - ` - to apply to cursors, which determines how BSON documents are converted to PHP - values. The |php-library| uses the following type map by default: - - .. code-block:: php - - [ - 'array' => 'MongoDB\Model\BSONArray', - 'document' => 'MongoDB\Model\BSONDocument', - 'root' => 'MongoDB\Model\BSONDocument', - ] -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: allow_invalid_hostname -type: boolean -description: | - Disables hostname validation if ``true``. Defaults to ``false``. - - Allowing invalid hostnames may expose the driver to a `man-in-the-middle - attack `_. - - .. deprecated:: 1.6 - This option has been deprecated. Use the ``tlsAllowInvalidHostnames`` URI - option instead. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: ca_dir -type: string -description: | - Path to a correctly hashed certificate directory. The system certificate store - will be used by default. - - Falls back to the deprecated ``capath`` SSL context option if not specified. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: ca_file -type: string -description: | - Path to a certificate authority file. The system certificate store will be - used by default. - - Falls back to the deprecated ``cafile`` SSL context option if not specified. - - .. deprecated:: 1.6 - This option has been deprecated. Use the ``tlsCAFile`` URI option instead. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: crl_file -type: string -description: | - Path to a certificate revocation list file. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: pem_file -type: string -description: | - Path to a PEM encoded certificate to use for client authentication. - - Falls back to the deprecated ``local_cert`` SSL context option if not - specified. - - .. deprecated:: 1.6 - This option has been deprecated. Use the ``tlsCertificateKeyFile`` URI - option instead. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: pem_pwd -type: string -description: | - Passphrase for the PEM encoded certificate (if applicable). - - Falls back to the deprecated ``passphrase`` SSL context option if not - specified. - - .. deprecated:: 1.6 - This option has been deprecated. Use the ``tlsCertificateKeyFilePassword`` - URI option instead. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: weak_cert_validation -type: boolean -description: | - Disables certificate validation ``true``. Defaults to ``false``. - - Falls back to the deprecated ``allow_self_signed`` SSL context option if not - specified. - - .. deprecated:: 1.6 - This option has been deprecated. Use the ``tlsAllowInvalidCertificates`` - URI option instead. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: context -type: resource -description: | - :php:`SSL context options ` to be used as fallbacks - for other driver options (as specified). Note that the driver does not consult - the default stream context. - - This option is supported for backwards compatibility, but should be considered - deprecated. -interface: phpmethod -operation: ~ -optional: true -... diff --git a/docs/includes/apiargs-MongoDBClient-method-construct-param.yaml b/docs/includes/apiargs-MongoDBClient-method-construct-param.yaml deleted file mode 100644 index 62998287e..000000000 --- a/docs/includes/apiargs-MongoDBClient-method-construct-param.yaml +++ /dev/null @@ -1,51 +0,0 @@ -arg_name: param -name: $uri -type: string -description: | - The URI of the standalone, replica set, or sharded cluster to which to - connect. Refer to :manual:`Connection String URI Format - ` in the MongoDB manual for more information. - - Defaults to ``"mongodb://127.0.0.1:27017"`` if unspecified. - - Any special characters in the URI components need to be encoded according to - `RFC 3986 `_. This is particularly - relevant to the username and password, which can often include special - characters such as ``@``, ``:``, or ``%``. When connecting via a Unix domain - socket, the socket path may contain special characters such as slashes and - must be encoded. The :php:`rawurlencode() ` function may be used - to encode constituent parts of the URI. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: param -name: $uriOptions -type: array -description: | - Specifies additional URI options, such as authentication credentials or query - string parameters. The options specified in ``$uriOptions`` take precedence - over any analogous options present in the ``$uri`` string and do not need to - be encoded according to `RFC 3986 `_. - - Refer to the :php:`MongoDB\\Driver\\Manager::__construct() - ` extension reference and :manual:`MongoDB - connection string ` documentation for accepted - options. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: param -name: $driverOptions -type: array -description: | - Specify driver-specific options, such as SSL options. In addition to any - options supported by the :php:`extension `, the - |php-library| allows you to specify a default :php:`type map - ` - to apply to the cursors it creates. -interface: phpmethod -operation: ~ -optional: true -... diff --git a/docs/includes/apiargs-MongoDBClient-method-createClientEncryption-param.yaml b/docs/includes/apiargs-MongoDBClient-method-createClientEncryption-param.yaml deleted file mode 100644 index 73ad04d0b..000000000 --- a/docs/includes/apiargs-MongoDBClient-method-createClientEncryption-param.yaml +++ /dev/null @@ -1,4 +0,0 @@ -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBClient-method-dropDatabase-option.yaml b/docs/includes/apiargs-MongoDBClient-method-dropDatabase-option.yaml deleted file mode 100644 index be0a19aa9..000000000 --- a/docs/includes/apiargs-MongoDBClient-method-dropDatabase-option.yaml +++ /dev/null @@ -1,25 +0,0 @@ -source: - file: apiargs-common-option.yaml - ref: comment -post: | - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.13 ---- -source: - file: apiargs-common-option.yaml - ref: session -post: | - .. versionadded:: 1.3 ---- -source: - file: apiargs-common-option.yaml - ref: typeMap -post: | - This will be used for the returned command result document. ---- -source: - file: apiargs-MongoDBClient-common-option.yaml - ref: writeConcern -... diff --git a/docs/includes/apiargs-MongoDBClient-method-dropDatabase-param.yaml b/docs/includes/apiargs-MongoDBClient-method-dropDatabase-param.yaml deleted file mode 100644 index 07b768348..000000000 --- a/docs/includes/apiargs-MongoDBClient-method-dropDatabase-param.yaml +++ /dev/null @@ -1,10 +0,0 @@ -source: - file: apiargs-common-param.yaml - ref: $databaseName -replacement: - action: " to drop" ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBClient-method-get-param.yaml b/docs/includes/apiargs-MongoDBClient-method-get-param.yaml deleted file mode 100644 index e9d3ccc6c..000000000 --- a/docs/includes/apiargs-MongoDBClient-method-get-param.yaml +++ /dev/null @@ -1,6 +0,0 @@ -source: - file: apiargs-common-param.yaml - ref: $databaseName -replacement: - action: " to select" -... diff --git a/docs/includes/apiargs-MongoDBClient-method-listDatabases-option.yaml b/docs/includes/apiargs-MongoDBClient-method-listDatabases-option.yaml deleted file mode 100644 index 38baf93ad..000000000 --- a/docs/includes/apiargs-MongoDBClient-method-listDatabases-option.yaml +++ /dev/null @@ -1,47 +0,0 @@ -arg_name: option -name: authorizedDatabases -type: boolean -description: | - A flag that determines which databases are returned based on the user - privileges when access control is enabled. For more information, see the - `listDatabases command documentation `_. - - For servers < 4.0.5, this option is ignored. - - .. versionadded:: 1.7 -interface: phpmethod -operation: ~ -optional: true ---- -source: - file: apiargs-common-option.yaml - ref: comment -post: | - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.13 ---- -arg_name: option -name: filter -type: array|object -description: | - A query expression to filter the list of databases. - - You can specify a query expression for database fields (e.g. ``name``, - ``sizeOnDisk``, ``empty``). - - .. versionadded:: 1.3 -interface: phpmethod -operation: ~ -optional: true ---- -source: - file: apiargs-common-option.yaml - ref: maxTimeMS ---- -source: - file: apiargs-common-option.yaml - ref: session -post: | - .. versionadded:: 1.3 diff --git a/docs/includes/apiargs-MongoDBClient-method-listDatabases-param.yaml b/docs/includes/apiargs-MongoDBClient-method-listDatabases-param.yaml deleted file mode 100644 index 73ad04d0b..000000000 --- a/docs/includes/apiargs-MongoDBClient-method-listDatabases-param.yaml +++ /dev/null @@ -1,4 +0,0 @@ -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBClient-method-removeSubscriber-param.yaml b/docs/includes/apiargs-MongoDBClient-method-removeSubscriber-param.yaml deleted file mode 100644 index eaeec4fdf..000000000 --- a/docs/includes/apiargs-MongoDBClient-method-removeSubscriber-param.yaml +++ /dev/null @@ -1,9 +0,0 @@ -arg_name: param -name: $subscriber -type: :php:`MongoDB\\Driver\\Monitoring\\Subscriber ` -description: | - A monitoring event subscriber to unregister with this Client. -interface: phpmethod -operation: ~ -optional: false -... diff --git a/docs/includes/apiargs-MongoDBClient-method-selectCollection-option.yaml b/docs/includes/apiargs-MongoDBClient-method-selectCollection-option.yaml deleted file mode 100644 index d81d31811..000000000 --- a/docs/includes/apiargs-MongoDBClient-method-selectCollection-option.yaml +++ /dev/null @@ -1,27 +0,0 @@ -source: - file: apiargs-common-option.yaml - ref: readConcern -replacement: - resource: "collection" - parent: "client" ---- -source: - file: apiargs-common-option.yaml - ref: readPreference -replacement: - resource: "collection" - parent: "client" ---- -source: - file: apiargs-common-option.yaml - ref: typeMap -replacement: - parent: "client" ---- -source: - file: apiargs-common-option.yaml - ref: writeConcern -replacement: - resource: "collection" - parent: "client" -... diff --git a/docs/includes/apiargs-MongoDBClient-method-selectCollection-param.yaml b/docs/includes/apiargs-MongoDBClient-method-selectCollection-param.yaml deleted file mode 100644 index 99c764460..000000000 --- a/docs/includes/apiargs-MongoDBClient-method-selectCollection-param.yaml +++ /dev/null @@ -1,16 +0,0 @@ -source: - file: apiargs-common-param.yaml - ref: $databaseName -replacement: - action: " containing the collection to select" ---- -source: - file: apiargs-common-param.yaml - ref: $collectionName -replacement: - action: " to select" ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBClient-method-selectDatabase-option.yaml b/docs/includes/apiargs-MongoDBClient-method-selectDatabase-option.yaml deleted file mode 100644 index e4ffd3c66..000000000 --- a/docs/includes/apiargs-MongoDBClient-method-selectDatabase-option.yaml +++ /dev/null @@ -1,27 +0,0 @@ -source: - file: apiargs-common-option.yaml - ref: readConcern -replacement: - resource: "database" - parent: "client" ---- -source: - file: apiargs-common-option.yaml - ref: readPreference -replacement: - resource: "database" - parent: "client" ---- -source: - file: apiargs-common-option.yaml - ref: typeMap -replacement: - parent: "client" ---- -source: - file: apiargs-common-option.yaml - ref: writeConcern -replacement: - resource: "database" - parent: "client" -... diff --git a/docs/includes/apiargs-MongoDBClient-method-selectDatabase-param.yaml b/docs/includes/apiargs-MongoDBClient-method-selectDatabase-param.yaml deleted file mode 100644 index 8e5f9d45f..000000000 --- a/docs/includes/apiargs-MongoDBClient-method-selectDatabase-param.yaml +++ /dev/null @@ -1,10 +0,0 @@ -source: - file: apiargs-common-param.yaml - ref: $databaseName -replacement: - action: " to select" ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBClient-method-watch-option.yaml b/docs/includes/apiargs-MongoDBClient-method-watch-option.yaml deleted file mode 100644 index cad9c3f75..000000000 --- a/docs/includes/apiargs-MongoDBClient-method-watch-option.yaml +++ /dev/null @@ -1,71 +0,0 @@ ---- -source: - file: apiargs-method-watch-option.yaml - ref: batchSize ---- -source: - file: apiargs-common-option.yaml - ref: collation ---- -source: - file: apiargs-common-option.yaml - ref: comment -post: | - The comment can be any valid BSON type for server versions 4.4 and above. - Earlier server versions only support string values. - - .. versionadded:: 1.13 ---- -source: - file: apiargs-method-watch-option.yaml - ref: fullDocument ---- -source: - file: apiargs-method-watch-option.yaml - ref: fullDocumentBeforeChange -post: | - .. versionadded: 1.13 ---- -source: - file: apiargs-method-watch-option.yaml - ref: maxAwaitTimeMS ---- -source: - file: apiargs-MongoDBClient-common-option.yaml - ref: readConcern ---- -source: - file: apiargs-MongoDBClient-common-option.yaml - ref: readPreference -post: | - This is used for both the initial change stream aggregation and for - server selection during an automatic resume. ---- -source: - file: apiargs-method-watch-option.yaml - ref: resumeAfter ---- -source: - file: apiargs-common-option.yaml - ref: session ---- -source: - file: apiargs-method-watch-option.yaml - ref: showExpandedEvents -post: | - .. versionadded:: 1.13 ---- -source: - file: apiargs-method-watch-option.yaml - ref: startAfter -post: | - .. versionadded: 1.5 ---- -source: - file: apiargs-method-watch-option.yaml - ref: startAtOperationTime ---- -source: - file: apiargs-MongoDBClient-common-option.yaml - ref: typeMap -... diff --git a/docs/includes/apiargs-MongoDBClient-method-watch-param.yaml b/docs/includes/apiargs-MongoDBClient-method-watch-param.yaml deleted file mode 100644 index b00e450cf..000000000 --- a/docs/includes/apiargs-MongoDBClient-method-watch-param.yaml +++ /dev/null @@ -1,8 +0,0 @@ -source: - file: apiargs-method-watch-param.yaml - ref: $pipeline ---- -source: - file: apiargs-method-watch-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBCollection-common-option.yaml b/docs/includes/apiargs-MongoDBCollection-common-option.yaml deleted file mode 100644 index fb919ea42..000000000 --- a/docs/includes/apiargs-MongoDBCollection-common-option.yaml +++ /dev/null @@ -1,86 +0,0 @@ -arg_name: option -name: arrayFilters -type: array -description: | - An array of filter documents that determines which array elements to modify - for an update operation on an array field. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: bypassDocumentValidation -type: boolean -description: | - If ``true``, allows the write operation to circumvent document level - validation. Defaults to ``false``. -interface: phpmethod -operation: ~ -optional: true ---- -source: - file: apiargs-common-option.yaml - ref: collation -post: | - If the collation is unspecified but the collection has a default collation, - the operation uses the collation specified for the collection. If no - collation is specified for the collection or for the operation, MongoDB uses - the simple binary comparison used in prior versions for string comparisons. ---- -arg_name: option -name: readConcern -type: :php:`MongoDB\\Driver\\ReadConcern ` -description: | - :manual:`Read concern ` to use for the operation. - Defaults to the collection's read concern. - - It is not possible to specify a :manual:`read concern - ` for individual operations as part of a - transaction. Instead, set the ``readConcern`` option when starting the - transaction with :php:`startTransaction `. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: readPreference -type: :php:`MongoDB\\Driver\\ReadPreference ` -description: | - :manual:`Read preference ` to use for the - operation. Defaults to the collection's read preference. -interface: phpmethod -operation: ~ -optional: true ---- -source: - file: apiargs-common-option.yaml - ref: typeMap -replacement: - parent: "collection" ---- -arg_name: option -name: writeConcern -type: :php:`MongoDB\\Driver\\WriteConcern ` -description: | - :manual:`Write concern ` to use for the operation. - Defaults to the collection's write concern. - - It is not possible to specify a :manual:`write concern - ` for individual operations as part of a - transaction. Instead, set the ``writeConcern`` option when starting the - transaction with :php:`startTransaction `. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: upsert -type: boolean -description: | - If set to ``true``, creates a new document when no document matches the query - criteria. The default value is ``false``, which does not insert a new - document when no match is found. -interface: phpmethod -operation: ~ -optional: true -... diff --git a/docs/includes/apiargs-MongoDBCollection-common-param.yaml b/docs/includes/apiargs-MongoDBCollection-common-param.yaml deleted file mode 100644 index 47100d19a..000000000 --- a/docs/includes/apiargs-MongoDBCollection-common-param.yaml +++ /dev/null @@ -1,33 +0,0 @@ -arg_name: param -name: $filter -type: array|object -description: | - The filter criteria that specifies the documents{{action}}. -interface: phpmethod -operation: ~ -optional: false -replacement: - action: "" ---- -arg_name: param -name: $replacement -type: array|object -description: | - The replacement document. -interface: phpmethod -operation: ~ -optional: false ---- -arg_name: param -name: $update -type: array|object -description: | - Specifies the field and value combinations to update and any relevant update - operators. ``$update`` uses MongoDB's :method:`update operators - `. Starting with MongoDB 4.2, an `aggregation - pipeline `_ - can be passed as this parameter. -interface: phpmethod -operation: ~ -optional: false -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-aggregate-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-aggregate-option.yaml deleted file mode 100644 index a299eefa1..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-aggregate-option.yaml +++ /dev/null @@ -1,72 +0,0 @@ -source: - file: apiargs-aggregate-option.yaml - ref: allowDiskUse ---- -source: - file: apiargs-aggregate-option.yaml - ref: batchSize ---- -source: - file: apiargs-aggregate-option.yaml - ref: bypassDocumentValidation ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: collation ---- -source: - file: apiargs-common-option.yaml - ref: comment -post: | - The comment can be any valid BSON type for server versions 4.4 and above. - Earlier server versions only support string values. - - .. versionadded:: 1.3 ---- -source: - file: apiargs-aggregate-option.yaml - ref: explain -post: | - .. versionadded:: 1.4 ---- -source: - file: apiargs-common-option.yaml - ref: hint -post: | - .. versionadded:: 1.3 ---- -source: - file: apiargs-common-option.yaml - ref: let -post: | - .. versionadded:: 1.9 ---- -source: - file: apiargs-common-option.yaml - ref: maxTimeMS ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: readConcern ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: readPreference ---- -source: - file: apiargs-common-option.yaml - ref: session -post: | - .. versionadded:: 1.3 ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: typeMap ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: writeConcern -post: | - This only applies when a :ref:`$out ` or :ref:`$merge ` - stage is specified. -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-aggregate-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-aggregate-param.yaml deleted file mode 100644 index cbad3b49b..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-aggregate-param.yaml +++ /dev/null @@ -1,14 +0,0 @@ -arg_name: param -name: $pipeline -type: array -description: | - Specifies an :manual:`aggregation pipeline ` - operation. -interface: phpmethod -operation: ~ -optional: false ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-bulkWrite-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-bulkWrite-option.yaml deleted file mode 100644 index 25d8e24d3..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-bulkWrite-option.yaml +++ /dev/null @@ -1,44 +0,0 @@ -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: bypassDocumentValidation ---- -source: - file: apiargs-common-option.yaml - ref: comment -post: | - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.13 ---- -source: - file: apiargs-common-option.yaml - ref: let -post: | - .. versionadded:: 1.13 ---- -arg_name: option -name: ordered -type: boolean -description: | - If ``true``: when a single write fails, the operation will stop without - performing the remaining writes and throw an exception. - - If ``false``: when a single write fails, the operation will continue with the - remaining writes, if any, and throw an exception. - - The default is ``true``. -interface: phpmethod -operation: ~ -optional: true ---- -source: - file: apiargs-common-option.yaml - ref: session -post: | - .. versionadded:: 1.3 ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: writeConcern -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-bulkWrite-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-bulkWrite-param.yaml deleted file mode 100644 index 79423a637..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-bulkWrite-param.yaml +++ /dev/null @@ -1,37 +0,0 @@ -arg_name: param -name: $operations -type: array -description: | - An array containing the write operations to perform. - :phpmethod:`MongoDB\\Collection::bulkWrite()` supports - :phpmethod:`deleteMany() `, - :phpmethod:`deleteOne() `, - :phpmethod:`insertOne() `, - :phpmethod:`replaceOne() `, - :phpmethod:`updateMany() `, and - :phpmethod:`updateOne() ` operations in the - following array structure: - - .. code-block:: php - - [ - [ 'deleteMany' => [ $filter ] ], - [ 'deleteOne' => [ $filter ] ], - [ 'insertOne' => [ $document ] ], - [ 'replaceOne' => [ $filter, $replacement, $options ] ], - [ 'updateMany' => [ $filter, $update, $options ] ], - [ 'updateOne' => [ $filter, $update, $options ] ], - ] - - Arguments correspond to the respective operation methods. However, the - ``writeConcern`` option is specified as a top-level option to - :phpmethod:`MongoDB\\Collection::bulkWrite()` instead of each individual - operation. -interface: phpmethod -operation: ~ -optional: true ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-construct-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-construct-option.yaml deleted file mode 100644 index 7d422ca05..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-construct-option.yaml +++ /dev/null @@ -1,25 +0,0 @@ -source: - file: apiargs-common-option.yaml - ref: readConcern -replacement: - resource: "collection" - parent: "manager" ---- -source: - file: apiargs-common-option.yaml - ref: readPreference -replacement: - resource: "collection" - parent: "manager" ---- -source: - file: apiargs-MongoDBClient-method-construct-driverOptions.yaml - ref: typeMap ---- -source: - file: apiargs-common-option.yaml - ref: writeConcern -replacement: - resource: "collection" - parent: "manager" -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-construct-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-construct-param.yaml deleted file mode 100644 index 0827800ba..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-construct-param.yaml +++ /dev/null @@ -1,16 +0,0 @@ -source: - file: apiargs-common-param.yaml - ref: $manager ---- -source: - file: apiargs-common-param.yaml - ref: $databaseName ---- -source: - file: apiargs-common-param.yaml - ref: $collectionName ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-count-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-count-option.yaml deleted file mode 100644 index 3d839e04a..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-count-option.yaml +++ /dev/null @@ -1,64 +0,0 @@ -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: collation ---- -source: - file: apiargs-common-option.yaml - ref: comment -post: | - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.13 ---- -arg_name: option -name: hint -type: string|array|object -description: | - The index to use. Specify either the index name as a string or the index key - pattern as a document. If specified, then the query system will only consider - plans using the hinted index. - - .. versionchanged:: 1.2 - If a document is provided, it is passed to the command as-is. Previously, - the library would convert the key pattern to an index name. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: limit -type: integer -description: | - The maximum number of matching documents to return. -interface: phpmethod -operation: ~ -optional: true ---- -source: - file: apiargs-common-option.yaml - ref: maxTimeMS ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: readConcern ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: readPreference ---- -source: - file: apiargs-common-option.yaml - ref: session -post: | - .. versionadded:: 1.3 ---- -arg_name: option -name: skip -type: integer -description: | - The number of matching documents to skip before returning results. -interface: phpmethod -operation: ~ -optional: true -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-count-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-count-param.yaml deleted file mode 100644 index e18c616bc..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-count-param.yaml +++ /dev/null @@ -1,11 +0,0 @@ -source: - file: apiargs-MongoDBCollection-common-param.yaml - ref: $filter -optional: true -replacement: - action: " to count" ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-countDocuments-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-countDocuments-option.yaml deleted file mode 100644 index da1f01138..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-countDocuments-option.yaml +++ /dev/null @@ -1,56 +0,0 @@ -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: collation ---- -source: - file: apiargs-common-option.yaml - ref: comment -post: | - The comment can be any valid BSON type for server versions 4.4 and above. - Earlier server versions only support string values. ---- -arg_name: option -name: hint -type: string|array|object -description: | - The index to use. Specify either the index name as a string or the index key - pattern as a document. If specified, then the query system will only consider - plans using the hinted index. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: limit -type: integer -description: | - The maximum number of matching documents to return. -interface: phpmethod -operation: ~ -optional: true ---- -source: - file: apiargs-common-option.yaml - ref: maxTimeMS ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: readConcern ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: readPreference ---- -source: - file: apiargs-common-option.yaml - ref: session ---- -arg_name: option -name: skip -type: integer -description: | - The number of matching documents to skip before returning results. -interface: phpmethod -operation: ~ -optional: true -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-countDocuments-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-countDocuments-param.yaml deleted file mode 100644 index e18c616bc..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-countDocuments-param.yaml +++ /dev/null @@ -1,11 +0,0 @@ -source: - file: apiargs-MongoDBCollection-common-param.yaml - ref: $filter -optional: true -replacement: - action: " to count" ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-createIndex-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-createIndex-option.yaml deleted file mode 100644 index 182837674..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-createIndex-option.yaml +++ /dev/null @@ -1,117 +0,0 @@ -arg_name: option -name: commitQuorum -type: string|integer -description: | - Specifies how many data-bearing members of a replica set, including the - primary, must complete the index builds successfully before the primary marks - the indexes as ready. - - This option accepts the same values for the ``w`` field in a write concern - plus ``"votingMembers"``, which indicates all voting data-bearing nodes. - - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.7 -interface: phpmethod -operation: ~ -optional: true ---- -source: - file: apiargs-common-option.yaml - ref: comment -post: | - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.13 ---- -arg_name: option -name: unique -type: boolean -description: | - Creates a :manual:`unique ` index. -interface: phpmethod -operation: ~ -optional: true ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: collation -pre: | - Specifies the :manual:`collation - ` for the index. ---- -arg_name: option -name: partialFilterExpression -type: array|object -description: | - Creates a :manual:`partial ` index. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: sparse -type: boolean -description: | - Creates a :manual:`sparse ` index. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: expireAfterSeconds -type: integer -description: | - Creates a :manual:`TTL ` index. -interface: phpmethod -operation: ~ -optional: true ---- -source: - file: apiargs-common-option.yaml - ref: maxTimeMS -post: | - .. versionadded:: 1.3 ---- -arg_name: option -name: name -type: string -description: | - A name that uniquely identifies the index. By default, MongoDB creates index - names based on the key. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: background -type: string -description: | - Instructs MongoDB to build the index :manual:`as a background - ` process. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: 2dsphereIndexVersion -type: integer -description: | - Overrides the server's default version for a :manual:`2dsphere - ` index. -interface: phpmethod -operation: ~ -optional: true ---- -source: - file: apiargs-common-option.yaml - ref: session -post: | - .. versionadded:: 1.3 ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: writeConcern -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-createIndex-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-createIndex-param.yaml deleted file mode 100644 index c2979d913..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-createIndex-param.yaml +++ /dev/null @@ -1,20 +0,0 @@ -arg_name: param -name: $key -type: array|object -description: | - Specifies the field or fields to index and the index order. - - For example, the following specifies a descending index on the ``username`` - field: - - .. code-block:: php - - [ 'username' => -1 ] -interface: phpmethod -operation: ~ -optional: false ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-createIndexes-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-createIndexes-option.yaml deleted file mode 100644 index 54c33bfa0..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-createIndexes-option.yaml +++ /dev/null @@ -1,29 +0,0 @@ -source: - file: apiargs-common-option.yaml - ref: comment -post: | - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.13 ---- -source: - file: apiargs-MongoDBCollection-method-createIndex-option.yaml - ref: commitQuorum ---- -source: - file: apiargs-common-option.yaml - ref: maxTimeMS -post: | - .. versionadded:: 1.3 ---- -source: - file: apiargs-common-option.yaml - ref: session -post: | - .. versionadded:: 1.3 ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: writeConcern -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-createIndexes-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-createIndexes-param.yaml deleted file mode 100644 index e98d9aad0..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-createIndexes-param.yaml +++ /dev/null @@ -1,23 +0,0 @@ -arg_name: param -name: $indexes -type: array -description: | - The indexes to create on the collection. - - For example, the following specifies a unique index on the ``username`` field - and a compound index on the ``email`` and ``createdAt`` fields: - - .. code-block:: php - - [ - [ 'key' => [ 'username' => -1 ], 'unique' => true ], - [ 'key' => [ 'email' => 1, 'createdAt' => 1 ] ], - ] -interface: phpmethod -operation: ~ -optional: false ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-createSearchIndex-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-createSearchIndex-option.yaml deleted file mode 100644 index c6adffe8b..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-createSearchIndex-option.yaml +++ /dev/null @@ -1,17 +0,0 @@ -arg_name: option -name: name -type: string -description: | - Name of the search index to create. - - You cannot create multiple indexes with the same name on a single collection. - - If you do not specify a name, the index is named "default". -interface: phpmethod -operation: ~ -optional: true ---- -source: - file: apiargs-common-option.yaml - ref: comment -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-createSearchIndex-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-createSearchIndex-param.yaml deleted file mode 100644 index bec751360..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-createSearchIndex-param.yaml +++ /dev/null @@ -1,14 +0,0 @@ -arg_name: param -name: $definition -type: array|object -description: | - Document describing the index to create. For details on definition syntax, see - :manual:`Search Index Definition Syntax `. -interface: phpmethod -operation: ~ -optional: false ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-createSearchIndexes-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-createSearchIndexes-option.yaml deleted file mode 100644 index 7661d09e4..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-createSearchIndexes-option.yaml +++ /dev/null @@ -1,4 +0,0 @@ -source: - file: apiargs-common-option.yaml - ref: comment -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-createSearchIndexes-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-createSearchIndexes-param.yaml deleted file mode 100644 index 4003b24d2..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-createSearchIndexes-param.yaml +++ /dev/null @@ -1,21 +0,0 @@ -arg_name: param -name: $indexes -type: array -description: | - Array of documents describing the indexes to create. - - A required ``definition`` document field describes the index to create. For - details on definition syntax, see - :manual:`Search Index Definition Syntax `. - - An optional ``name`` string field specifies the name of the search index to - create. You cannot create multiple indexes with the same name on a single - collection. If you do not specify a name, the index is named "default". -interface: phpmethod -operation: ~ -optional: false ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-deleteMany-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-deleteMany-option.yaml deleted file mode 100644 index 110911f51..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-deleteMany-option.yaml +++ /dev/null @@ -1,38 +0,0 @@ -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: collation ---- -source: - file: apiargs-common-option.yaml - ref: comment -post: | - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.13 ---- -source: - file: apiargs-common-option.yaml - ref: hint -post: | - This option is available in MongoDB 4.4+ and will result in an exception at - execution time if specified for an older server version. - - .. versionadded:: 1.7 ---- -source: - file: apiargs-common-option.yaml - ref: let -post: | - .. versionadded:: 1.13 ---- -source: - file: apiargs-common-option.yaml - ref: session -post: | - .. versionadded:: 1.3 ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: writeConcern -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-deleteMany-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-deleteMany-param.yaml deleted file mode 100644 index 92797eb53..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-deleteMany-param.yaml +++ /dev/null @@ -1,11 +0,0 @@ -source: - file: apiargs-MongoDBCollection-common-param.yaml - ref: $filter -optional: false -replacement: - action: " to delete" ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-deleteOne-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-deleteOne-option.yaml deleted file mode 100644 index 110911f51..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-deleteOne-option.yaml +++ /dev/null @@ -1,38 +0,0 @@ -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: collation ---- -source: - file: apiargs-common-option.yaml - ref: comment -post: | - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.13 ---- -source: - file: apiargs-common-option.yaml - ref: hint -post: | - This option is available in MongoDB 4.4+ and will result in an exception at - execution time if specified for an older server version. - - .. versionadded:: 1.7 ---- -source: - file: apiargs-common-option.yaml - ref: let -post: | - .. versionadded:: 1.13 ---- -source: - file: apiargs-common-option.yaml - ref: session -post: | - .. versionadded:: 1.3 ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: writeConcern -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-deleteOne-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-deleteOne-param.yaml deleted file mode 100644 index 92797eb53..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-deleteOne-param.yaml +++ /dev/null @@ -1,11 +0,0 @@ -source: - file: apiargs-MongoDBCollection-common-param.yaml - ref: $filter -optional: false -replacement: - action: " to delete" ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-distinct-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-distinct-option.yaml deleted file mode 100644 index 05a1b2853..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-distinct-option.yaml +++ /dev/null @@ -1,37 +0,0 @@ -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: collation ---- -source: - file: apiargs-common-option.yaml - ref: comment -post: | - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.13 ---- -source: - file: apiargs-common-option.yaml - ref: maxTimeMS ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: readConcern ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: readPreference ---- -source: - file: apiargs-common-option.yaml - ref: session -post: | - .. versionadded:: 1.3 ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: typeMap -post: | - .. versionadded:: 1.5 -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-distinct-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-distinct-param.yaml deleted file mode 100644 index 37cd9b50b..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-distinct-param.yaml +++ /dev/null @@ -1,20 +0,0 @@ -arg_name: param -name: $fieldName -type: string -description: | - The field for which to return distinct values. -interface: phpmethod -operation: ~ -optional: false ---- -source: - file: apiargs-MongoDBCollection-common-param.yaml - ref: $filter -optional: true -replacement: - action: " from which to retrieve the distinct values" ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-drop-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-drop-option.yaml deleted file mode 100644 index 5eb5efaba..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-drop-option.yaml +++ /dev/null @@ -1,31 +0,0 @@ -source: - file: apiargs-common-option.yaml - ref: comment -post: | - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.13 ---- -source: - file: apiargs-dropCollection-option.yaml - ref: encryptedFields -post: | - .. versionadded:: 1.13 ---- -source: - file: apiargs-common-option.yaml - ref: session -post: | - .. versionadded:: 1.3 ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: typeMap -post: | - This will be used for the returned command result document. ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: writeConcern -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-drop-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-drop-param.yaml deleted file mode 100644 index 73ad04d0b..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-drop-param.yaml +++ /dev/null @@ -1,4 +0,0 @@ -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-dropIndex-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-dropIndex-option.yaml deleted file mode 100644 index b87e09b74..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-dropIndex-option.yaml +++ /dev/null @@ -1,31 +0,0 @@ -source: - file: apiargs-common-option.yaml - ref: comment -post: | - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.13 ---- -source: - file: apiargs-common-option.yaml - ref: maxTimeMS -post: | - .. versionadded:: 1.3 ---- -source: - file: apiargs-common-option.yaml - ref: session -post: | - .. versionadded:: 1.3 ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: typeMap -post: | - This will be used for the returned command result document. ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: writeConcern -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-dropIndex-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-dropIndex-param.yaml deleted file mode 100644 index 7cac6d1de..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-dropIndex-param.yaml +++ /dev/null @@ -1,15 +0,0 @@ -arg_name: param -name: $indexName -type: string| :phpclass:`MongoDB\\Model\\IndexInfo` -description: | - The name or model object of the index to drop. View the existing indexes on - the collection using the :phpmethod:`listIndexes() - ` method. -interface: phpmethod -operation: ~ -optional: false ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-dropIndexes-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-dropIndexes-option.yaml deleted file mode 100644 index aff9f4d75..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-dropIndexes-option.yaml +++ /dev/null @@ -1,29 +0,0 @@ -source: - file: apiargs-common-option.yaml - ref: comment -post: | - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.13 ---- -source: - file: apiargs-common-option.yaml - ref: maxTimeMS ---- -source: - file: apiargs-common-option.yaml - ref: session -post: | - .. versionadded:: 1.3 ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: typeMap -post: | - This will be used for the returned command result document. ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: writeConcern -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-dropIndexes-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-dropIndexes-param.yaml deleted file mode 100644 index 73ad04d0b..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-dropIndexes-param.yaml +++ /dev/null @@ -1,4 +0,0 @@ -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-dropSearchIndex-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-dropSearchIndex-option.yaml deleted file mode 100644 index 7661d09e4..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-dropSearchIndex-option.yaml +++ /dev/null @@ -1,4 +0,0 @@ -source: - file: apiargs-common-option.yaml - ref: comment -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-dropSearchIndex-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-dropSearchIndex-param.yaml deleted file mode 100644 index 9a57fc987..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-dropSearchIndex-param.yaml +++ /dev/null @@ -1,13 +0,0 @@ -arg_name: param -name: $name -type: string -description: | - Name of the index to drop. -interface: phpmethod -operation: ~ -optional: false ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-estimateDocumentCount-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-estimateDocumentCount-option.yaml deleted file mode 100644 index 7289296e9..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-estimateDocumentCount-option.yaml +++ /dev/null @@ -1,25 +0,0 @@ -source: - file: apiargs-common-option.yaml - ref: comment -post: | - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.13 ---- -source: - file: apiargs-common-option.yaml - ref: maxTimeMS ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: readConcern ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: readPreference ---- -source: - file: apiargs-common-option.yaml - ref: session -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-estimateDocumentCount-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-estimateDocumentCount-param.yaml deleted file mode 100644 index 73ad04d0b..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-estimateDocumentCount-param.yaml +++ /dev/null @@ -1,4 +0,0 @@ -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-explain-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-explain-option.yaml deleted file mode 100644 index 650633bce..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-explain-option.yaml +++ /dev/null @@ -1,31 +0,0 @@ -source: - file: apiargs-common-option.yaml - ref: comment -post: | - Defaults to the ``comment`` of the explained operation (if any). - - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.13 ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: readPreference ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: typeMap -post: | - This will be used for the returned command result document. ---- -arg_name: option -name: verbosity -type: string -description: | - The verbosity level at which to run the command. See the :manual:`explain - ` command for more information. -interface: phpmethod -operation: ~ -optional: true -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-explain-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-explain-param.yaml deleted file mode 100644 index 59f156376..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-explain-param.yaml +++ /dev/null @@ -1,13 +0,0 @@ -arg_name: param -name: $explainable -type: :phpclass:`MongoDB\\Operation\\Explainable` -description: | - The command to explain. -interface: phpmethod -operation: ~ -optional: false ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-find-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-find-option.yaml deleted file mode 100644 index 1b01599ec..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-find-option.yaml +++ /dev/null @@ -1,263 +0,0 @@ -arg_name: option -name: projection -type: array|object -description: | - The :ref:`projection specification ` to determine which fields to - include in the returned documents. See :manual:`Project Fields to Return from - Query ` and - :manual:`Projection Operators ` in the MongoDB - manual. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: sort -type: array|object -description: | - The sort specification for the ordering of the results. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: skip -type: integer -description: | - Number of documents to skip. Defaults to ``0``. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: limit -type: integer -description: | - The maximum number of documents to return. If unspecified, then defaults to no - limit. A limit of ``0`` is equivalent to setting no limit. - - A negative limit is similar to a positive limit but closes the cursor after - returning a single batch of results. As such, with a negative limit, if the - limited result set does not fit into a single batch, the number of documents - received will be less than the specified limit. By passing a negative limit, the - client indicates to the server that it will not ask for a subsequent batch via - getMore. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: allowDiskUse -type: boolean -description: | - Enables writing to temporary files. When set to ``true``, queries can write - data to the ``_tmp`` sub-directory in the ``dbPath`` directory. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: batchSize -type: integer -description: | - The number of documents to return in the first batch. Defaults to ``101``. A - batchSize of ``0`` means that the cursor will be established, but no documents - will be returned in the first batch. - - Unlike the previous wire protocol version, a batchSize of ``1`` for the - :dbcommand:`find` command does not close the cursor. -interface: phpmethod -operation: ~ -optional: true ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: collation ---- -source: - file: apiargs-common-option.yaml - ref: comment -post: | - The comment can be any valid BSON type for server versions 4.4 and above. - Earlier server versions only support string values. ---- -arg_name: option -name: cursorType -type: integer -description: | - Indicates the type of cursor to use. ``cursorType`` supports the following - values: - - - ``MongoDB\Operation\Find::NON_TAILABLE`` (*default*) - - ``MongoDB\Operation\Find::TAILABLE`` -interface: phpmethod -operation: ~ -optional: true ---- -source: - file: apiargs-common-option.yaml - ref: hint -post: | - .. versionadded:: 1.2 ---- -arg_name: option -name: maxAwaitTimeMS -type: integer -description: | - Positive integer denoting the time limit in milliseconds for the server to - block a getMore operation if no data is available. This option should only be - used if cursorType is TAILABLE_AWAIT. - - .. versionadded:: 1.2 -interface: phpmethod -operation: ~ -optional: true ---- -source: - file: apiargs-common-option.yaml - ref: maxTimeMS ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: readConcern ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: readPreference ---- -source: - file: apiargs-common-option.yaml - ref: session -post: | - .. versionadded:: 1.3 ---- -arg_name: option -name: max -type: array|object -description: | - The exclusive upper bound for a specific index. - - .. versionadded:: 1.2 -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: maxScan -type: integer -description: | - Maximum number of documents or index keys to scan when executing the query. - - .. deprecated:: 1.4 - .. versionadded:: 1.2 -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: min -type: array|object -description: | - The inclusive lower bound for a specific index. - - .. versionadded:: 1.2 -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: oplogReplay -type: boolean -description: | - Internal use for replica sets. To use ``oplogReplay``, you must include the - following condition in the filter: - - .. code-block:: javascript - - { ts: { $gte: } } - - The :php:`MongoDB\\BSON\\Timestamp ` class - reference describes how to represent MongoDB's BSON timestamp type with PHP. - - .. deprecated:: 1.7 -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: noCursorTimeout -type: boolean -description: | - Prevents the server from timing out idle cursors after an inactivity period - (10 minutes). -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: returnKey -type: boolean -description: | - If true, returns only the index keys in the resulting documents. - - .. versionadded:: 1.2 -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: showRecordId -type: boolean -description: | - Determines whether to return the record identifier for each document. If true, - adds a field $recordId to the returned documents. - - .. versionadded:: 1.2 -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: snapshot -type: boolean -description: | - Prevents the cursor from returning a document more than once because of an - intervening write operation. - - .. deprecated:: 1.4 - .. versionadded:: 1.2 -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: allowPartialResults -type: boolean -description: | - For queries against a sharded collection, returns partial results from the - :program:`mongos` if some shards are unavailable instead of throwing an error. -interface: phpmethod -operation: ~ -optional: true ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: typeMap ---- -arg_name: option -name: modifiers -type: array|object -description: | - :manual:`Meta operators ` that modify the - output or behavior of a query. Use of these operators is deprecated in favor - of named options. -interface: phpmethod -operation: ~ -optional: true ---- -source: - file: apiargs-common-option.yaml - ref: let -post: | - .. versionadded:: 1.13 -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-find-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-find-param.yaml deleted file mode 100644 index 5683a7bba..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-find-param.yaml +++ /dev/null @@ -1,11 +0,0 @@ -source: - file: apiargs-MongoDBCollection-common-param.yaml - ref: $filter -optional: true -replacement: - action: " to query" ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-findOne-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-findOne-option.yaml deleted file mode 100644 index 139e700ac..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-findOne-option.yaml +++ /dev/null @@ -1,84 +0,0 @@ -source: - file: apiargs-MongoDBCollection-method-find-option.yaml - ref: projection ---- -source: - file: apiargs-MongoDBCollection-method-find-option.yaml - ref: sort ---- -source: - file: apiargs-MongoDBCollection-method-find-option.yaml - ref: skip ---- -source: - file: apiargs-MongoDBCollection-method-find-option.yaml - ref: allowDiskUse ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: collation ---- -source: - file: apiargs-MongoDBCollection-method-find-option.yaml - ref: comment ---- -source: - file: apiargs-common-option.yaml - ref: hint -post: | - .. versionadded:: 1.2 ---- -source: - file: apiargs-common-option.yaml - ref: maxTimeMS ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: readConcern ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: readPreference ---- -source: - file: apiargs-common-option.yaml - ref: session -post: | - .. versionadded:: 1.3 ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: typeMap -post: | - This will be used for the returned result document. ---- -source: - file: apiargs-MongoDBCollection-method-find-option.yaml - ref: max ---- -source: - file: apiargs-MongoDBCollection-method-find-option.yaml - ref: maxScan ---- -source: - file: apiargs-MongoDBCollection-method-find-option.yaml - ref: min ---- -source: - file: apiargs-MongoDBCollection-method-find-option.yaml - ref: returnKey ---- -source: - file: apiargs-MongoDBCollection-method-find-option.yaml - ref: showRecordId ---- -source: - file: apiargs-MongoDBCollection-method-find-option.yaml - ref: modifiers ---- -source: - file: apiargs-common-option.yaml - ref: let -post: | - .. versionadded:: 1.13 -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-findOne-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-findOne-param.yaml deleted file mode 100644 index 5683a7bba..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-findOne-param.yaml +++ /dev/null @@ -1,11 +0,0 @@ -source: - file: apiargs-MongoDBCollection-common-param.yaml - ref: $filter -optional: true -replacement: - action: " to query" ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-findOneAndDelete-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-findOneAndDelete-option.yaml deleted file mode 100644 index d8f2b3a4a..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-findOneAndDelete-option.yaml +++ /dev/null @@ -1,56 +0,0 @@ -source: - file: apiargs-MongoDBCollection-method-find-option.yaml - ref: projection ---- -source: - file: apiargs-MongoDBCollection-method-find-option.yaml - ref: sort ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: collation ---- -source: - file: apiargs-common-option.yaml - ref: comment -post: | - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.13 ---- -source: - file: apiargs-common-option.yaml - ref: hint -post: | - This option is available in MongoDB 4.4+ and will result in an exception at - execution time if specified for an older server version. - - .. versionadded:: 1.7 ---- -source: - file: apiargs-common-option.yaml - ref: let -post: | - .. versionadded:: 1.13 ---- -source: - file: apiargs-common-option.yaml - ref: maxTimeMS ---- -source: - file: apiargs-common-option.yaml - ref: session -post: | - .. versionadded:: 1.3 ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: typeMap -post: | - This will be used for the returned result document. ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: writeConcern -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-findOneAndDelete-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-findOneAndDelete-param.yaml deleted file mode 100644 index 92797eb53..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-findOneAndDelete-param.yaml +++ /dev/null @@ -1,11 +0,0 @@ -source: - file: apiargs-MongoDBCollection-common-param.yaml - ref: $filter -optional: false -replacement: - action: " to delete" ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-findOneAndReplace-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-findOneAndReplace-option.yaml deleted file mode 100644 index b509ac947..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-findOneAndReplace-option.yaml +++ /dev/null @@ -1,77 +0,0 @@ -source: - file: apiargs-MongoDBCollection-method-find-option.yaml - ref: projection ---- -source: - file: apiargs-MongoDBCollection-method-find-option.yaml - ref: sort ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: collation ---- -source: - file: apiargs-common-option.yaml - ref: comment -post: | - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.13 ---- -source: - file: apiargs-common-option.yaml - ref: hint -post: | - This option is available in MongoDB 4.4+ and will result in an exception at - execution time if specified for an older server version. - - .. versionadded:: 1.7 ---- -source: - file: apiargs-common-option.yaml - ref: maxTimeMS ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: bypassDocumentValidation ---- -source: - file: apiargs-common-option.yaml - ref: let -post: | - .. versionadded:: 1.13 ---- -arg_name: option -name: returnDocument -type: integer -description: | - Specifies whether to return the document before the replacement is applied, or - after. ``returnDocument`` supports the following values: - - - ``MongoDB\Operation\FindOneAndReplace::RETURN_DOCUMENT_BEFORE`` (*default*) - - ``MongoDB\Operation\FindOneAndReplace::RETURN_DOCUMENT_AFTER`` -interface: phpmethod -operation: ~ -optional: true ---- -source: - file: apiargs-common-option.yaml - ref: session -post: | - .. versionadded:: 1.3 ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: typeMap -post: | - This will be used for the returned result document. ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: upsert ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: writeConcern -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-findOneAndReplace-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-findOneAndReplace-param.yaml deleted file mode 100644 index 32ed6b35f..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-findOneAndReplace-param.yaml +++ /dev/null @@ -1,15 +0,0 @@ -source: - file: apiargs-MongoDBCollection-common-param.yaml - ref: $filter -optional: false -replacement: - action: " to replace" ---- -source: - file: apiargs-MongoDBCollection-common-param.yaml - ref: $replacement ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-findOneAndUpdate-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-findOneAndUpdate-option.yaml deleted file mode 100644 index a8f895f1b..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-findOneAndUpdate-option.yaml +++ /dev/null @@ -1,83 +0,0 @@ -source: - file: apiargs-MongoDBCollection-method-find-option.yaml - ref: projection ---- -source: - file: apiargs-MongoDBCollection-method-find-option.yaml - ref: sort ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: arrayFilters -post: | - .. versionadded:: 1.3 ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: collation ---- -source: - file: apiargs-common-option.yaml - ref: comment -post: | - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.13 ---- -source: - file: apiargs-common-option.yaml - ref: hint -post: | - This option is available in MongoDB 4.4+ and will result in an exception at - execution time if specified for an older server version. - - .. versionadded:: 1.7 ---- -source: - file: apiargs-common-option.yaml - ref: maxTimeMS ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: bypassDocumentValidation ---- -source: - file: apiargs-common-option.yaml - ref: let -post: | - .. versionadded:: 1.13 ---- -arg_name: option -name: returnDocument -type: integer -description: | - Specifies whether to return the document before the update is applied, or - after. ``returnDocument`` supports the following values: - - - ``MongoDB\Operation\FindOneAndUpdate::RETURN_DOCUMENT_BEFORE`` (*default*) - - ``MongoDB\Operation\FindOneAndUpdate::RETURN_DOCUMENT_AFTER`` -interface: phpmethod -operation: ~ -optional: true ---- -source: - file: apiargs-common-option.yaml - ref: session -post: | - .. versionadded:: 1.3 ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: typeMap -post: | - This will be used for the returned result document. ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: upsert ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: writeConcern -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-findOneAndUpdate-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-findOneAndUpdate-param.yaml deleted file mode 100644 index a335678a3..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-findOneAndUpdate-param.yaml +++ /dev/null @@ -1,15 +0,0 @@ -source: - file: apiargs-MongoDBCollection-common-param.yaml - ref: $filter -optional: false -replacement: - action: " to update" ---- -source: - file: apiargs-MongoDBCollection-common-param.yaml - ref: $update ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-insertMany-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-insertMany-option.yaml deleted file mode 100644 index 60f197d2b..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-insertMany-option.yaml +++ /dev/null @@ -1,27 +0,0 @@ -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: bypassDocumentValidation ---- -source: - file: apiargs-common-option.yaml - ref: comment -post: | - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.13 ---- -source: - file: apiargs-MongoDBCollection-method-bulkWrite-option.yaml - ref: ordered ---- -source: - file: apiargs-common-option.yaml - ref: session -post: | - .. versionadded:: 1.3 ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: writeConcern -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-insertMany-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-insertMany-param.yaml deleted file mode 100644 index 78246d30d..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-insertMany-param.yaml +++ /dev/null @@ -1,13 +0,0 @@ -arg_name: param -name: $documents -type: array -description: | - The documents to insert into the collection. -interface: phpmethod -operation: ~ -optional: false ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-insertOne-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-insertOne-option.yaml deleted file mode 100644 index adf17cb61..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-insertOne-option.yaml +++ /dev/null @@ -1,23 +0,0 @@ -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: bypassDocumentValidation ---- -source: - file: apiargs-common-option.yaml - ref: comment -post: | - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.13 ---- -source: - file: apiargs-common-option.yaml - ref: session -post: | - .. versionadded:: 1.3 ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: writeConcern -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-insertOne-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-insertOne-param.yaml deleted file mode 100644 index 5dc231d30..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-insertOne-param.yaml +++ /dev/null @@ -1,13 +0,0 @@ -arg_name: param -name: $document -type: array|object -description: | - The document to insert into the collection. -interface: phpmethod -operation: ~ -optional: false ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-listIndexes-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-listIndexes-option.yaml deleted file mode 100644 index aa939b950..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-listIndexes-option.yaml +++ /dev/null @@ -1,19 +0,0 @@ -source: - file: apiargs-common-option.yaml - ref: comment -post: | - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.13 ---- -source: - file: apiargs-common-option.yaml - ref: maxTimeMS ---- -source: - file: apiargs-common-option.yaml - ref: session -post: | - .. versionadded:: 1.3 -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-listIndexes-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-listIndexes-param.yaml deleted file mode 100644 index 73ad04d0b..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-listIndexes-param.yaml +++ /dev/null @@ -1,4 +0,0 @@ -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-listSearchIndexes-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-listSearchIndexes-option.yaml deleted file mode 100644 index 910024ee7..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-listSearchIndexes-option.yaml +++ /dev/null @@ -1,44 +0,0 @@ -source: - file: apiargs-aggregate-option.yaml - ref: batchSize ---- -source: - file: apiargs-common-option.yaml - ref: collation ---- -source: - file: apiargs-common-option.yaml - ref: comment ---- -arg_name: option -name: name -type: string -description: | - Name of the index to return information about. - - If name is not specified, information for all indexes on the collection will - be returned. -interface: phpmethod -operation: ~ -optional: true ---- -source: - file: apiargs-common-option.yaml - ref: maxTimeMS ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: readConcern ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: readPreference ---- -source: - file: apiargs-common-option.yaml - ref: session ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: typeMap -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-listSearchIndexes-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-listSearchIndexes-param.yaml deleted file mode 100644 index 73ad04d0b..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-listSearchIndexes-param.yaml +++ /dev/null @@ -1,4 +0,0 @@ -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-mapReduce-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-mapReduce-option.yaml deleted file mode 100644 index 478d12dda..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-mapReduce-option.yaml +++ /dev/null @@ -1,113 +0,0 @@ -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: bypassDocumentValidation -post: | - This only applies when results are output to a collection. ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: collation ---- -source: - file: apiargs-common-option.yaml - ref: comment -post: | - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.13 ---- -arg_name: option -name: finalize -type: :php:`MongoDB\\BSON\\Javascript ` -description: | - Follows the reduce method and modifies the output. - - .. note:: - - Passing a Javascript instance with a scope is deprecated. Put all scope - variables in the ``scope`` option of the MapReduce operation. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: jsMode -type: boolean -description: | - Specifies whether to convert intermediate data into BSON format between the - execution of the map and reduce functions. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: limit -type: integer -description: | - Specifies a maximum number of documents for the input into the map function. -interface: phpmethod -operation: ~ -optional: true ---- -source: - file: apiargs-common-option.yaml - ref: maxTimeMS ---- -arg_name: option -name: query -type: array|object -description: | - Specifies the selection criteria using query operators for determining the - documents input to the map function. -interface: phpmethod -operation: ~ -optional: true ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: readConcern ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: readPreference -post: | - This option will be ignored when results are output to a collection. ---- -arg_name: option -name: scope -type: array|object -description: | - Specifies global variables that are accessible in the map, reduce, and finalize - functions. -interface: phpmethod -operation: ~ -optional: true ---- -source: - file: apiargs-common-option.yaml - ref: session -post: | - .. versionadded:: 1.3 ---- -source: - file: apiargs-MongoDBCollection-method-find-option.yaml - ref: sort ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: typeMap ---- -arg_name: option -name: verbose -type: boolean -description: | - Specifies whether to include the timing information in the result information. -interface: phpmethod -operation: ~ -optional: true ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: writeConcern -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-mapReduce-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-mapReduce-param.yaml deleted file mode 100644 index 6a76d6365..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-mapReduce-param.yaml +++ /dev/null @@ -1,46 +0,0 @@ -arg_name: param -name: $map -type: :php:`MongoDB\\BSON\\Javascript ` -description: | - A JavaScript function that associates or "maps" a value with a key and emits - the key and value pair. - - .. note:: - - Passing a Javascript instance with a scope is deprecated. Put all scope - variables in the ``scope`` option of the MapReduce operation. -interface: phpmethod -operation: ~ -optional: false ---- -arg_name: param -name: $reduce -type: :php:`MongoDB\\BSON\\Javascript ` -description: | - A JavaScript function that "reduces" to a single object all the values - associated with a particular key. - - .. note:: - - Passing a Javascript instance with a scope is deprecated. Put all scope - variables in the ``scope`` option of the MapReduce operation. -interface: phpmethod -operation: ~ -optional: false ---- -arg_name: param -name: $out -type: string|array|object -description: | - Specifies where to output the result of the map-reduce operation. You can - either output to a collection or return the result inline. On a primary member - of a replica set you can output either to a collection or inline, but on a - secondary, only inline output is possible. -interface: phpmethod -operation: ~ -optional: false ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-rename-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-rename-option.yaml deleted file mode 100644 index 0b0b0809c..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-rename-option.yaml +++ /dev/null @@ -1,33 +0,0 @@ -source: - file: apiargs-common-option.yaml - ref: comment -post: | - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.13 ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: typeMap -post: | - This will be used for the returned command result document. ---- -source: - file: apiargs-common-option.yaml - ref: session ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: writeConcern ---- -arg_name: option -name: dropTarget -type: boolean -description: | - If ``true``, MongoDB will drop the target before renaming the collection. The - default value is ``false``. -interface: phpmethod -operation: ~ -optional: true -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-rename-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-rename-param.yaml deleted file mode 100644 index 459b2789d..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-rename-param.yaml +++ /dev/null @@ -1,25 +0,0 @@ -arg_name: param -name: $toCollectionName -type: string -description: | - The new name of the collection. -interface: phpmethod -operation: ~ -optional: false ---- -arg_name: param -name: $toDatabaseName -type: string -description: | - The new database name of the collection. If a new database name is not - specified, the database of the original collection will be used. If the new - name specifies a different database, the command copies the collection - to the new database and drops the source collection. -interface: phpmethod -operation: ~ -optional: true ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-replaceOne-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-replaceOne-option.yaml deleted file mode 100644 index 676296d26..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-replaceOne-option.yaml +++ /dev/null @@ -1,46 +0,0 @@ -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: upsert ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: bypassDocumentValidation ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: collation ---- -source: - file: apiargs-common-option.yaml - ref: comment -post: | - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.13 ---- -source: - file: apiargs-common-option.yaml - ref: hint -post: | - This option is available in MongoDB 4.2+ and will result in an exception at - execution time if specified for an older server version. - - .. versionadded:: 1.6 ---- -source: - file: apiargs-common-option.yaml - ref: let -post: | - .. versionadded:: 1.13 ---- -source: - file: apiargs-common-option.yaml - ref: session -post: | - .. versionadded:: 1.3 ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: writeConcern -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-replaceOne-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-replaceOne-param.yaml deleted file mode 100644 index 32ed6b35f..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-replaceOne-param.yaml +++ /dev/null @@ -1,15 +0,0 @@ -source: - file: apiargs-MongoDBCollection-common-param.yaml - ref: $filter -optional: false -replacement: - action: " to replace" ---- -source: - file: apiargs-MongoDBCollection-common-param.yaml - ref: $replacement ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-updateMany-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-updateMany-option.yaml deleted file mode 100644 index 64eec34e0..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-updateMany-option.yaml +++ /dev/null @@ -1,52 +0,0 @@ -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: upsert ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: arrayFilters -post: | - .. versionadded:: 1.3 ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: bypassDocumentValidation ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: collation ---- -source: - file: apiargs-common-option.yaml - ref: comment -post: | - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.13 ---- -source: - file: apiargs-common-option.yaml - ref: hint -post: | - This option is available in MongoDB 4.2+ and will result in an exception at - execution time if specified for an older server version. - - .. versionadded:: 1.6 ---- -source: - file: apiargs-common-option.yaml - ref: let -post: | - .. versionadded:: 1.13 ---- -source: - file: apiargs-common-option.yaml - ref: session -post: | - .. versionadded:: 1.3 ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: writeConcern -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-updateMany-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-updateMany-param.yaml deleted file mode 100644 index a335678a3..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-updateMany-param.yaml +++ /dev/null @@ -1,15 +0,0 @@ -source: - file: apiargs-MongoDBCollection-common-param.yaml - ref: $filter -optional: false -replacement: - action: " to update" ---- -source: - file: apiargs-MongoDBCollection-common-param.yaml - ref: $update ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-updateOne-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-updateOne-option.yaml deleted file mode 100644 index 64eec34e0..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-updateOne-option.yaml +++ /dev/null @@ -1,52 +0,0 @@ -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: upsert ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: arrayFilters -post: | - .. versionadded:: 1.3 ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: bypassDocumentValidation ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: collation ---- -source: - file: apiargs-common-option.yaml - ref: comment -post: | - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.13 ---- -source: - file: apiargs-common-option.yaml - ref: hint -post: | - This option is available in MongoDB 4.2+ and will result in an exception at - execution time if specified for an older server version. - - .. versionadded:: 1.6 ---- -source: - file: apiargs-common-option.yaml - ref: let -post: | - .. versionadded:: 1.13 ---- -source: - file: apiargs-common-option.yaml - ref: session -post: | - .. versionadded:: 1.3 ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: writeConcern -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-updateOne-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-updateOne-param.yaml deleted file mode 100644 index a335678a3..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-updateOne-param.yaml +++ /dev/null @@ -1,15 +0,0 @@ -source: - file: apiargs-MongoDBCollection-common-param.yaml - ref: $filter -optional: false -replacement: - action: " to update" ---- -source: - file: apiargs-MongoDBCollection-common-param.yaml - ref: $update ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-updateSearchIndex-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-updateSearchIndex-option.yaml deleted file mode 100644 index 7661d09e4..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-updateSearchIndex-option.yaml +++ /dev/null @@ -1,4 +0,0 @@ -source: - file: apiargs-common-option.yaml - ref: comment -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-updateSearchIndex-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-updateSearchIndex-param.yaml deleted file mode 100644 index f5893878c..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-updateSearchIndex-param.yaml +++ /dev/null @@ -1,25 +0,0 @@ -arg_name: param -name: $name -type: string -description: | - Name of the index to update. -interface: phpmethod -operation: ~ -optional: false ---- -arg_name: param -name: $definition -type: array|object -description: | - Document describing the updated search index definition. The specified - definition replaces the prior definition in the search index. For details on - definition syntax, see - :manual:`Search Index Definition Syntax `. -interface: phpmethod -operation: ~ -optional: false ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-watch-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-watch-option.yaml deleted file mode 100644 index 2b8ac8e4c..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-watch-option.yaml +++ /dev/null @@ -1,73 +0,0 @@ ---- -source: - file: apiargs-method-watch-option.yaml - ref: batchSize ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: collation ---- -source: - file: apiargs-common-option.yaml - ref: comment -post: | - The comment can be any valid BSON type for server versions 4.4 and above. - Earlier server versions only support string values. - - .. versionadded:: 1.13 ---- -source: - file: apiargs-method-watch-option.yaml - ref: fullDocument ---- -source: - file: apiargs-method-watch-option.yaml - ref: fullDocumentBeforeChange -post: | - .. versionadded: 1.13 ---- -source: - file: apiargs-method-watch-option.yaml - ref: maxAwaitTimeMS ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: readConcern ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: readPreference -post: | - This is used for both the initial change stream aggregation and for - server selection during an automatic resume. ---- -source: - file: apiargs-method-watch-option.yaml - ref: resumeAfter ---- -source: - file: apiargs-common-option.yaml - ref: session ---- -source: - file: apiargs-method-watch-option.yaml - ref: showExpandedEvents -post: | - .. versionadded:: 1.13 ---- -source: - file: apiargs-method-watch-option.yaml - ref: startAfter -post: | - .. versionadded: 1.5 ---- -source: - file: apiargs-method-watch-option.yaml - ref: startAtOperationTime -post: | - .. versionadded:: 1.4 ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: typeMap -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-watch-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-watch-param.yaml deleted file mode 100644 index b00e450cf..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-watch-param.yaml +++ /dev/null @@ -1,8 +0,0 @@ -source: - file: apiargs-method-watch-param.yaml - ref: $pipeline ---- -source: - file: apiargs-method-watch-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-withOptions-option.yaml b/docs/includes/apiargs-MongoDBCollection-method-withOptions-option.yaml deleted file mode 100644 index 681144f3a..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-withOptions-option.yaml +++ /dev/null @@ -1,27 +0,0 @@ -source: - file: apiargs-common-option.yaml - ref: readConcern -replacement: - resource: "collection" - parent: "original collection" ---- -source: - file: apiargs-common-option.yaml - ref: readPreference -replacement: - resource: "collection" - parent: "original collection" ---- -source: - file: apiargs-common-option.yaml - ref: typeMap -replacement: - parent: "original collection" ---- -source: - file: apiargs-common-option.yaml - ref: writeConcern -replacement: - resource: "collection" - parent: "original collection" -... diff --git a/docs/includes/apiargs-MongoDBCollection-method-withOptions-param.yaml b/docs/includes/apiargs-MongoDBCollection-method-withOptions-param.yaml deleted file mode 100644 index 73ad04d0b..000000000 --- a/docs/includes/apiargs-MongoDBCollection-method-withOptions-param.yaml +++ /dev/null @@ -1,4 +0,0 @@ -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBDatabase-common-option.yaml b/docs/includes/apiargs-MongoDBDatabase-common-option.yaml deleted file mode 100644 index b03dac7a7..000000000 --- a/docs/includes/apiargs-MongoDBDatabase-common-option.yaml +++ /dev/null @@ -1,36 +0,0 @@ -arg_name: option -name: readConcern -type: :php:`MongoDB\\Driver\\ReadConcern ` -description: | - :manual:`Read concern ` to use for the operation. - Defaults to the database's read concern. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: readPreference -type: :php:`MongoDB\\Driver\\ReadPreference ` -description: | - :manual:`Read preference ` to use for the - operation. Defaults to the database's read preference. -interface: phpmethod -operation: ~ -optional: true ---- -source: - file: apiargs-common-option.yaml - ref: typeMap -replacement: - parent: "database" ---- -arg_name: option -name: writeConcern -type: :php:`MongoDB\\Driver\\WriteConcern ` -description: | - :manual:`Write concern ` to use for the operation. - Defaults to the database's write concern. -interface: phpmethod -operation: ~ -optional: true -... diff --git a/docs/includes/apiargs-MongoDBDatabase-method-aggregate-option.yaml b/docs/includes/apiargs-MongoDBDatabase-method-aggregate-option.yaml deleted file mode 100644 index 93bccd2f3..000000000 --- a/docs/includes/apiargs-MongoDBDatabase-method-aggregate-option.yaml +++ /dev/null @@ -1,64 +0,0 @@ -source: - file: apiargs-aggregate-option.yaml - ref: allowDiskUse ---- -source: - file: apiargs-aggregate-option.yaml - ref: batchSize ---- -source: - file: apiargs-aggregate-option.yaml - ref: bypassDocumentValidation ---- -source: - file: apiargs-common-option.yaml - ref: collation ---- -source: - file: apiargs-common-option.yaml - ref: comment -post: | - The comment can be any valid BSON type for server versions 4.4 and above. - Earlier server versions only support string values. ---- -source: - file: apiargs-aggregate-option.yaml - ref: explain ---- -source: - file: apiargs-common-option.yaml - ref: hint ---- -source: - file: apiargs-common-option.yaml - ref: let -post: | - .. versionadded:: 1.9 ---- -source: - file: apiargs-common-option.yaml - ref: maxTimeMS ---- -source: - file: apiargs-MongoDBDatabase-common-option.yaml - ref: readConcern ---- -source: - file: apiargs-MongoDBDatabase-common-option.yaml - ref: readPreference ---- -source: - file: apiargs-common-option.yaml - ref: session ---- -source: - file: apiargs-MongoDBDatabase-common-option.yaml - ref: typeMap ---- -source: - file: apiargs-MongoDBDatabase-common-option.yaml - ref: writeConcern -post: | - This only applies when a :ref:`$out ` or :ref:`$merge ` - stage is specified. -... diff --git a/docs/includes/apiargs-MongoDBDatabase-method-aggregate-param.yaml b/docs/includes/apiargs-MongoDBDatabase-method-aggregate-param.yaml deleted file mode 100644 index cbad3b49b..000000000 --- a/docs/includes/apiargs-MongoDBDatabase-method-aggregate-param.yaml +++ /dev/null @@ -1,14 +0,0 @@ -arg_name: param -name: $pipeline -type: array -description: | - Specifies an :manual:`aggregation pipeline ` - operation. -interface: phpmethod -operation: ~ -optional: false ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBDatabase-method-command-option.yaml b/docs/includes/apiargs-MongoDBDatabase-method-command-option.yaml deleted file mode 100644 index 934e325db..000000000 --- a/docs/includes/apiargs-MongoDBDatabase-method-command-option.yaml +++ /dev/null @@ -1,17 +0,0 @@ -source: - file: apiargs-common-option.yaml - ref: readPreference -description: | - :manual:`Read preference ` to use for the - operation. Defaults to the database's read preference. ---- -source: - file: apiargs-common-option.yaml - ref: session -post: | - .. versionadded:: 1.3 ---- -source: - file: apiargs-MongoDBDatabase-common-option.yaml - ref: typeMap -... diff --git a/docs/includes/apiargs-MongoDBDatabase-method-command-param.yaml b/docs/includes/apiargs-MongoDBDatabase-method-command-param.yaml deleted file mode 100644 index 5a4b03d7b..000000000 --- a/docs/includes/apiargs-MongoDBDatabase-method-command-param.yaml +++ /dev/null @@ -1,13 +0,0 @@ -arg_name: param -name: $command -type: array|object -description: | - The :manual:`database command ` document. -interface: phpmethod -operation: ~ -optional: false ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBDatabase-method-construct-option.yaml b/docs/includes/apiargs-MongoDBDatabase-method-construct-option.yaml deleted file mode 100644 index d398069a8..000000000 --- a/docs/includes/apiargs-MongoDBDatabase-method-construct-option.yaml +++ /dev/null @@ -1,25 +0,0 @@ -source: - file: apiargs-common-option.yaml - ref: readConcern -replacement: - resource: "database" - parent: "manager" ---- -source: - file: apiargs-common-option.yaml - ref: readPreference -replacement: - resource: "database" - parent: "manager" ---- -source: - file: apiargs-MongoDBClient-method-construct-driverOptions.yaml - ref: typeMap ---- -source: - file: apiargs-common-option.yaml - ref: writeConcern -replacement: - resource: "database" - parent: "manager" -... diff --git a/docs/includes/apiargs-MongoDBDatabase-method-construct-param.yaml b/docs/includes/apiargs-MongoDBDatabase-method-construct-param.yaml deleted file mode 100644 index 5ef826c17..000000000 --- a/docs/includes/apiargs-MongoDBDatabase-method-construct-param.yaml +++ /dev/null @@ -1,12 +0,0 @@ -source: - file: apiargs-common-param.yaml - ref: $manager ---- -source: - file: apiargs-common-param.yaml - ref: $databaseName ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBDatabase-method-createCollection-option.yaml b/docs/includes/apiargs-MongoDBDatabase-method-createCollection-option.yaml deleted file mode 100644 index ceb7dd075..000000000 --- a/docs/includes/apiargs-MongoDBDatabase-method-createCollection-option.yaml +++ /dev/null @@ -1,363 +0,0 @@ -arg_name: option -name: autoIndexId -type: boolean -description: | - Specify ``false`` to disable the automatic creation of an index on the ``_id`` - field. - - .. important:: - - For replica sets, do not set ``autoIndexId`` to ``false``. - - .. deprecated:: 1.4 - This option has been deprecated since MongoDB 3.2. As of MongoDB 4.0, this - option cannot be ``false`` when creating a replicated collection (i.e. a - collection outside of the ``local`` database in any mongod mode). -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: capped -type: boolean -description: | - To create a capped collection, specify ``true``. If you specify ``true``, you - must also set a maximum size in the ``size`` option. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: changeStreamPreAndPostImages -type: document -description: | - Used to configure support for pre- and post-images in change streams. See the - :manual:`create ` command documentation for more - information. - - This option is available in MongoDB 6.0+ and will result in an exception at - execution time if specified for an older server version. - - .. versionadded:: 1.13 -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: clusteredIndex -type: document -description: | - A clustered index specification. See - :manual:`Clustered Collections ` or the - :manual:`create ` command documentation for more - information. - - This option is available in MongoDB 5.3+ and will result in an exception at - execution time if specified for an older server version. - - .. versionadded:: 1.13 -interface: phpmethod -operation: ~ -optional: true ---- -source: - file: apiargs-common-option.yaml - ref: collation -pre: | - Specifies the :manual:`collation - ` for the collection. ---- -source: - file: apiargs-common-option.yaml - ref: comment -post: | - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.13 ---- -arg_name: option -name: encryptedFields -type: document -description: | - A document describing encrypted fields for queryable encryption. If omitted, - the ``encryptedFieldsMap`` option within the ``autoEncryption`` driver option - will be consulted. See - `Field Encryption and Queryability `_ - in the MongoDB manual for more information. - - This option is available in MongoDB 7.0+ and will result in an exception at - execution time if specified for an older server version. - - .. versionadded:: 1.13 -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: expireAfterSeconds -type: integer -description: | - Used to automatically delete documents in time series collections. See the - :manual:`create ` command documentation for more - information. - - This option is available in MongoDB 5.0+ and will result in an exception at - execution time if specified for an older server version. - - .. versionadded:: 1.9 -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: flags -type: integer -description: | - Available for the MMAPv1 storage engine only to set the ``usePowerOf2Sizes`` - and ``noPadding`` flags. - - The |php-library| provides constants that you can combine with a :php:`bitwise - OR operator ` to set the flag values: - - - ``MongoDB\Operation\CreateCollection::USE_POWER_OF_2_SIZES``: ``1`` - - ``MongoDB\Operation\CreateCollection::NO_PADDING``: ``2`` - - Defaults to ``1``. - - .. note:: - - MongoDB 3.0 and later ignores the ``usePowerOf2Sizes`` flag. See - :manual:`collMod ` and - :manual:`db.createCollection() - ` for more information. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: indexOptionDefaults -type: array|object -description: | - Allows users to specify a default configuration for indexes when creating a - collection. - - The ``indexOptionDefaults`` option accepts a ``storageEngine`` document, - which should take the following form: - - .. code-block:: none - - { : } - - Storage engine configurations specified when creating indexes are validated - and logged to the :term:`oplog` during replication to support replica sets - with members that use different storage engines. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: max -type: integer -description: | - The maximum number of documents allowed in the capped collection. The ``size`` - option takes precedence over this limit. If a capped collection reaches the - ``size`` limit before it reaches the maximum number of documents, MongoDB - removes old documents. If you prefer to use the ``max`` limit, ensure that the - ``size`` limit, which is required for a capped collection, is sufficient to - contain the maximum number of documents. -interface: phpmethod -operation: ~ -optional: true ---- -source: - file: apiargs-common-option.yaml - ref: maxTimeMS ---- -arg_name: option -name: pipeline -type: array -description: | - An array that consists of the aggregation pipeline stage(s), which will be - applied to the collection or view specified by ``viewOn``. See the - :manual:`create ` command documentation for more - information. - - .. versionadded:: 1.13 -interface: phpmethod -operation: ~ -optional: true ---- -source: - file: apiargs-common-option.yaml - ref: session -post: | - .. versionadded:: 1.3 ---- -arg_name: option -name: size -type: integer -description: | - Specify a maximum size in bytes for a capped collection. Once a capped - collection reaches its maximum size, MongoDB removes the older documents to - make space for the new documents. The ``size`` option is required for capped - collections and ignored for other collections. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: storageEngine -type: array|object -description: | - Available for the WiredTiger storage engine only. - - Allows users to specify configuration to the storage engine on a - per-collection basis when creating a collection. The value of the - ``storageEngine`` option should take the following form: - - .. code-block:: none - - { : } - - Storage engine configurations specified when creating collections are - validated and logged to the :term:`oplog` during replication to support - replica sets with members that use different storage engines. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: timeseries -type: array|object -description: | - An object containing options for creating time series collections. See the - :manual:`create ` command documentation for - supported options. - - This option is available in MongoDB 5.0+ and will result in an exception at - execution time if specified for an older server version. - - .. versionadded:: 1.9 -interface: phpmethod -operation: ~ -optional: true ---- -source: - file: apiargs-MongoDBDatabase-common-option.yaml - ref: typeMap -post: | - This will be used for the returned command result document. ---- -arg_name: option -name: validator -type: array|object -description: | - Allows users to specify :manual:`validation rules or expressions - ` for the collection. For more information, see - :manual:`Document Validation ` in the MongoDB - manual. - - The ``validator`` option takes an array that specifies the validation rules or - expressions. You can specify the expressions using the same operators as - MongoDB's :manual:`query operators ` with the - exception of :query:`$geoNear`, :query:`$near`, :query:`$nearSphere`, - :query:`$text`, and :query:`$where`. - - .. note:: - - - Validation occurs during updates and inserts. Existing documents do not - undergo validation checks until modification. - - - You cannot specify a validator for collections in the ``admin``, - ``local``, and ``config`` databases. - - - You cannot specify a validator for ``system.*`` collections. -operation: ~ -interface: phpmethod -optional: true ---- -arg_name: option -name: validationAction -type: string -description: | - Determines whether to ``error`` on invalid documents or just ``warn`` about - the violations but allow invalid documents to be inserted. - - .. important:: - - Validation of documents only applies to those documents as determined by - the ``validationLevel``. - - .. list-table:: - :header-rows: 1 - - * - ``validationAction`` - - - Description - - * - ``"error"`` - - - **Default**. Documents must pass validation before the write occurs. - Otherwise, the write operation fails. - - * - ``"warn"`` - - - Documents do not have to pass validation. If the document fails - validation, the write operation logs the validation failure. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: validationLevel -type: string -description: | - Determines how strictly MongoDB applies the validation rules to existing - documents during an update. - - .. list-table:: - :header-rows: 1 - - * - ``validationLevel`` - - - Description - - * - ``"off"`` - - - No validation for inserts or updates. - - * - ``"strict"`` - - - **Default**. Apply validation rules to all inserts and all updates. - - * - ``"moderate"`` - - - Apply validation rules to inserts and to updates on existing *valid* - documents. Do not apply rules to updates on existing *invalid* - documents. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: viewOn -type: string -description: | - The name of the source collection or view from which to create the view. - - .. note:: - - The name is not the full namespace of the collection or view (i.e. it does - not include the database name). Views must be created in the same databases - as the source collection or view. - - .. versionadded:: 1.13 -interface: phpmethod -operation: ~ -optional: true ---- -source: - file: apiargs-MongoDBDatabase-common-option.yaml - ref: writeConcern -... diff --git a/docs/includes/apiargs-MongoDBDatabase-method-createCollection-param.yaml b/docs/includes/apiargs-MongoDBDatabase-method-createCollection-param.yaml deleted file mode 100644 index b6bb2dccd..000000000 --- a/docs/includes/apiargs-MongoDBDatabase-method-createCollection-param.yaml +++ /dev/null @@ -1,10 +0,0 @@ -source: - file: apiargs-common-param.yaml - ref: $collectionName -replacement: - action: " to create" ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBDatabase-method-createEncryptedCollection-param.yaml b/docs/includes/apiargs-MongoDBDatabase-method-createEncryptedCollection-param.yaml deleted file mode 100644 index 6d56d6785..000000000 --- a/docs/includes/apiargs-MongoDBDatabase-method-createEncryptedCollection-param.yaml +++ /dev/null @@ -1,47 +0,0 @@ -source: - file: apiargs-common-param.yaml - ref: $collectionName -replacement: - subject: "encrypted collection" - action: " to create" ---- -arg_name: param -name: $clientEncryption -type: :php:`MongoDB\\Driver\\ClientEncryption ` -description: | - The ClientEncryption object used to create data keys. -interface: phpmethod -operation: ~ -optional: false ---- -arg_name: param -name: $kmsProvider -type: string -description: | - KMS provider (e.g. "local", "aws") that will be used to encrypt new data keys. - This corresponds to the ``$kmsProvider`` parameter for - :php:`MongoDB\\Driver\\ClientEncryption::createDataKey() `. -interface: phpmethod -operation: ~ -optional: false ---- -arg_name: param -name: $masterKey -type: array|null -description: | - KMS-specific key options that will be used to encrypt new data keys. This - corresponds to the ``masterKey`` option for - :php:`MongoDB\\Driver\\ClientEncryption::createDataKey() `. - - If ``$kmsProvider`` is "local", this should be ``null``. -interface: phpmethod -operation: ~ -optional: false ---- -source: - file: apiargs-common-param.yaml - ref: $options -optional: false -post: | - The ``encryptedFields`` option is required. -... diff --git a/docs/includes/apiargs-MongoDBDatabase-method-drop-option.yaml b/docs/includes/apiargs-MongoDBDatabase-method-drop-option.yaml deleted file mode 100644 index e725fc1be..000000000 --- a/docs/includes/apiargs-MongoDBDatabase-method-drop-option.yaml +++ /dev/null @@ -1,25 +0,0 @@ -source: - file: apiargs-common-option.yaml - ref: comment -post: | - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.13 ---- -source: - file: apiargs-common-option.yaml - ref: session -post: | - .. versionadded:: 1.3 ---- -source: - file: apiargs-MongoDBDatabase-common-option.yaml - ref: typeMap -post: | - This will be used for the returned command result document. ---- -source: - file: apiargs-MongoDBDatabase-common-option.yaml - ref: writeConcern -... diff --git a/docs/includes/apiargs-MongoDBDatabase-method-drop-param.yaml b/docs/includes/apiargs-MongoDBDatabase-method-drop-param.yaml deleted file mode 100644 index 73ad04d0b..000000000 --- a/docs/includes/apiargs-MongoDBDatabase-method-drop-param.yaml +++ /dev/null @@ -1,4 +0,0 @@ -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBDatabase-method-dropCollection-option.yaml b/docs/includes/apiargs-MongoDBDatabase-method-dropCollection-option.yaml deleted file mode 100644 index 0034b5e88..000000000 --- a/docs/includes/apiargs-MongoDBDatabase-method-dropCollection-option.yaml +++ /dev/null @@ -1,31 +0,0 @@ -source: - file: apiargs-dropCollection-option.yaml - ref: encryptedFields -post: | - .. versionadded:: 1.13 ---- -source: - file: apiargs-common-option.yaml - ref: comment -post: | - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.13 ---- -source: - file: apiargs-common-option.yaml - ref: session -post: | - .. versionadded:: 1.3 ---- -source: - file: apiargs-MongoDBDatabase-common-option.yaml - ref: typeMap -post: | - This will be used for the returned command result document. ---- -source: - file: apiargs-MongoDBDatabase-common-option.yaml - ref: writeConcern -... diff --git a/docs/includes/apiargs-MongoDBDatabase-method-dropCollection-param.yaml b/docs/includes/apiargs-MongoDBDatabase-method-dropCollection-param.yaml deleted file mode 100644 index c8e0a614e..000000000 --- a/docs/includes/apiargs-MongoDBDatabase-method-dropCollection-param.yaml +++ /dev/null @@ -1,10 +0,0 @@ -source: - file: apiargs-common-param.yaml - ref: $collectionName -replacement: - action: " to drop" ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBDatabase-method-get-param.yaml b/docs/includes/apiargs-MongoDBDatabase-method-get-param.yaml deleted file mode 100644 index 651c85f94..000000000 --- a/docs/includes/apiargs-MongoDBDatabase-method-get-param.yaml +++ /dev/null @@ -1,6 +0,0 @@ -source: - file: apiargs-common-param.yaml - ref: $collectionName -replacement: - action: " to select" -... diff --git a/docs/includes/apiargs-MongoDBDatabase-method-listCollections-option.yaml b/docs/includes/apiargs-MongoDBDatabase-method-listCollections-option.yaml deleted file mode 100644 index bacf7280a..000000000 --- a/docs/includes/apiargs-MongoDBDatabase-method-listCollections-option.yaml +++ /dev/null @@ -1,46 +0,0 @@ -arg_name: option -name: authorizedCollections -type: boolean -description: | - A flag that determines which collections are returned based on the user - privileges when access control is enabled. For more information, see the - `listCollections command documentation `_. - - For servers < 4.0, this option is ignored. - - .. versionadded:: 1.12 -interface: phpmethod -operation: ~ -optional: true ---- -source: - file: apiargs-common-option.yaml - ref: comment -post: | - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.13 ---- -arg_name: option -name: filter -type: array|object -description: | - A query expression to filter the list of collections. - - You can specify a query expression for collection fields (e.g. ``name``, - ``options``). -interface: phpmethod -operation: ~ -optional: true ---- -source: - file: apiargs-common-option.yaml - ref: maxTimeMS ---- -source: - file: apiargs-common-option.yaml - ref: session -post: | - .. versionadded:: 1.3 -... diff --git a/docs/includes/apiargs-MongoDBDatabase-method-listCollections-param.yaml b/docs/includes/apiargs-MongoDBDatabase-method-listCollections-param.yaml deleted file mode 100644 index 73ad04d0b..000000000 --- a/docs/includes/apiargs-MongoDBDatabase-method-listCollections-param.yaml +++ /dev/null @@ -1,4 +0,0 @@ -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBDatabase-method-modifyCollection-option.yaml b/docs/includes/apiargs-MongoDBDatabase-method-modifyCollection-option.yaml deleted file mode 100644 index b27c16cfb..000000000 --- a/docs/includes/apiargs-MongoDBDatabase-method-modifyCollection-option.yaml +++ /dev/null @@ -1,23 +0,0 @@ -source: - file: apiargs-common-option.yaml - ref: comment -post: | - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.13 ---- -source: - file: apiargs-common-option.yaml - ref: session ---- -source: - file: apiargs-MongoDBDatabase-common-option.yaml - ref: typeMap -post: | - This will be used for the returned command result document. ---- -source: - file: apiargs-MongoDBDatabase-common-option.yaml - ref: writeConcern -... diff --git a/docs/includes/apiargs-MongoDBDatabase-method-modifyCollection-param.yaml b/docs/includes/apiargs-MongoDBDatabase-method-modifyCollection-param.yaml deleted file mode 100644 index 16597b3af..000000000 --- a/docs/includes/apiargs-MongoDBDatabase-method-modifyCollection-param.yaml +++ /dev/null @@ -1,20 +0,0 @@ -source: - file: apiargs-common-param.yaml - ref: $collectionName -replacement: - subject: "collection or view" - action: " to modify" ---- -arg_name: param -name: $collectionOptions -type: array -description: | - Collection or view options to assign. -interface: phpmethod -operation: ~ -optional: false ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBDatabase-method-renameCollection-option.yaml b/docs/includes/apiargs-MongoDBDatabase-method-renameCollection-option.yaml deleted file mode 100644 index bb026bd9c..000000000 --- a/docs/includes/apiargs-MongoDBDatabase-method-renameCollection-option.yaml +++ /dev/null @@ -1,33 +0,0 @@ -source: - file: apiargs-common-option.yaml - ref: comment -post: | - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. - - .. versionadded:: 1.13 ---- -source: - file: apiargs-common-option.yaml - ref: session ---- -source: - file: apiargs-MongoDBDatabase-common-option.yaml - ref: typeMap -post: | - This will be used for the returned command result document. ---- -source: - file: apiargs-MongoDBDatabase-common-option.yaml - ref: writeConcern ---- -arg_name: option -name: dropTarget -type: boolean -description: | - If ``true``, MongoDB will drop the target before renaming the collection. The - default value is ``false``. -interface: phpmethod -operation: ~ -optional: true -... diff --git a/docs/includes/apiargs-MongoDBDatabase-method-renameCollection-param.yaml b/docs/includes/apiargs-MongoDBDatabase-method-renameCollection-param.yaml deleted file mode 100644 index 3043f4dd5..000000000 --- a/docs/includes/apiargs-MongoDBDatabase-method-renameCollection-param.yaml +++ /dev/null @@ -1,34 +0,0 @@ -arg_name: param -name: $fromCollectionName -type: string -description: | - The name of the collection to rename. -interface: phpmethod -operation: ~ -optional: false ---- -arg_name: param -name: $toCollectionName -type: string -description: | - The new name of the collection. -interface: phpmethod -operation: ~ -optional: false ---- -arg_name: param -name: $toDatabaseName -type: string -description: | - The new database name of the collection. If a new database name is not - specified, the current database will be used. If the new name specifies a - different database, the command copies the collection to the new database - and drops the source collection. -interface: phpmethod -operation: ~ -optional: true ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBDatabase-method-selectCollection-option.yaml b/docs/includes/apiargs-MongoDBDatabase-method-selectCollection-option.yaml deleted file mode 100644 index 932c1b16b..000000000 --- a/docs/includes/apiargs-MongoDBDatabase-method-selectCollection-option.yaml +++ /dev/null @@ -1,27 +0,0 @@ -source: - file: apiargs-common-option.yaml - ref: readConcern -replacement: - resource: "collection" - parent: "database" ---- -source: - file: apiargs-common-option.yaml - ref: readPreference -replacement: - resource: "collection" - parent: "database" ---- -source: - file: apiargs-common-option.yaml - ref: typeMap -replacement: - parent: "database" ---- -source: - file: apiargs-common-option.yaml - ref: writeConcern -replacement: - resource: "collection" - parent: "database" -... diff --git a/docs/includes/apiargs-MongoDBDatabase-method-selectCollection-param.yaml b/docs/includes/apiargs-MongoDBDatabase-method-selectCollection-param.yaml deleted file mode 100644 index 46d4e72a6..000000000 --- a/docs/includes/apiargs-MongoDBDatabase-method-selectCollection-param.yaml +++ /dev/null @@ -1,10 +0,0 @@ -source: - file: apiargs-common-param.yaml - ref: $collectionName -replacement: - action: " to select" ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBDatabase-method-selectGridFSBucket-option.yaml b/docs/includes/apiargs-MongoDBDatabase-method-selectGridFSBucket-option.yaml deleted file mode 100644 index 2039d114a..000000000 --- a/docs/includes/apiargs-MongoDBDatabase-method-selectGridFSBucket-option.yaml +++ /dev/null @@ -1,52 +0,0 @@ -arg_name: option -name: bucketName -type: string -description: | - The bucket name, which will be used as a prefix for the files and chunks - collections. Defaults to ``"fs"``. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: chunkSizeBytes -type: integer -description: | - The chunk size in bytes. Defaults to ``261120`` (i.e. 255 KiB). -interface: phpmethod -operation: ~ -optional: true ---- -source: - file: apiargs-MongoDBGridFSBucket-common-option.yaml - ref: disableMD5 -post: | - .. versionadded: 1.4 ---- -source: - file: apiargs-common-option.yaml - ref: readConcern -replacement: - resource: "bucket" - parent: "database" ---- -source: - file: apiargs-common-option.yaml - ref: readPreference -replacement: - resource: "bucket" - parent: "database" ---- -source: - file: apiargs-common-option.yaml - ref: typeMap -replacement: - parent: "database" ---- -source: - file: apiargs-common-option.yaml - ref: writeConcern -replacement: - resource: "bucket" - parent: "database" -... diff --git a/docs/includes/apiargs-MongoDBDatabase-method-selectGridFSBucket-param.yaml b/docs/includes/apiargs-MongoDBDatabase-method-selectGridFSBucket-param.yaml deleted file mode 100644 index 73ad04d0b..000000000 --- a/docs/includes/apiargs-MongoDBDatabase-method-selectGridFSBucket-param.yaml +++ /dev/null @@ -1,4 +0,0 @@ -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBDatabase-method-watch-option.yaml b/docs/includes/apiargs-MongoDBDatabase-method-watch-option.yaml deleted file mode 100644 index b24efbec2..000000000 --- a/docs/includes/apiargs-MongoDBDatabase-method-watch-option.yaml +++ /dev/null @@ -1,71 +0,0 @@ ---- -source: - file: apiargs-method-watch-option.yaml - ref: batchSize ---- -source: - file: apiargs-common-option.yaml - ref: collation ---- -source: - file: apiargs-common-option.yaml - ref: comment -post: | - The comment can be any valid BSON type for server versions 4.4 and above. - Earlier server versions only support string values. - - .. versionadded:: 1.13 ---- -source: - file: apiargs-method-watch-option.yaml - ref: fullDocument ---- -source: - file: apiargs-method-watch-option.yaml - ref: fullDocumentBeforeChange -post: | - .. versionadded: 1.13 ---- -source: - file: apiargs-method-watch-option.yaml - ref: maxAwaitTimeMS ---- -source: - file: apiargs-MongoDBDatabase-common-option.yaml - ref: readConcern ---- -source: - file: apiargs-MongoDBDatabase-common-option.yaml - ref: readPreference -post: | - This is used for both the initial change stream aggregation and for - server selection during an automatic resume. ---- -source: - file: apiargs-method-watch-option.yaml - ref: resumeAfter ---- -source: - file: apiargs-common-option.yaml - ref: session ---- -source: - file: apiargs-method-watch-option.yaml - ref: showExpandedEvents -post: | - .. versionadded:: 1.13 ---- -source: - file: apiargs-method-watch-option.yaml - ref: startAfter -post: | - .. versionadded: 1.5 ---- -source: - file: apiargs-method-watch-option.yaml - ref: startAtOperationTime ---- -source: - file: apiargs-MongoDBDatabase-common-option.yaml - ref: typeMap -... diff --git a/docs/includes/apiargs-MongoDBDatabase-method-watch-param.yaml b/docs/includes/apiargs-MongoDBDatabase-method-watch-param.yaml deleted file mode 100644 index b00e450cf..000000000 --- a/docs/includes/apiargs-MongoDBDatabase-method-watch-param.yaml +++ /dev/null @@ -1,8 +0,0 @@ -source: - file: apiargs-method-watch-param.yaml - ref: $pipeline ---- -source: - file: apiargs-method-watch-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBDatabase-method-withOptions-option.yaml b/docs/includes/apiargs-MongoDBDatabase-method-withOptions-option.yaml deleted file mode 100644 index c048182c1..000000000 --- a/docs/includes/apiargs-MongoDBDatabase-method-withOptions-option.yaml +++ /dev/null @@ -1,27 +0,0 @@ -source: - file: apiargs-common-option.yaml - ref: readConcern -replacement: - resource: "database" - parent: "original database" ---- -source: - file: apiargs-common-option.yaml - ref: readPreference -replacement: - resource: "database" - parent: "original database" ---- -source: - file: apiargs-common-option.yaml - ref: typeMap -replacement: - parent: "original database" ---- -source: - file: apiargs-common-option.yaml - ref: writeConcern -replacement: - resource: "database" - parent: "original database" -... diff --git a/docs/includes/apiargs-MongoDBDatabase-method-withOptions-param.yaml b/docs/includes/apiargs-MongoDBDatabase-method-withOptions-param.yaml deleted file mode 100644 index 73ad04d0b..000000000 --- a/docs/includes/apiargs-MongoDBDatabase-method-withOptions-param.yaml +++ /dev/null @@ -1,4 +0,0 @@ -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBGridFSBucket-common-option.yaml b/docs/includes/apiargs-MongoDBGridFSBucket-common-option.yaml deleted file mode 100644 index bf2de660a..000000000 --- a/docs/includes/apiargs-MongoDBGridFSBucket-common-option.yaml +++ /dev/null @@ -1,61 +0,0 @@ -arg_name: option -name: _id -type: mixed -description: | - Value to use as the file document identifier. Defaults to a new - :php:`MongoDB\\BSON\\ObjectId ` object. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: chunkSizeBytes -type: integer -description: | - The chunk size in bytes. Defaults to the bucket's ``chunkSizeBytes`` option. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: disableMD5 -type: boolean -description: | - Whether to disable automatic MD5 generation when storing files. - - Defaults to ``false``. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: metadata -type: array|object -description: | - User data for the ``metadata`` field of the file document. If not specified, - the ``metadata`` field will not be set on the file document. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: revision -type: integer -description: | - The revision of the file to retrieve. Files with the name ``filename`` will be - differentiated by their ``uploadDate`` field. - - Revision numbers are defined as follows: - - - 0 = the original stored file - - 1 = the first revision - - 2 = the second revision - - etc... - - -2 = the second most recent revision - - -1 = the most recent revision - - Defaults to -1 (i.e. the most recent revision). -interface: phpmethod -operation: ~ -optional: true -... diff --git a/docs/includes/apiargs-MongoDBGridFSBucket-common-param.yaml b/docs/includes/apiargs-MongoDBGridFSBucket-common-param.yaml deleted file mode 100644 index f1d6b136a..000000000 --- a/docs/includes/apiargs-MongoDBGridFSBucket-common-param.yaml +++ /dev/null @@ -1,39 +0,0 @@ -arg_name: param -name: $filename -type: string -description: | - The ``filename`` of the file{{action}}. -interface: phpmethod -operation: ~ -optional: false -replacement: - action: "" ---- -arg_name: param -name: $id -type: mixed -description: | - The ``_id`` of the file{{action}}. -interface: phpmethod -operation: ~ -optional: false -replacement: - action: "" ---- -arg_name: param -name: $stream -type: resource -description: | - The GridFS stream resource. -interface: phpmethod -operation: ~ ---- -arg_name: param -name: $destination -type: resource -description: | - Writable stream, to which the GridFS file's contents will be written. -interface: phpmethod -operation: ~ -optional: false -... diff --git a/docs/includes/apiargs-MongoDBGridFSBucket-method-construct-option.yaml b/docs/includes/apiargs-MongoDBGridFSBucket-method-construct-option.yaml deleted file mode 100644 index c8a7eb795..000000000 --- a/docs/includes/apiargs-MongoDBGridFSBucket-method-construct-option.yaml +++ /dev/null @@ -1,50 +0,0 @@ -arg_name: option -name: bucketName -type: string -description: | - The bucket name, which will be used as a prefix for the files and chunks - collections. Defaults to ``"fs"``. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: chunkSizeBytes -type: integer -description: | - The chunk size in bytes. Defaults to ``261120`` (i.e. 255 KiB). -interface: phpmethod -operation: ~ -optional: true ---- -source: - file: apiargs-MongoDBGridFSBucket-common-option.yaml - ref: disableMD5 -post: | - .. versionadded: 1.4 ---- -source: - file: apiargs-common-option.yaml - ref: readConcern -replacement: - resource: "bucket" - parent: "database" ---- -source: - file: apiargs-common-option.yaml - ref: readPreference -replacement: - resource: "bucket" - parent: "database" ---- -source: - file: apiargs-MongoDBClient-method-construct-driverOptions.yaml - ref: typeMap ---- -source: - file: apiargs-common-option.yaml - ref: writeConcern -replacement: - resource: "bucket" - parent: "database" -... diff --git a/docs/includes/apiargs-MongoDBGridFSBucket-method-construct-param.yaml b/docs/includes/apiargs-MongoDBGridFSBucket-method-construct-param.yaml deleted file mode 100644 index 5ef826c17..000000000 --- a/docs/includes/apiargs-MongoDBGridFSBucket-method-construct-param.yaml +++ /dev/null @@ -1,12 +0,0 @@ -source: - file: apiargs-common-param.yaml - ref: $manager ---- -source: - file: apiargs-common-param.yaml - ref: $databaseName ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBGridFSBucket-method-delete-param.yaml b/docs/includes/apiargs-MongoDBGridFSBucket-method-delete-param.yaml deleted file mode 100644 index f582864a3..000000000 --- a/docs/includes/apiargs-MongoDBGridFSBucket-method-delete-param.yaml +++ /dev/null @@ -1,6 +0,0 @@ -source: - file: apiargs-MongoDBGridFSBucket-common-param.yaml - ref: $id -replacement: - action: " to delete" -... diff --git a/docs/includes/apiargs-MongoDBGridFSBucket-method-downloadToStream-param.yaml b/docs/includes/apiargs-MongoDBGridFSBucket-method-downloadToStream-param.yaml deleted file mode 100644 index 333ebf7ac..000000000 --- a/docs/includes/apiargs-MongoDBGridFSBucket-method-downloadToStream-param.yaml +++ /dev/null @@ -1,10 +0,0 @@ -source: - file: apiargs-MongoDBGridFSBucket-common-param.yaml - ref: $id -replacement: - action: " to download" ---- -source: - file: apiargs-MongoDBGridFSBucket-common-param.yaml - ref: $destination -... diff --git a/docs/includes/apiargs-MongoDBGridFSBucket-method-downloadToStreamByName-option.yaml b/docs/includes/apiargs-MongoDBGridFSBucket-method-downloadToStreamByName-option.yaml deleted file mode 100644 index 9dc941d97..000000000 --- a/docs/includes/apiargs-MongoDBGridFSBucket-method-downloadToStreamByName-option.yaml +++ /dev/null @@ -1,4 +0,0 @@ -source: - file: apiargs-MongoDBGridFSBucket-common-option.yaml - ref: revision -... diff --git a/docs/includes/apiargs-MongoDBGridFSBucket-method-downloadToStreamByName-param.yaml b/docs/includes/apiargs-MongoDBGridFSBucket-method-downloadToStreamByName-param.yaml deleted file mode 100644 index ff9c81de7..000000000 --- a/docs/includes/apiargs-MongoDBGridFSBucket-method-downloadToStreamByName-param.yaml +++ /dev/null @@ -1,14 +0,0 @@ -source: - file: apiargs-MongoDBGridFSBucket-common-param.yaml - ref: $filename -replacement: - action: " to download" ---- -source: - file: apiargs-MongoDBGridFSBucket-common-param.yaml - ref: $destination ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBGridFSBucket-method-find-option.yaml b/docs/includes/apiargs-MongoDBGridFSBucket-method-find-option.yaml deleted file mode 100644 index 1f2e9d8eb..000000000 --- a/docs/includes/apiargs-MongoDBGridFSBucket-method-find-option.yaml +++ /dev/null @@ -1,76 +0,0 @@ -source: - file: apiargs-MongoDBCollection-method-find-option.yaml - ref: projection ---- -source: - file: apiargs-MongoDBCollection-method-find-option.yaml - ref: sort ---- -source: - file: apiargs-MongoDBCollection-method-find-option.yaml - ref: skip ---- -source: - file: apiargs-MongoDBCollection-method-find-option.yaml - ref: limit ---- -source: - file: apiargs-MongoDBCollection-method-find-option.yaml - ref: allowDiskUse ---- -source: - file: apiargs-MongoDBCollection-method-find-option.yaml - ref: batchSize ---- -source: - file: apiargs-MongoDBCollection-method-find-option.yaml - ref: collation ---- -source: - file: apiargs-MongoDBCollection-method-find-option.yaml - ref: comment ---- -source: - file: apiargs-MongoDBCollection-method-find-option.yaml - ref: cursorType ---- -source: - file: apiargs-MongoDBCollection-method-find-option.yaml - ref: maxTimeMS ---- -source: - file: apiargs-MongoDBCollection-method-find-option.yaml - ref: readConcern -description: | - :manual:`Read concern ` to use for the operation. - Defaults to the bucket's read concern. ---- -source: - file: apiargs-MongoDBCollection-method-find-option.yaml - ref: readPreference -description: | - :manual:`Read preference ` to use for the - operation. Defaults to the bucket's read preference. ---- -source: - file: apiargs-MongoDBCollection-method-find-option.yaml - ref: oplogReplay ---- -source: - file: apiargs-MongoDBCollection-method-find-option.yaml - ref: noCursorTimeout ---- -source: - file: apiargs-MongoDBCollection-method-find-option.yaml - ref: allowPartialResults ---- -source: - file: apiargs-MongoDBCollection-method-find-option.yaml - ref: typeMap -replacement: - parent: "bucket" ---- -source: - file: apiargs-MongoDBCollection-method-find-option.yaml - ref: modifiers -... diff --git a/docs/includes/apiargs-MongoDBGridFSBucket-method-findOne-option.yaml b/docs/includes/apiargs-MongoDBGridFSBucket-method-findOne-option.yaml deleted file mode 100644 index 3d0d0ed8e..000000000 --- a/docs/includes/apiargs-MongoDBGridFSBucket-method-findOne-option.yaml +++ /dev/null @@ -1,46 +0,0 @@ -source: - file: apiargs-MongoDBCollection-method-find-option.yaml - ref: projection ---- -source: - file: apiargs-MongoDBCollection-method-find-option.yaml - ref: sort ---- -source: - file: apiargs-MongoDBCollection-method-find-option.yaml - ref: skip ---- -source: - file: apiargs-MongoDBCollection-method-find-option.yaml - ref: allowDiskUse ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: collation ---- -source: - file: apiargs-MongoDBCollection-method-find-option.yaml - ref: comment ---- -source: - file: apiargs-common-option.yaml - ref: maxTimeMS ---- -source: - file: apiargs-MongoDBCollection-method-find-option.yaml - ref: readConcern ---- -source: - file: apiargs-MongoDBGridFSBucket-method-find-option.yaml - ref: readPreference ---- -source: - file: apiargs-MongoDBGridFSBucket-method-find-option.yaml - ref: typeMap -post: | - This will be used for the returned result document. ---- -source: - file: apiargs-MongoDBCollection-method-find-option.yaml - ref: modifiers -... diff --git a/docs/includes/apiargs-MongoDBGridFSBucket-method-getFileDocumentForStream-param.yaml b/docs/includes/apiargs-MongoDBGridFSBucket-method-getFileDocumentForStream-param.yaml deleted file mode 100644 index 0801cb21d..000000000 --- a/docs/includes/apiargs-MongoDBGridFSBucket-method-getFileDocumentForStream-param.yaml +++ /dev/null @@ -1,4 +0,0 @@ -source: - file: apiargs-MongoDBGridFSBucket-common-param.yaml - ref: $stream -... diff --git a/docs/includes/apiargs-MongoDBGridFSBucket-method-getFileIdForStream-param.yaml b/docs/includes/apiargs-MongoDBGridFSBucket-method-getFileIdForStream-param.yaml deleted file mode 100644 index 0801cb21d..000000000 --- a/docs/includes/apiargs-MongoDBGridFSBucket-method-getFileIdForStream-param.yaml +++ /dev/null @@ -1,4 +0,0 @@ -source: - file: apiargs-MongoDBGridFSBucket-common-param.yaml - ref: $stream -... diff --git a/docs/includes/apiargs-MongoDBGridFSBucket-method-openDownloadStream-param.yaml b/docs/includes/apiargs-MongoDBGridFSBucket-method-openDownloadStream-param.yaml deleted file mode 100644 index 6e4032d44..000000000 --- a/docs/includes/apiargs-MongoDBGridFSBucket-method-openDownloadStream-param.yaml +++ /dev/null @@ -1,6 +0,0 @@ -source: - file: apiargs-MongoDBGridFSBucket-common-param.yaml - ref: $id -replacement: - action: " to download" -... diff --git a/docs/includes/apiargs-MongoDBGridFSBucket-method-openDownloadStreamByName-option.yaml b/docs/includes/apiargs-MongoDBGridFSBucket-method-openDownloadStreamByName-option.yaml deleted file mode 100644 index 9dc941d97..000000000 --- a/docs/includes/apiargs-MongoDBGridFSBucket-method-openDownloadStreamByName-option.yaml +++ /dev/null @@ -1,4 +0,0 @@ -source: - file: apiargs-MongoDBGridFSBucket-common-option.yaml - ref: revision -... diff --git a/docs/includes/apiargs-MongoDBGridFSBucket-method-openDownloadStreamByName-param.yaml b/docs/includes/apiargs-MongoDBGridFSBucket-method-openDownloadStreamByName-param.yaml deleted file mode 100644 index 02acce378..000000000 --- a/docs/includes/apiargs-MongoDBGridFSBucket-method-openDownloadStreamByName-param.yaml +++ /dev/null @@ -1,10 +0,0 @@ -source: - file: apiargs-MongoDBGridFSBucket-common-param.yaml - ref: $filename -replacement: - action: " to download" ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBGridFSBucket-method-openUploadStream-option.yaml b/docs/includes/apiargs-MongoDBGridFSBucket-method-openUploadStream-option.yaml deleted file mode 100644 index 592040d69..000000000 --- a/docs/includes/apiargs-MongoDBGridFSBucket-method-openUploadStream-option.yaml +++ /dev/null @@ -1,18 +0,0 @@ -source: - file: apiargs-MongoDBGridFSBucket-common-option.yaml - ref: _id ---- -source: - file: apiargs-MongoDBGridFSBucket-common-option.yaml - ref: chunkSizeBytes ---- -source: - file: apiargs-MongoDBGridFSBucket-common-option.yaml - ref: disableMD5 -post: | - .. versionadded: 1.4 ---- -source: - file: apiargs-MongoDBGridFSBucket-common-option.yaml - ref: metadata -... diff --git a/docs/includes/apiargs-MongoDBGridFSBucket-method-openUploadStream-param.yaml b/docs/includes/apiargs-MongoDBGridFSBucket-method-openUploadStream-param.yaml deleted file mode 100644 index a4fa839b8..000000000 --- a/docs/includes/apiargs-MongoDBGridFSBucket-method-openUploadStream-param.yaml +++ /dev/null @@ -1,10 +0,0 @@ -source: - file: apiargs-MongoDBGridFSBucket-common-param.yaml - ref: $filename -replacement: - action: " to create" ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-MongoDBGridFSBucket-method-rename-param.yaml b/docs/includes/apiargs-MongoDBGridFSBucket-method-rename-param.yaml deleted file mode 100644 index 45d89936c..000000000 --- a/docs/includes/apiargs-MongoDBGridFSBucket-method-rename-param.yaml +++ /dev/null @@ -1,15 +0,0 @@ -source: - file: apiargs-MongoDBGridFSBucket-common-param.yaml - ref: $id -replacement: - action: " to rename" ---- -arg_name: param -name: $newFilename -type: string -description: | - The new ``filename`` value. -interface: phpmethod -operation: ~ -optional: false -... diff --git a/docs/includes/apiargs-MongoDBGridFSBucket-method-uploadFromStream-option.yaml b/docs/includes/apiargs-MongoDBGridFSBucket-method-uploadFromStream-option.yaml deleted file mode 100644 index 592040d69..000000000 --- a/docs/includes/apiargs-MongoDBGridFSBucket-method-uploadFromStream-option.yaml +++ /dev/null @@ -1,18 +0,0 @@ -source: - file: apiargs-MongoDBGridFSBucket-common-option.yaml - ref: _id ---- -source: - file: apiargs-MongoDBGridFSBucket-common-option.yaml - ref: chunkSizeBytes ---- -source: - file: apiargs-MongoDBGridFSBucket-common-option.yaml - ref: disableMD5 -post: | - .. versionadded: 1.4 ---- -source: - file: apiargs-MongoDBGridFSBucket-common-option.yaml - ref: metadata -... diff --git a/docs/includes/apiargs-MongoDBGridFSBucket-method-uploadFromStream-param.yaml b/docs/includes/apiargs-MongoDBGridFSBucket-method-uploadFromStream-param.yaml deleted file mode 100644 index 2a42e2e7f..000000000 --- a/docs/includes/apiargs-MongoDBGridFSBucket-method-uploadFromStream-param.yaml +++ /dev/null @@ -1,19 +0,0 @@ -source: - file: apiargs-MongoDBGridFSBucket-common-param.yaml - ref: $filename -replacement: - action: " to create" ---- -arg_name: param -name: $source -type: resource -description: | - Readable stream, from which the new GridFS file's contents will be read. -interface: phpmethod -operation: ~ -optional: false ---- -source: - file: apiargs-common-param.yaml - ref: $options -... diff --git a/docs/includes/apiargs-aggregate-option.yaml b/docs/includes/apiargs-aggregate-option.yaml deleted file mode 100644 index e5b410c4f..000000000 --- a/docs/includes/apiargs-aggregate-option.yaml +++ /dev/null @@ -1,43 +0,0 @@ -arg_name: option -name: allowDiskUse -type: boolean -description: | - Enables writing to temporary files. When set to ``true``, aggregation stages - can write data to the ``_tmp`` sub-directory in the ``dbPath`` directory. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: batchSize -type: integer -description: | - Specifies the batch size for the cursor, which will apply to both the initial - ``aggregate`` command and any subsequent ``getMore`` commands. This determines - the maximum number of documents to return in each response from the server. - - A batchSize of ``0`` is special in that and will only apply to the initial - ``aggregate`` command; subsequent ``getMore`` commands will use the server's - default batch size. This may be useful for quickly returning a cursor or - failure from ``aggregate`` without doing significant server-side work. -interface: phpmethod -operation: ~ -optional: true ---- -source: - file: apiargs-MongoDBCollection-common-option.yaml - ref: bypassDocumentValidation -post: | - This only applies when using the :ref:`$out ` and - :ref:`$out ` stages. ---- -arg_name: option -name: explain -type: boolean -description: | - Specifies whether or not to return the information on the processing of the - pipeline. -interface: phpmethod -operation: ~ -optional: true -... diff --git a/docs/includes/apiargs-common-option.yaml b/docs/includes/apiargs-common-option.yaml deleted file mode 100644 index cae141871..000000000 --- a/docs/includes/apiargs-common-option.yaml +++ /dev/null @@ -1,124 +0,0 @@ -arg_name: option -name: collation -type: array|object -description: | - :manual:`Collation ` allows users to specify - language-specific rules for string comparison, such as rules for lettercase - and accent marks. When specifying collation, the ``locale`` field is - mandatory; all other collation fields are optional. For descriptions of the - fields, see :manual:`Collation Document - `. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: comment -type: mixed -description: | - Enables users to specify an arbitrary comment to help trace the operation - through the :manual:`database profiler `, - :manual:`currentOp ` output, and - :manual:`logs `. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: hint -type: string|array|object -description: | - The index to use. Specify either the index name as a string or the index key - pattern as a document. If specified, then the query system will only consider - plans using the hinted index. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: let -type: array|object -description: | - Map of parameter names and values. Values must be constant or closed - expressions that do not reference document fields. Parameters can then be - accessed as variables in an aggregate expression context (e.g. ``$$var``). - - This is not supported for server versions prior to 5.0 and will result in an - exception at execution time if used. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: maxTimeMS -type: integer -description: | - The cumulative time limit in milliseconds for processing operations on the - cursor. MongoDB aborts the operation at the earliest following - :term:`interrupt point`. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: readConcern -type: :php:`MongoDB\\Driver\\ReadConcern ` -description: | - The default read concern to use for {{resource}} operations. Defaults to the - {{parent}}'s read concern. -interface: phpmethod -operation: ~ -optional: true -replacement: - resource: "collection" - parent: "client" ---- -arg_name: option -name: readPreference -type: :php:`MongoDB\\Driver\\ReadPreference ` -description: | - The default read preference to use for {{resource}} operations. Defaults to - the {{parent}}'s read preference. -interface: phpmethod -operation: ~ -optional: true -replacement: - resource: "collection" - parent: "client" ---- -arg_name: option -name: session -type: :php:`MongoDB\\Driver\\Session ` -description: | - Client session to associate with the operation. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: typeMap -type: array -description: | - The :php:`type map - ` - to apply to cursors, which determines how BSON documents are converted to PHP - values. Defaults to the {{parent}}'s type map. -interface: phpmethod -operation: ~ -optional: true -replacement: - parent: "client" ---- -arg_name: option -name: writeConcern -type: :php:`MongoDB\\Driver\\WriteConcern ` -description: | - The default write concern to use for {{resource}} operations. Defaults - to the {{parent}}'s write concern. -interface: phpmethod -operation: ~ -optional: true -replacement: - resource: "collection" - parent: "client" -... diff --git a/docs/includes/apiargs-common-param.yaml b/docs/includes/apiargs-common-param.yaml deleted file mode 100644 index a8d790825..000000000 --- a/docs/includes/apiargs-common-param.yaml +++ /dev/null @@ -1,42 +0,0 @@ -arg_name: param -name: $manager -type: :php:`MongoDB\\Driver\\Manager ` -description: | - The :php:`Manager ` instance from the driver. The - manager maintains connections between the driver and your MongoDB instances. -interface: phpmethod -operation: ~ -optional: false ---- -arg_name: param -name: $databaseName -type: string -description: | - The name of the database{{action}}. -interface: phpmethod -operation: ~ -optional: false -replacement: - action: "" ---- -arg_name: param -name: $collectionName -type: string -description: | - The name of the {{subject}}{{action}}. -interface: phpmethod -operation: ~ -optional: false -replacement: - subject: "collection" - action: "" ---- -arg_name: param -name: $options -type: array -description: | - An array specifying the desired options. -interface: phpmethod -operation: ~ -optional: true -... diff --git a/docs/includes/apiargs-dropCollection-option.yaml b/docs/includes/apiargs-dropCollection-option.yaml deleted file mode 100644 index 158c4a438..000000000 --- a/docs/includes/apiargs-dropCollection-option.yaml +++ /dev/null @@ -1,21 +0,0 @@ -arg_name: option -name: encryptedFields -type: array|object -description: | - A document describing encrypted fields for queryable encryption. If omitted, - the ``encryptedFieldsMap`` option within the ``autoEncryption`` driver option - will be consulted. If ``encryptedFieldsMap`` was defined but does not specify - this collection, the library will make a final attempt to consult the - server-side value for ``encryptedFields``. See - `Field Encryption and Queryability `_ - in the MongoDB manual for more information. - - .. note:: - - This option is not passed to the :manual:`drop ` - command. The library uses it to determine related metadata collections that - should be dropped in addition to an encrypted collection. -interface: phpmethod -operation: ~ -optional: true -... diff --git a/docs/includes/apiargs-function-add_logger-param.yaml b/docs/includes/apiargs-function-add_logger-param.yaml deleted file mode 100644 index 424b405f3..000000000 --- a/docs/includes/apiargs-function-add_logger-param.yaml +++ /dev/null @@ -1,11 +0,0 @@ -arg_name: param -name: $logger -type: Psr\\Log\\LoggerInterface -description: | - A logger to register. - - If the logger is already registered, the method will have no effect. -interface: phpmethod -operation: ~ -optional: false -... diff --git a/docs/includes/apiargs-function-remove_logger-param.yaml b/docs/includes/apiargs-function-remove_logger-param.yaml deleted file mode 100644 index 7ee1be56e..000000000 --- a/docs/includes/apiargs-function-remove_logger-param.yaml +++ /dev/null @@ -1,11 +0,0 @@ -arg_name: param -name: $logger -type: Psr\\Log\\LoggerInterface -description: | - A logger to unregister. - - If the logger is not registered, the method will have no effect. -interface: phpmethod -operation: ~ -optional: false -... diff --git a/docs/includes/apiargs-function-with_transaction-param.yaml b/docs/includes/apiargs-function-with_transaction-param.yaml deleted file mode 100644 index 78875e913..000000000 --- a/docs/includes/apiargs-function-with_transaction-param.yaml +++ /dev/null @@ -1,31 +0,0 @@ -arg_name: param -name: $session -type: :php:`MongoDB\\Driver\\Session ` -description: | - A client session used to execute the transaction. -interface: phpmethod -operation: ~ -optional: false ---- -arg_name: param -name: $callback -type: callback -description: | - A callback that will be run inside the transaction. The callback must accept a - :php:`MongoDB\\Driver\\Session ` object as first - argument. -interface: phpmethod -operation: ~ -optional: false ---- -arg_name: param -name: $transactionOptions -type: array -description: | - Transaction options, which will be passed to - :php:`MongoDB\\Driver\\Session::startTransaction `. - See the extension documentation for a list of supported options. -interface: phpmethod -operation: ~ -optional: true -... diff --git a/docs/includes/apiargs-method-watch-option.yaml b/docs/includes/apiargs-method-watch-option.yaml deleted file mode 100644 index d09278286..000000000 --- a/docs/includes/apiargs-method-watch-option.yaml +++ /dev/null @@ -1,178 +0,0 @@ ---- -arg_name: option -name: batchSize -type: integer -description: | - Specifies the batch size for the cursor, which will apply to both the initial - ``aggregate`` command and any subsequent ``getMore`` commands. This determines - the maximum number of change events to return in each response from the - server. - - .. note:: - - Irrespective of the ``batchSize`` option, the initial ``aggregate`` command - response for a change stream generally does not include any documents - unless another option is used to configure its starting point (e.g. - ``startAfter``). -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: fullDocument -type: string -description: | - Determines how the "fullDocument" response field will be populated for update - operations. - - By default, change streams only return the delta of fields (via an - "updateDescription" field) for update operations and "fullDocument" is - omitted. Insert and replace operations always include the "fullDocument" - field. Delete operations omit the field as the document no longer exists. - - Specify "updateLookup" to return the current majority-committed version of the - updated document. - - MongoDB 6.0+ allows returning the post-image of the modified document if the - collection has ``changeStreamPreAndPostImages`` enabled. Specify - "whenAvailable" to return the post-image if available or a null value if not. - Specify "required" to return the post-image if available or raise an error if - not. - - The following values are supported: - - - ``MongoDB\Operation\Watch::FULL_DOCUMENT_UPDATE_LOOKUP`` - - ``MongoDB\Operation\Watch::FULL_DOCUMENT_WHEN_AVAILABLE`` - - ``MongoDB\Operation\Watch::FULL_DOCUMENT_REQUIRED`` - - .. note:: - - This is an option of the ``$changeStream`` pipeline stage. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: fullDocumentBeforeChange -type: string -description: | - Determines how the "fullDocumentBeforeChange" response field will be - populated. By default, the field is omitted. - - MongoDB 6.0+ allows returning the pre-image of the modified document if the - collection has ``changeStreamPreAndPostImages`` enabled. Specify - "whenAvailable" to return the pre-image if available or a null value if not. - Specify "required" to return the pre-image if available or raise an error if - not. - - The following values are supported: - - - ``MongoDB\Operation\Watch::FULL_DOCUMENT_BEFORE_CHANGE_WHEN_AVAILABLE`` - - ``MongoDB\Operation\Watch::FULL_DOCUMENT_BEFORE_CHANGE_REQUIRED`` - - .. note:: - - This is an option of the ``$changeStream`` pipeline stage. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: maxAwaitTimeMS -type: integer -description: | - Positive integer denoting the time limit in milliseconds for the server to - block a getMore operation if no data is available. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: resumeAfter -type: array|object -description: | - Specifies the logical starting point for the new change stream. The ``_id`` - field in documents returned by the change stream may be used here. - - Using this option in conjunction with ``startAfter`` and/or - ``startAtOperationTime`` will result in a server error. The options are - mutually exclusive. - - .. note:: - - This is an option of the ``$changeStream`` pipeline stage. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: showExpandedEvents -type: boolean -description: | - If true, instructs the server to include additional DDL events in the change - stream. The additional events that may be included are: - - - ``createIndexes`` - - ``dropIndexes`` - - ``modify`` - - ``create`` - - ``shardCollection`` - - ``reshardCollection`` (server 6.1+) - - ``refineCollectionShardKey`` (server 6.1+) - - This is not supported for server versions prior to 6.0 and will result in an - exception at execution time if used. - - .. note:: - - This is an option of the ``$changeStream`` pipeline stage. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: startAfter -type: array|object -description: | - Specifies the logical starting point for the new change stream. The ``_id`` - field in documents returned by the change stream may be used here. Unlike - ``resumeAfter``, this option can be used with a resume token from an - "invalidate" event. - - Using this option in conjunction with ``resumeAfter`` and/or - ``startAtOperationTime`` will result in a server error. The options are - mutually exclusive. - - This is not supported for server versions prior to 4.2 and will result in an - exception at execution time if used. - - .. note:: - - This is an option of the ``$changeStream`` pipeline stage. -interface: phpmethod -operation: ~ -optional: true ---- -arg_name: option -name: startAtOperationTime -type: :php:`MongoDB\\BSON\\TimestampInterface ` -description: | - If specified, the change stream will only provide changes that occurred at or - after the specified timestamp. Command responses from a MongoDB 4.0+ server - include an ``operationTime`` that can be used here. By default, the - ``operationTime`` returned by the initial ``aggregate`` command will be used - if available. - - Using this option in conjunction with ``resumeAfter`` and/or ``startAfter`` - will result in a server error. The options are mutually exclusive. - - This is not supported for server versions prior to 4.0 and will result in an - exception at execution time if used. - - .. note:: - - This is an option of the ``$changeStream`` pipeline stage. -interface: phpmethod -operation: ~ -optional: true -... diff --git a/docs/includes/apiargs-method-watch-param.yaml b/docs/includes/apiargs-method-watch-param.yaml deleted file mode 100644 index e0da852c4..000000000 --- a/docs/includes/apiargs-method-watch-param.yaml +++ /dev/null @@ -1,13 +0,0 @@ -arg_name: param -name: $pipeline -type: array|object -description: | - The pipeline of stages to append to an initial ``$changeStream`` stage. -interface: phpmethod -operation: ~ -optional: true ---- -source: - file: apiargs-common-param.yaml - ref: $options -... From 8b9ea0660a1be0850ea808ccd7b974ef0f67f8a4 Mon Sep 17 00:00:00 2001 From: Jeremy Mikola Date: Tue, 5 Dec 2023 17:43:48 -0500 Subject: [PATCH 10/18] Use basic paragraphs for Atlas Search notes --- docs/includes/extracts-note.yaml | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/docs/includes/extracts-note.yaml b/docs/includes/extracts-note.yaml index 46dadfea4..4c41e1917 100644 --- a/docs/includes/extracts-note.yaml +++ b/docs/includes/extracts-note.yaml @@ -12,21 +12,17 @@ content: | --- ref: note-atlas-search-requirement content: | - .. note:: - - This command can only be run on a deployment hosted on - :manual:`MongoDB Atlas ` and requires an Atlas cluster tier of at - least M10. A - `Local Atlas Deployment `__ - can also be used for development. + This command can only be run on a deployment hosted on + :manual:`MongoDB Atlas ` and requires an Atlas cluster tier of at + least M10. A + `Local Atlas Deployment `__ + can also be used for development. --- ref: note-atlas-search-async content: | - .. note:: - - Atlas Search indexes are managed asynchronously. After creating or - updating an index, you can periodically execute - :phpmethod:`MongoDB\\Collection::listSearchIndexes()` and check the - ``queryable`` :manual:`output field ` - to determine whether it is ready to be used. + Atlas Search indexes are managed asynchronously. After creating or updating an + index, you can periodically execute + :phpmethod:`MongoDB\\Collection::listSearchIndexes()` and check the + ``queryable`` :manual:`output field ` + to determine whether it is ready to be used. ... From 299cc5913b679135663d3b9492408ecdd8832838 Mon Sep 17 00:00:00 2001 From: Jeremy Mikola Date: Mon, 11 Dec 2023 13:21:24 -0500 Subject: [PATCH 11/18] Use extracts for watch() options --- docs/includes/extracts-watch-option.yaml | 143 ++++++++++++++ docs/includes/watch-options.rst | 185 ------------------ docs/reference/method/MongoDBClient-watch.txt | 72 ++++++- .../method/MongoDBDatabase-watch.txt | 73 ++++++- 4 files changed, 286 insertions(+), 187 deletions(-) create mode 100644 docs/includes/extracts-watch-option.yaml delete mode 100644 docs/includes/watch-options.rst diff --git a/docs/includes/extracts-watch-option.yaml b/docs/includes/extracts-watch-option.yaml new file mode 100644 index 000000000..533e76acf --- /dev/null +++ b/docs/includes/extracts-watch-option.yaml @@ -0,0 +1,143 @@ +ref: watch-option-batchSize +content: | + Specifies the batch size for the cursor, which will apply to both the initial + ``aggregate`` command and any subsequent ``getMore`` commands. This determines + the maximum number of change events to return in each response from the + server. + + .. note:: + + Irrespective of the ``batchSize`` option, the initial ``aggregate`` command + response for a change stream generally does not include any documents + unless another option is used to configure its starting point (e.g. + ``startAfter``). +--- +ref: watch-option-fullDocument +content: | + Determines how the ``fullDocument`` response field will be populated for + update operations. + + By default, change streams only return the delta of fields (via an + ``updateDescription`` field) for update operations and ``fullDocument`` is + omitted. Insert and replace operations always include the ``fullDocument`` + field. Delete operations omit the field as the document no longer exists. + + Specify "updateLookup" to return the current majority-committed version of the + updated document. + + MongoDB 6.0+ allows returning the post-image of the modified document if the + collection has ``changeStreamPreAndPostImages`` enabled. Specify + "whenAvailable" to return the post-image if available or a null value if not. + Specify "required" to return the post-image if available or raise an error if + not. + + The following values are supported: + + - ``MongoDB\Operation\Watch::FULL_DOCUMENT_UPDATE_LOOKUP`` + - ``MongoDB\Operation\Watch::FULL_DOCUMENT_WHEN_AVAILABLE`` + - ``MongoDB\Operation\Watch::FULL_DOCUMENT_REQUIRED`` + + .. note:: + + This is an option of the ``$changeStream`` pipeline stage. +--- +ref: watch-option-fullDocumentBeforeChange +content: | + Determines how the ``fullDocumentBeforeChange`` response field will be + populated. By default, the field is omitted. + + MongoDB 6.0+ allows returning the pre-image of the modified document if the + collection has ``changeStreamPreAndPostImages`` enabled. Specify + "whenAvailable" to return the pre-image if available or a null value if not. + Specify "required" to return the pre-image if available or raise an error if + not. + + The following values are supported: + + - ``MongoDB\Operation\Watch::FULL_DOCUMENT_BEFORE_CHANGE_WHEN_AVAILABLE`` + - ``MongoDB\Operation\Watch::FULL_DOCUMENT_BEFORE_CHANGE_REQUIRED`` + + .. note:: + + This is an option of the ``$changeStream`` pipeline stage. + + .. versionadded: 1.13 +--- +ref: watch-option-maxAwaitTimeMS +content: | + Positive integer denoting the time limit in milliseconds for the server to + block a getMore operation if no data is available. +--- +ref: watch-option-resumeAfter +content: | + Specifies the logical starting point for the new change stream. The ``_id`` + field in documents returned by the change stream may be used here. + + Using this option in conjunction with ``startAfter`` and/or + ``startAtOperationTime`` will result in a server error. The options are + mutually exclusive. + + .. note:: + + This is an option of the ``$changeStream`` pipeline stage. +--- +ref: watch-option-showExpandedEvents +content: | + If true, instructs the server to include additional DDL events in the change + stream. The additional events that may be included are: + + - ``createIndexes`` + - ``dropIndexes`` + - ``modify`` + - ``create`` + - ``shardCollection`` + - ``reshardCollection`` (server 6.1+) + - ``refineCollectionShardKey`` (server 6.1+) + + This is not supported for server versions prior to 6.0 and will result in an + exception at execution time if used. + + .. note:: + + This is an option of the ``$changeStream`` pipeline stage. + + .. versionadded:: 1.13 +--- +ref: watch-option-startAfter +content: | + Specifies the logical starting point for the new change stream. The ``_id`` + field in documents returned by the change stream may be used here. Unlike + ``resumeAfter``, this option can be used with a resume token from an + "invalidate" event. + + Using this option in conjunction with ``resumeAfter`` and/or + ``startAtOperationTime`` will result in a server error. The options are + mutually exclusive. + + This is not supported for server versions prior to 4.2 and will result in an + exception at execution time if used. + + .. note:: + + This is an option of the ``$changeStream`` pipeline stage. + + .. versionadded: 1.5 +--- +ref: watch-option-startAtOperationTime +content: | + If specified, the change stream will only provide changes that occurred at or + after the specified timestamp. Command responses from a MongoDB 4.0+ server + include an ``operationTime`` that can be used here. By default, the + ``operationTime`` returned by the initial ``aggregate`` command will be used + if available. + + Using this option in conjunction with ``resumeAfter`` and/or ``startAfter`` + will result in a server error. The options are mutually exclusive. + + This is not supported for server versions prior to 4.0 and will result in an + exception at execution time if used. + + .. note:: + + This is an option of the ``$changeStream`` pipeline stage. +... diff --git a/docs/includes/watch-options.rst b/docs/includes/watch-options.rst deleted file mode 100644 index 29bddfe27..000000000 --- a/docs/includes/watch-options.rst +++ /dev/null @@ -1,185 +0,0 @@ -.. list-table:: - :header-rows: 1 - :widths: 20 20 80 - - * - Name - - Type - - Description - - * - batchSize - - integer - - Specifies the batch size for the cursor, which will apply to both the - initial ``aggregate`` command and any subsequent ``getMore`` commands. - This determines the maximum number of change events to return in each - response from the server. - - .. note:: - - Irrespective of the ``batchSize`` option, the initial ``aggregate`` - command response for a change stream generally does not include any - documents unless another option is used to configure its starting - point (e.g. ``startAfter``). - - * - collation - - array|object - - .. include:: /includes/extracts/common-option-collation.rst - - * - comment - - mixed - - .. include:: /includes/extracts/common-option-comment.rst - - The comment can be any valid BSON type for server versions 4.4 and above. - Earlier server versions only support string values. - - .. versionadded:: 1.13 - - * - fullDocument - - string - - Determines how the ``fullDocument`` response field will be populated for - update operations. - - By default, change streams only return the delta of fields (via an - ``updateDescription`` field) for update operations and ``fullDocument`` - is omitted. Insert and replace operations always include the - ``fullDocument`` field. Delete operations omit the field as the document - no longer exists. - - Specify "updateLookup" to return the current majority-committed version - of the updated document. - - MongoDB 6.0+ allows returning the post-image of the modified document if - the collection has ``changeStreamPreAndPostImages`` enabled. Specify - "whenAvailable" to return the post-image if available or a null value if - not. Specify "required" to return the post-image if available or raise an - error if not. - - The following values are supported: - - - ``MongoDB\Operation\Watch::FULL_DOCUMENT_UPDATE_LOOKUP`` - - ``MongoDB\Operation\Watch::FULL_DOCUMENT_WHEN_AVAILABLE`` - - ``MongoDB\Operation\Watch::FULL_DOCUMENT_REQUIRED`` - - .. note:: - - This is an option of the ``$changeStream`` pipeline stage. - - * - fullDocumentBeforeChange - - string - - Determines how the ``fullDocumentBeforeChange`` response field will be - populated. By default, the field is omitted. - - MongoDB 6.0+ allows returning the pre-image of the modified document if - the collection has ``changeStreamPreAndPostImages`` enabled. Specify - "whenAvailable" to return the pre-image if available or a null value if - not. Specify "required" to return the pre-image if available or raise an - error if not. - - The following values are supported: - - - ``MongoDB\Operation\Watch::FULL_DOCUMENT_BEFORE_CHANGE_WHEN_AVAILABLE`` - - ``MongoDB\Operation\Watch::FULL_DOCUMENT_BEFORE_CHANGE_REQUIRED`` - - .. note:: - - This is an option of the ``$changeStream`` pipeline stage. - - .. versionadded: 1.13 - - * - maxAwaitTimeMS - - integer - - Positive integer denoting the time limit in milliseconds for the server - to block a getMore operation if no data is available. - - * - readConcern - - :php:`MongoDB\\Driver\\ReadConcern ` - - .. include:: /includes/extracts/common-option-readConcern.rst - - * - readPreference - - :php:`MongoDB\\Driver\\ReadPreference ` - - .. include:: /includes/extracts/common-option-readPreference.rst - - This is used for both the initial change stream aggregation and for - server selection during an automatic resume. - - * - resumeAfter - - array|object - - Specifies the logical starting point for the new change stream. The - ``_id`` field in documents returned by the change stream may be used - here. - - Using this option in conjunction with ``startAfter`` and/or - ``startAtOperationTime`` will result in a server error. The options are - mutually exclusive. - - .. note:: - - This is an option of the ``$changeStream`` pipeline stage. - - * - session - - :php:`MongoDB\\Driver\\Session ` - - .. include:: /includes/extracts/common-option-session.rst - - * - showExpandedEvents - - boolean - - If true, instructs the server to include additional DDL events in the - change stream. The additional events that may be included are: - - - ``createIndexes`` - - ``dropIndexes`` - - ``modify`` - - ``create`` - - ``shardCollection`` - - ``reshardCollection`` (server 6.1+) - - ``refineCollectionShardKey`` (server 6.1+) - - This is not supported for server versions prior to 6.0 and will result in - an exception at execution time if used. - - .. note:: - - This is an option of the ``$changeStream`` pipeline stage. - - .. versionadded:: 1.13 - - * - startAfter - - array|object - - Specifies the logical starting point for the new change stream. The - ``_id`` field in documents returned by the change stream may be used - here. Unlike ``resumeAfter``, this option can be used with a resume token - from an "invalidate" event. - - Using this option in conjunction with ``resumeAfter`` and/or - ``startAtOperationTime`` will result in a server error. The options are - mutually exclusive. - - This is not supported for server versions prior to 4.2 and will result in - an exception at execution time if used. - - .. note:: - - This is an option of the ``$changeStream`` pipeline stage. - - .. versionadded: 1.5 - - * - startAtOperationTime - - :php:`MongoDB\\BSON\\TimestampInterface ` - - If specified, the change stream will only provide changes that occurred - at or after the specified timestamp. Command responses from a MongoDB - 4.0+ server include an ``operationTime`` that can be used here. By - default, the ``operationTime`` returned by the initial ``aggregate`` - command will be used if available. - - Using this option in conjunction with ``resumeAfter`` and/or - ``startAfter`` will result in a server error. The options are mutually - exclusive. - - This is not supported for server versions prior to 4.0 and will result in - an exception at execution time if used. - - .. note:: - - This is an option of the ``$changeStream`` pipeline stage. - - * - typeMap - - array - - .. include:: /includes/extracts/common-option-typeMap.rst diff --git a/docs/reference/method/MongoDBClient-watch.txt b/docs/reference/method/MongoDBClient-watch.txt index d1da4b892..b98a48edd 100644 --- a/docs/reference/method/MongoDBClient-watch.txt +++ b/docs/reference/method/MongoDBClient-watch.txt @@ -36,7 +36,77 @@ Parameters ``$options`` : array An array specifying the desired options. - .. include:: /includes/watch-options.rst + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - batchSize + - integer + - .. include:: /includes/extracts/watch-option-batchSize.rst + + * - collation + - array|object + - .. include:: /includes/extracts/common-option-collation.rst + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + The comment can be any valid BSON type for server versions 4.4 and above. + Earlier server versions only support string values. + + .. versionadded:: 1.13 + + * - fullDocument + - string + - .. include:: /includes/extracts/watch-option-fullDocument.rst + + * - fullDocumentBeforeChange + - string + - .. include:: /includes/extracts/watch-option-fullDocumentBeforeChange.rst + + * - maxAwaitTimeMS + - integer + - .. include:: /includes/extracts/watch-option-maxAwaitTimeMS.rst + + * - readConcern + - :php:`MongoDB\\Driver\\ReadConcern ` + - .. include:: /includes/extracts/client-option-readConcern.rst + + * - readPreference + - :php:`MongoDB\\Driver\\ReadPreference ` + - .. include:: /includes/extracts/client-option-readPreference.rst + + This is used for both the initial change stream aggregation and for + server selection during an automatic resume. + + * - resumeAfter + - array|object + - .. include:: /includes/extracts/watch-option-resumeAfter.rst + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst + + * - showExpandedEvents + - boolean + - .. include:: /includes/extracts/watch-option-showExpandedEvents.rst + + * - startAfter + - array|object + - .. include:: /includes/extracts/watch-option-startAfter.rst + + * - startAtOperationTime + - :php:`MongoDB\\BSON\\TimestampInterface ` + - .. include:: /includes/extracts/watch-option-startAtOperationTime.rst + + * - typeMap + - array + - .. include:: /includes/extracts/client-option-typeMap.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBDatabase-watch.txt b/docs/reference/method/MongoDBDatabase-watch.txt index 61a7680ba..8185956a1 100644 --- a/docs/reference/method/MongoDBDatabase-watch.txt +++ b/docs/reference/method/MongoDBDatabase-watch.txt @@ -35,7 +35,78 @@ Parameters ``$options`` : array An array specifying the desired options. - .. include:: /includes/watch-options.rst + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - batchSize + - integer + - .. include:: /includes/extracts/watch-option-batchSize.rst + + * - collation + - array|object + - .. include:: /includes/extracts/common-option-collation.rst + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + The comment can be any valid BSON type for server versions 4.4 and above. + Earlier server versions only support string values. + + .. versionadded:: 1.13 + + * - fullDocument + - string + - .. include:: /includes/extracts/watch-option-fullDocument.rst + + * - fullDocumentBeforeChange + - string + - .. include:: /includes/extracts/watch-option-fullDocumentBeforeChange.rst + + * - maxAwaitTimeMS + - integer + - .. include:: /includes/extracts/watch-option-maxAwaitTimeMS.rst + + * - readConcern + - :php:`MongoDB\\Driver\\ReadConcern ` + - .. include:: /includes/extracts/database-option-readConcern.rst + + * - readPreference + - :php:`MongoDB\\Driver\\ReadPreference ` + - .. include:: /includes/extracts/database-option-readPreference.rst + + This is used for both the initial change stream aggregation and for + server selection during an automatic resume. + + * - resumeAfter + - array|object + - .. include:: /includes/extracts/watch-option-resumeAfter.rst + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst + + * - showExpandedEvents + - boolean + - .. include:: /includes/extracts/watch-option-showExpandedEvents.rst + + * - startAfter + - array|object + - .. include:: /includes/extracts/watch-option-startAfter.rst + + * - startAtOperationTime + - :php:`MongoDB\\BSON\\TimestampInterface ` + - .. include:: /includes/extracts/watch-option-startAtOperationTime.rst + + * - typeMap + - array + - .. include:: /includes/extracts/database-option-typeMap.rst Return Values ------------- From b8220d0be91e7899d3c41ff56d95406ef355e8b6 Mon Sep 17 00:00:00 2001 From: Jeremy Mikola Date: Mon, 11 Dec 2023 13:23:04 -0500 Subject: [PATCH 12/18] Order options alphabetically --- .../MongoDBDatabase-createCollection.txt | 48 +++++++++---------- .../method/MongoDBDatabase-dropCollection.txt | 18 +++---- .../MongoDBDatabase-renameCollection.txt | 10 ++-- 3 files changed, 38 insertions(+), 38 deletions(-) diff --git a/docs/reference/method/MongoDBDatabase-createCollection.txt b/docs/reference/method/MongoDBDatabase-createCollection.txt index 4cb10d2ad..2fe421b4e 100644 --- a/docs/reference/method/MongoDBDatabase-createCollection.txt +++ b/docs/reference/method/MongoDBDatabase-createCollection.txt @@ -245,30 +245,6 @@ Parameters This will be used for the returned command result document. - * - validator - - array|object - - Allows users to specify :manual:`validation rules or expressions - ` for the collection. For more information, - see :manual:`Document Validation ` in the - MongoDB manual. - - The ``validator`` option takes an array that specifies the validation - rules or expressions. You can specify the expressions using the same - operators as MongoDB's - :manual:`query operators ` with the - exception of :query:`$geoNear`, :query:`$near`, :query:`$nearSphere`, - :query:`$text`, and :query:`$where`. - - .. note:: - - - Validation occurs during updates and inserts. Existing documents - do not undergo validation checks until modification. - - - You cannot specify a validator for collections in the ``admin``, - ``local``, and ``config`` databases. - - - You cannot specify a validator for ``system.*`` collections. - * - validationAction - string - Determines whether to ``error`` on invalid documents or just ``warn`` @@ -315,6 +291,30 @@ Parameters *valid* documents. Do not apply rules to updates on existing *invalid* documents. + * - validator + - array|object + - Allows users to specify :manual:`validation rules or expressions + ` for the collection. For more information, + see :manual:`Document Validation ` in the + MongoDB manual. + + The ``validator`` option takes an array that specifies the validation + rules or expressions. You can specify the expressions using the same + operators as MongoDB's + :manual:`query operators ` with the + exception of :query:`$geoNear`, :query:`$near`, :query:`$nearSphere`, + :query:`$text`, and :query:`$where`. + + .. note:: + + - Validation occurs during updates and inserts. Existing documents + do not undergo validation checks until modification. + + - You cannot specify a validator for collections in the ``admin``, + ``local``, and ``config`` databases. + + - You cannot specify a validator for ``system.*`` collections. + * - viewOn - string - The name of the source collection or view from which to create the view. diff --git a/docs/reference/method/MongoDBDatabase-dropCollection.txt b/docs/reference/method/MongoDBDatabase-dropCollection.txt index 4cfa05902..fe3cd6890 100644 --- a/docs/reference/method/MongoDBDatabase-dropCollection.txt +++ b/docs/reference/method/MongoDBDatabase-dropCollection.txt @@ -41,6 +41,15 @@ Parameters - Type - Description + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + This is not supported for server versions prior to 4.4 and will result + in an exception at execution time if used. + + .. versionadded:: 1.13 + * - encryptedFields - array|object - A document describing encrypted fields for queryable encryption. If @@ -61,15 +70,6 @@ Parameters .. versionadded:: 1.13 - * - comment - - mixed - - .. include:: /includes/extracts/common-option-comment.rst - - This is not supported for server versions prior to 4.4 and will result - in an exception at execution time if used. - - .. versionadded:: 1.13 - * - session - :php:`MongoDB\\Driver\\Session ` - .. include:: /includes/extracts/common-option-session.rst diff --git a/docs/reference/method/MongoDBDatabase-renameCollection.txt b/docs/reference/method/MongoDBDatabase-renameCollection.txt index 31f7ba28e..80b6be83e 100644 --- a/docs/reference/method/MongoDBDatabase-renameCollection.txt +++ b/docs/reference/method/MongoDBDatabase-renameCollection.txt @@ -63,6 +63,11 @@ Parameters .. versionadded:: 1.13 + * - dropTarget + - boolean + - If ``true``, MongoDB will drop the target before renaming the + collection. The default value is ``false``. + * - session - :php:`MongoDB\\Driver\\Session ` - .. include:: /includes/extracts/common-option-session.rst @@ -77,11 +82,6 @@ Parameters - :php:`MongoDB\\Driver\\WriteConcern ` - .. include:: /includes/extracts/database-option-writeConcern.rst - * - dropTarget - - boolean - - If ``true``, MongoDB will drop the target before renaming the - collection. The default value is ``false``. - Return Values ------------- From 7cb26d3e8b2499cdb7a93b17cdeaa45c60e9d512 Mon Sep 17 00:00:00 2001 From: Jeremy Mikola Date: Mon, 11 Dec 2023 13:24:41 -0500 Subject: [PATCH 13/18] Do not use typeMap extract for withOptions() --- docs/reference/method/MongoDBDatabase-withOptions.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/reference/method/MongoDBDatabase-withOptions.txt b/docs/reference/method/MongoDBDatabase-withOptions.txt index d5a50d8bf..5602b789a 100644 --- a/docs/reference/method/MongoDBDatabase-withOptions.txt +++ b/docs/reference/method/MongoDBDatabase-withOptions.txt @@ -47,8 +47,10 @@ Parameters * - typeMap - array - - .. |parent| replace:: original database - .. include:: /includes/extracts/database-option-typeMap.rst + - The :php:`type map + ` + to apply to cursors, which determines how BSON documents are converted + to PHP values. Defaults to the original database's type map. * - writeConcern - :php:`MongoDB\\Driver\\WriteConcern ` From 128f5c0d295fbab6df425b2e951c94e0c549af8e Mon Sep 17 00:00:00 2001 From: Jeremy Mikola Date: Mon, 11 Dec 2023 13:25:09 -0500 Subject: [PATCH 14/18] Reformat text for word wrap --- docs/reference/method/MongoDBDatabase-withOptions.txt | 6 ++---- docs/reference/method/MongoDBDatabase__construct.txt | 8 ++++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/docs/reference/method/MongoDBDatabase-withOptions.txt b/docs/reference/method/MongoDBDatabase-withOptions.txt index 5602b789a..fc5d88ec8 100644 --- a/docs/reference/method/MongoDBDatabase-withOptions.txt +++ b/docs/reference/method/MongoDBDatabase-withOptions.txt @@ -54,10 +54,8 @@ Parameters * - writeConcern - :php:`MongoDB\\Driver\\WriteConcern ` - - The default write concern to use for database operations. Defaults - to the original database's write concern. - - + - The default write concern to use for database operations. Defaults to + the original database's write concern. Return Values ------------- diff --git a/docs/reference/method/MongoDBDatabase__construct.txt b/docs/reference/method/MongoDBDatabase__construct.txt index e2674ae3a..0a715e994 100644 --- a/docs/reference/method/MongoDBDatabase__construct.txt +++ b/docs/reference/method/MongoDBDatabase__construct.txt @@ -48,8 +48,8 @@ Parameters * - readConcern - :php:`MongoDB\\Driver\\ReadConcern ` - - The default read concern to use for database operations. Defaults to the - manager's read concern. + - The default read concern to use for database operations. Defaults to + the manager's read concern. * - readPreference - :php:`MongoDB\\Driver\\ReadPreference ` @@ -73,8 +73,8 @@ Parameters * - writeConcern - :php:`MongoDB\\Driver\\WriteConcern ` - - The default write concern to use for database operations. Defaults - to the manager's write concern. + - The default write concern to use for database operations. Defaults to + the manager's write concern. Errors/Exceptions ----------------- From ba37f0ed051adde8e1ce3ec80d97ff5fab9ff247 Mon Sep 17 00:00:00 2001 From: Jeremy Mikola Date: Mon, 11 Dec 2023 13:26:12 -0500 Subject: [PATCH 15/18] Replace apiargs for Collection methods --- .../method/MongoDBCollection-aggregate.txt | 121 ++++++++++- .../method/MongoDBCollection-bulkWrite.txt | 91 +++++++- .../method/MongoDBCollection-count.txt | 76 ++++++- .../MongoDBCollection-countDocuments.txt | 61 +++++- .../method/MongoDBCollection-createIndex.txt | 116 +++++++++- .../MongoDBCollection-createIndexes.txt | 86 +++++++- .../MongoDBCollection-createSearchIndex.txt | 44 +++- .../MongoDBCollection-createSearchIndexes.txt | 41 +++- .../method/MongoDBCollection-deleteMany.txt | 65 +++++- .../method/MongoDBCollection-deleteOne.txt | 65 +++++- .../method/MongoDBCollection-distinct.txt | 69 +++++- .../method/MongoDBCollection-drop.txt | 66 +++++- .../method/MongoDBCollection-dropIndex.txt | 60 +++++- .../method/MongoDBCollection-dropIndexes.txt | 55 ++++- .../MongoDBCollection-dropSearchIndex.txt | 26 ++- ...ngoDBCollection-estimatedDocumentCount.txt | 44 +++- .../method/MongoDBCollection-explain.txt | 48 ++++- .../method/MongoDBCollection-find.txt | 204 +++++++++++++++++- .../method/MongoDBCollection-findOne.txt | 155 ++++++++++++- .../MongoDBCollection-findOneAndDelete.txt | 87 +++++++- .../MongoDBCollection-findOneAndReplace.txt | 110 +++++++++- .../MongoDBCollection-findOneAndUpdate.txt | 121 ++++++++++- .../method/MongoDBCollection-insertMany.txt | 61 +++++- .../method/MongoDBCollection-insertOne.txt | 51 ++++- .../method/MongoDBCollection-listIndexes.txt | 33 ++- .../MongoDBCollection-listSearchIndexes.txt | 72 ++++++- .../method/MongoDBCollection-mapReduce.txt | 141 +++++++++++- .../method/MongoDBCollection-rename.txt | 62 +++++- .../method/MongoDBCollection-replaceOne.txt | 80 ++++++- .../method/MongoDBCollection-updateMany.txt | 91 +++++++- .../method/MongoDBCollection-updateOne.txt | 91 +++++++- .../MongoDBCollection-updateSearchIndex.txt | 40 +++- .../method/MongoDBCollection-watch.txt | 90 +++++++- .../method/MongoDBCollection-withOptions.txt | 40 +++- .../method/MongoDBCollection__construct.txt | 58 ++++- 35 files changed, 2539 insertions(+), 182 deletions(-) diff --git a/docs/reference/method/MongoDBCollection-aggregate.txt b/docs/reference/method/MongoDBCollection-aggregate.txt index 6975098db..082a884ce 100644 --- a/docs/reference/method/MongoDBCollection-aggregate.txt +++ b/docs/reference/method/MongoDBCollection-aggregate.txt @@ -20,15 +20,126 @@ Definition .. code-block:: php - function aggregate(array $pipeline, array $options = []): Traversable + function aggregate( + array $pipeline, + array $options = [] + ): Traversable - This method has the following parameters: +Parameters +---------- + +``$pipeline`` : array + Specifies an :manual:`aggregation pipeline ` + operation. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - allowDiskUse + - boolean + - Enables writing to temporary files. When set to ``true``, aggregation + stages can write data to the ``_tmp`` sub-directory in the ``dbPath`` + directory. + + * - batchSize + - integer + - Specifies the batch size for the cursor, which will apply to both the + initial ``aggregate`` command and any subsequent ``getMore`` commands. + This determines the maximum number of documents to return in each + response from the server. + + A batchSize of ``0`` is special in that and will only apply to the + initial ``aggregate`` command; subsequent ``getMore`` commands will use + the server's default batch size. This may be useful for quickly + returning a cursor or failure from ``aggregate`` without doing + significant server-side work. + + * - bypassDocumentValidation + - boolean + - If ``true``, allows the write operation to circumvent document level + validation. Defaults to ``false``. + + This only applies when using the :ref:`$out ` and + :ref:`$out ` stages. + + * - collation + - array|object + - .. include:: /includes/extracts/collection-option-collation.rst + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + The comment can be any valid BSON type for server versions 4.4 and + above. Earlier server versions only support string values. + + .. versionadded:: 1.3 + + * - explain + - boolean + - Specifies whether or not to return the information on the processing of + the pipeline. + + .. versionadded:: 1.4 + + * - hint + - string|array|object + - .. include:: /includes/extracts/common-option-hint.rst + + .. versionadded:: 1.3 + + * - let + - array|object + - .. include:: /includes/extracts/common-option-let.rst + + .. versionadded:: 1.9 + + * - maxTimeMS + - integer + - .. include:: /includes/extracts/common-option-maxTimeMS.rst + + * - readConcern + - :php:`MongoDB\\Driver\\ReadConcern ` + - .. include:: /includes/extracts/collection-option-readConcern.rst + + It is not possible to specify a :manual:`read concern + ` for individual operations as part of a + transaction. Instead, set the ``readConcern`` option when starting the + transaction with :php:`startTransaction `. + + * - readPreference + - :php:`MongoDB\\Driver\\ReadPreference ` + - .. include:: /includes/extracts/collection-option-readPreference.rst + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst + + .. versionadded:: 1.3 + + * - typeMap + - array + - .. include:: /includes/extracts/collection-option-typeMap.rst - .. include:: /includes/apiargs/MongoDBCollection-method-aggregate-param.rst + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - .. include:: /includes/extracts/collection-option-writeConcern.rst - The ``$options`` parameter supports the following options: + It is not possible to specify a :manual:`write concern + ` for individual operations as part of a + transaction. Instead, set the ``writeConcern`` option when starting the + transaction with :php:`startTransaction `. - .. include:: /includes/apiargs/MongoDBCollection-method-aggregate-option.rst + This only applies when a :ref:`$out ` or + :ref:`$merge ` stage is specified. Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-bulkWrite.txt b/docs/reference/method/MongoDBCollection-bulkWrite.txt index e58688cbd..64ae03f6d 100644 --- a/docs/reference/method/MongoDBCollection-bulkWrite.txt +++ b/docs/reference/method/MongoDBCollection-bulkWrite.txt @@ -19,15 +19,96 @@ Definition .. code-block:: php - function bulkWrite(array $operations, array $options = []): MongoDB\BulkWriteResult + function bulkWrite( + array $operations, + array $options = [] + ): MongoDB\BulkWriteResult - This method has the following parameters: +Parameters +---------- + +``$operations`` : array + An array containing the write operations to perform. + :phpmethod:`MongoDB\\Collection::bulkWrite()` supports + :phpmethod:`deleteMany() `, + :phpmethod:`deleteOne() `, + :phpmethod:`insertOne() `, + :phpmethod:`replaceOne() `, + :phpmethod:`updateMany() `, and + :phpmethod:`updateOne() ` operations in the + following array structure: + + .. code-block:: php + + [ + [ 'deleteMany' => [ $filter ] ], + [ 'deleteOne' => [ $filter ] ], + [ 'insertOne' => [ $document ] ], + [ 'replaceOne' => [ $filter, $replacement, $options ] ], + [ 'updateMany' => [ $filter, $update, $options ] ], + [ 'updateOne' => [ $filter, $update, $options ] ], + ] + + Arguments correspond to the respective operation methods. However, the + ``writeConcern`` option is specified as a top-level option to + :phpmethod:`MongoDB\\Collection::bulkWrite()` instead of each individual + operation. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - bypassDocumentValidation + - boolean + - If ``true``, allows the write operation to circumvent document level + validation. Defaults to ``false``. + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + This is not supported for server versions prior to 4.4 and will result + in an exception at execution time if used. + + .. versionadded:: 1.13 + + * - let + - array|object + - .. include:: /includes/extracts/common-option-let.rst + + .. versionadded:: 1.13 + + * - ordered + - boolean + - If ``true``: when a single write fails, the operation will stop without + performing the remaining writes and throw an exception. + + If ``false``: when a single write fails, the operation will continue + with the remaining writes, if any, and throw an exception. + + The default is ``true``. + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst - .. include:: /includes/apiargs/MongoDBCollection-method-bulkWrite-param.rst + .. versionadded:: 1.3 - The ``$options`` parameter supports the following options: + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - .. include:: /includes/extracts/collection-option-writeConcern.rst - .. include:: /includes/apiargs/MongoDBCollection-method-bulkWrite-option.rst + It is not possible to specify a :manual:`write concern + ` for individual operations as part of a + transaction. Instead, set the ``writeConcern`` option when starting the + transaction with :php:`startTransaction `. Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-count.txt b/docs/reference/method/MongoDBCollection-count.txt index 1673ed91d..2f641d893 100644 --- a/docs/reference/method/MongoDBCollection-count.txt +++ b/docs/reference/method/MongoDBCollection-count.txt @@ -21,15 +21,81 @@ Definition .. code-block:: php - function count(array|object $filter = [], array $options = []): integer + function count( + array|object $filter = [], + array $options = [] + ): integer - This method has the following parameters: +Parameters +---------- + +``$filter`` : array|object + The filter criteria that specifies the documents to count. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - collation + - array|object + - .. include:: /includes/extracts/collection-option-collation.rst + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + This is not supported for server versions prior to 4.4 and will result + in an exception at execution time if used. + + .. versionadded:: 1.13 + + * - hint + - string|array|object + - .. include:: /includes/extracts/common-option-hint.rst + + .. versionchanged:: 1.2 + + If a document is provided, it is passed to the command as-is. + Previously, the library would convert the key pattern to an index + name. + + * - limit + - integer + - The maximum number of matching documents to return. + + * - maxTimeMS + - integer + - .. include:: /includes/extracts/common-option-maxTimeMS.rst + + * - readConcern + - :php:`MongoDB\\Driver\\ReadConcern ` + - .. include:: /includes/extracts/collection-option-readConcern.rst + + It is not possible to specify a :manual:`read concern + ` for individual operations as part of a + transaction. Instead, set the ``readConcern`` option when starting the + transaction with :php:`startTransaction `. + + * - readPreference + - :php:`MongoDB\\Driver\\ReadPreference ` + - .. include:: /includes/extracts/collection-option-readPreference.rst - .. include:: /includes/apiargs/MongoDBCollection-method-count-param.rst + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst - The ``$options`` parameter supports the following options: + .. versionadded:: 1.3 - .. include:: /includes/apiargs/MongoDBCollection-method-count-option.rst + * - skip + - integer + - The number of matching documents to skip before returning results. Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-countDocuments.txt b/docs/reference/method/MongoDBCollection-countDocuments.txt index 44b16c8e0..ba7e1a8b6 100644 --- a/docs/reference/method/MongoDBCollection-countDocuments.txt +++ b/docs/reference/method/MongoDBCollection-countDocuments.txt @@ -23,13 +23,66 @@ Definition function countDocuments(array|object $filter = [], array $options = []): integer - This method has the following parameters: +Parameters +---------- + +``$filter`` : array|object + The filter criteria that specifies the documents to count. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - collation + - array|object + - .. include:: /includes/extracts/collection-option-collation.rst + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + The comment can be any valid BSON type for server versions 4.4 and above. + Earlier server versions only support string values. + + * - hint + - string|array|object + - .. include:: /includes/extracts/common-option-hint.rst + + * - limit + - integer + - The maximum number of matching documents to return. + + * - maxTimeMS + - integer + - .. include:: /includes/extracts/common-option-maxTimeMS.rst + + * - readConcern + - :php:`MongoDB\\Driver\\ReadConcern ` + - .. include:: /includes/extracts/collection-option-readConcern.rst + + It is not possible to specify a :manual:`read concern + ` for individual operations as part of a + transaction. Instead, set the ``readConcern`` option when starting the + transaction with :php:`startTransaction `. - .. include:: /includes/apiargs/MongoDBCollection-method-countDocuments-param.rst + * - readPreference + - :php:`MongoDB\\Driver\\ReadPreference ` + - .. include:: /includes/extracts/collection-option-readPreference.rst - The ``$options`` parameter supports the following options: + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst - .. include:: /includes/apiargs/MongoDBCollection-method-countDocuments-option.rst + * - skip + - integer + - The number of matching documents to skip before returning results. Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-createIndex.txt b/docs/reference/method/MongoDBCollection-createIndex.txt index ceef2e7bc..5dda0dedd 100644 --- a/docs/reference/method/MongoDBCollection-createIndex.txt +++ b/docs/reference/method/MongoDBCollection-createIndex.txt @@ -19,20 +19,118 @@ Definition .. code-block:: php - function createIndex(array|object $key, array $options = []): string + function createIndex( + array|object $key, + array $options = [] + ): string - This method has the following parameters: +Parameters +---------- + +``$key`` : array|object + Specifies the field or fields to index and the index order. + + For example, the following specifies a descending index on the ``username`` + field: + + .. code-block:: php + + [ 'username' => -1 ] + +``$options`` : array + An array specifying the desired options. + + The ``$options`` parameter accepts both index *and* command options. A + non-exhaustive list of index options follows. For a complete list of index + options, refer to the + :manual:`createIndexes ` command reference + in the MongoDB manual. + + **Index Options** (non-exhaustive) + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - collation + - array|object + - .. include:: /includes/extracts/collection-option-collation.rst + + * - expireAfterSeconds + - integer + - Creates a :manual:`TTL ` index. + + * - name + - string + - A name that uniquely identifies the index. By default, MongoDB creates + index names based on the key. + + * - partialFilterExpression + - array|object + - Creates a :manual:`partial ` index. + + * - sparse + - boolean + - Creates a :manual:`sparse ` index. + + * - unique + - boolean + - Creates a :manual:`unique ` index. + + **Command Options** + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + This is not supported for server versions prior to 4.4 and will result in an + exception at execution time if used. + + .. versionadded:: 1.13 + + * - commitQuorum + - string|integer + - Specifies how many data-bearing members of a replica set, including the + primary, must complete the index builds successfully before the primary + marks the indexes as ready. + + This option accepts the same values for the ``w`` field in a write + concern plus ``"votingMembers"``, which indicates all voting + data-bearing nodes. + + This is not supported for server versions prior to 4.4 and will result + in an exception at execution time if used. + + .. versionadded:: 1.7 + + * - maxTimeMS + - integer + - .. include:: /includes/extracts/common-option-maxTimeMS.rst + + .. versionadded:: 1.3 - .. include:: /includes/apiargs/MongoDBCollection-method-createIndex-param.rst + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst - The ``$options`` parameter accepts all index options that your MongoDB - version supports. MongoDB includes the following options: + .. versionadded:: 1.3 - .. include:: /includes/apiargs/MongoDBCollection-method-createIndex-option.rst + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - .. include:: /includes/extracts/collection-option-writeConcern.rst - For a full list of the supported index creation options, refer to the - :manual:`createIndexes ` command reference - in the MongoDB manual. + It is not possible to specify a :manual:`write concern + ` for individual operations as part of a + transaction. Instead, set the ``writeConcern`` option when starting the + transaction with :php:`startTransaction `. Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-createIndexes.txt b/docs/reference/method/MongoDBCollection-createIndexes.txt index 76705e9ba..b53bbf51e 100644 --- a/docs/reference/method/MongoDBCollection-createIndexes.txt +++ b/docs/reference/method/MongoDBCollection-createIndexes.txt @@ -19,15 +19,81 @@ Definition .. code-block:: php - function createIndexes(array $indexes, array $options = []): string[] + function createIndexes( + array $indexes, + array $options = [] + ): string[] - This method has the following parameters: +Parameters +---------- + +``$indexes`` : array + The indexes to create on the collection. + + For example, the following specifies a unique index on the ``username`` field + and a compound index on the ``email`` and ``createdAt`` fields: + + .. code-block:: php + + [ + [ 'key' => [ 'username' => -1 ], 'unique' => true ], + [ 'key' => [ 'email' => 1, 'createdAt' => 1 ] ], + ] + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + This is not supported for server versions prior to 4.4 and will result in an + exception at execution time if used. - .. include:: /includes/apiargs/MongoDBCollection-method-createIndexes-param.rst + .. versionadded:: 1.13 - The ``$options`` parameter supports the following options: + * - commitQuorum + - string|integer + - Specifies how many data-bearing members of a replica set, including the + primary, must complete the index builds successfully before the primary marks + the indexes as ready. - .. include:: /includes/apiargs/MongoDBCollection-method-createIndexes-option.rst + This option accepts the same values for the ``w`` field in a write concern + plus ``"votingMembers"``, which indicates all voting data-bearing nodes. + + This is not supported for server versions prior to 4.4 and will result in an + exception at execution time if used. + + .. versionadded:: 1.7 + + * - maxTimeMS + - integer + - .. include:: /includes/extracts/common-option-maxTimeMS.rst + + .. versionadded:: 1.3 + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst + + .. versionadded:: 1.3 + + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - .. include:: /includes/extracts/collection-option-writeConcern.rst + + It is not possible to specify a :manual:`write concern + ` for individual operations as part of a + transaction. Instead, set the ``writeConcern`` option when starting the + transaction with :php:`startTransaction `. Return Values ------------- @@ -41,15 +107,21 @@ Errors/Exceptions .. include:: /includes/extracts/error-invalidargumentexception.rst .. include:: /includes/extracts/error-driver-runtimeexception.rst +Behavior +-------- + ``$indexes`` parameter ----------------------- +~~~~~~~~~~~~~~~~~~~~~~ The ``$indexes`` parameter is an array of index specification documents. Each element in ``$indexes`` must itself be an array or object with a ``key`` field, which corresponds to the ``$key`` parameter of :phpmethod:`createIndex() `. The array or object may include other fields that correspond to index options accepted by :phpmethod:`createIndex() -` (excluding ``writeConcern``). +`. For a full list of the supported index +creation options, refer to the +:manual:`createIndexes ` command reference +in the MongoDB manual. For example, the following ``$indexes`` parameter creates two indexes. The first is an ascending unique index on the ``username`` field and the second is a diff --git a/docs/reference/method/MongoDBCollection-createSearchIndex.txt b/docs/reference/method/MongoDBCollection-createSearchIndex.txt index d3f63773a..53590de9c 100644 --- a/docs/reference/method/MongoDBCollection-createSearchIndex.txt +++ b/docs/reference/method/MongoDBCollection-createSearchIndex.txt @@ -21,18 +21,42 @@ Definition .. code-block:: php - function createSearchIndex(array|object $definition, array $options = []): string + function createSearchIndex( + array|object $definition, + array $options = [] + ): string - This method has the following parameters: + .. include:: /includes/extracts/note-atlas-search-requirement.rst + .. include:: /includes/extracts/note-atlas-search-async.rst + +Parameters +---------- - .. include:: /includes/apiargs/MongoDBCollection-method-createSearchIndex-param.rst +``$definition`` : array|object + Document describing the index to create. For details on definition syntax, see + :manual:`Search Index Definition Syntax `. - The ``$options`` parameter supports the following options: +``$options`` : array + An array specifying the desired options. - .. include:: /includes/apiargs/MongoDBCollection-method-createSearchIndex-option.rst + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 - .. include:: /includes/extracts/note-atlas-search-requirement.rst - .. include:: /includes/extracts/note-atlas-search-async.rst + * - Name + - Type + - Description + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + * - name + - string + - Name of the search index to create. + + You cannot create multiple indexes with the same name on a single + collection. If you do not specify a name, the index is named "default". Return Values ------------- @@ -46,6 +70,12 @@ Errors/Exceptions .. include:: /includes/extracts/error-invalidargumentexception.rst .. include:: /includes/extracts/error-driver-runtimeexception.rst +Behavior +-------- + +.. include:: /includes/extracts/note-atlas-search-requirement.rst +.. include:: /includes/extracts/note-atlas-search-async.rst + Examples -------- diff --git a/docs/reference/method/MongoDBCollection-createSearchIndexes.txt b/docs/reference/method/MongoDBCollection-createSearchIndexes.txt index 176dbf6a2..9abc68295 100644 --- a/docs/reference/method/MongoDBCollection-createSearchIndexes.txt +++ b/docs/reference/method/MongoDBCollection-createSearchIndexes.txt @@ -21,18 +21,39 @@ Definition .. code-block:: php - function createSearchIndexes(array $indexes, array $options = []): string + function createSearchIndexes( + array $indexes, + array $options = [] + ): string - This method has the following parameters: +Parameters +---------- + +``$indexes`` : array + Array of documents describing the indexes to create. + + A required ``definition`` document field describes the index to create. For + details on definition syntax, see + :manual:`Search Index Definition Syntax `. + + An optional ``name`` string field specifies the name of the search index to + create. You cannot create multiple indexes with the same name on a single + collection. If you do not specify a name, the index is named "default". - .. include:: /includes/apiargs/MongoDBCollection-method-createSearchIndexes-param.rst +``$options`` : array + An array specifying the desired options. - The ``$options`` parameter supports the following options: + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 - .. include:: /includes/apiargs/MongoDBCollection-method-createSearchIndexes-option.rst + * - Name + - Type + - Description - .. include:: /includes/extracts/note-atlas-search-requirement.rst - .. include:: /includes/extracts/note-atlas-search-async.rst + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst Return Values ------------- @@ -46,6 +67,12 @@ Errors/Exceptions .. include:: /includes/extracts/error-invalidargumentexception.rst .. include:: /includes/extracts/error-driver-runtimeexception.rst +Behavior +-------- + +.. include:: /includes/extracts/note-atlas-search-requirement.rst +.. include:: /includes/extracts/note-atlas-search-async.rst + Examples -------- diff --git a/docs/reference/method/MongoDBCollection-deleteMany.txt b/docs/reference/method/MongoDBCollection-deleteMany.txt index 29ad2e833..868bdf38b 100644 --- a/docs/reference/method/MongoDBCollection-deleteMany.txt +++ b/docs/reference/method/MongoDBCollection-deleteMany.txt @@ -19,15 +19,70 @@ Definition .. code-block:: php - function deleteMany(array|object $filter, array $options = []): MongoDB\DeleteResult + function deleteMany( + array|object $filter, + array $options = [] + ): MongoDB\DeleteResult - This method has the following parameters: +Parameters +---------- + +``$filter`` : array|object + The filter criteria that specifies the documents to delete. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - collation + - array|object + - .. include:: /includes/extracts/collection-option-collation.rst + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + This is not supported for server versions prior to 4.4 and will result + in an exception at execution time if used. + + .. versionadded:: 1.13 + + * - hint + - string|array|object + - .. include:: /includes/extracts/common-option-hint.rst + + This option is available in MongoDB 4.4+ and will result in an + exception at execution time if specified for an older server version. + + .. versionadded:: 1.7 + + * - let + - array|object + - .. include:: /includes/extracts/common-option-let.rst + + .. versionadded:: 1.13 + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst - .. include:: /includes/apiargs/MongoDBCollection-method-deleteMany-param.rst + .. versionadded:: 1.3 - The ``$options`` parameter supports the following options: + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - .. include:: /includes/extracts/collection-option-writeConcern.rst - .. include:: /includes/apiargs/MongoDBCollection-method-deleteMany-option.rst + It is not possible to specify a :manual:`write concern + ` for individual operations as part of a + transaction. Instead, set the ``writeConcern`` option when starting the + transaction with :php:`startTransaction `. Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-deleteOne.txt b/docs/reference/method/MongoDBCollection-deleteOne.txt index 6c888a961..88903a48e 100644 --- a/docs/reference/method/MongoDBCollection-deleteOne.txt +++ b/docs/reference/method/MongoDBCollection-deleteOne.txt @@ -21,15 +21,70 @@ Definition .. code-block:: php - function deleteOne(array|object $filter, array $options = []): MongoDB\DeleteResult + function deleteOne( + array|object $filter, + array $options = [] + ): MongoDB\DeleteResult - This method has the following parameters: +Parameters +---------- + +``$filter`` : array|object + The filter criteria that specifies the documents to delete. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - collation + - array|object + - .. include:: /includes/extracts/collection-option-collation.rst + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + This is not supported for server versions prior to 4.4 and will result in an + exception at execution time if used. + + .. versionadded:: 1.13 + + * - hint + - string|array|object + - .. include:: /includes/extracts/common-option-hint.rst + + This option is available in MongoDB 4.4+ and will result in an exception at + execution time if specified for an older server version. + + .. versionadded:: 1.7 + + * - let + - array|object + - .. include:: /includes/extracts/common-option-let.rst + + .. versionadded:: 1.13 + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst - .. include:: /includes/apiargs/MongoDBCollection-method-deleteOne-param.rst + .. versionadded:: 1.3 - The ``$options`` parameter supports the following options: + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - .. include:: /includes/extracts/collection-option-writeConcern.rst - .. include:: /includes/apiargs/MongoDBCollection-method-deleteOne-option.rst + It is not possible to specify a :manual:`write concern + ` for individual operations as part of a + transaction. Instead, set the ``writeConcern`` option when starting the + transaction with :php:`startTransaction `. Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-distinct.txt b/docs/reference/method/MongoDBCollection-distinct.txt index 24fd6761a..873d2fb78 100644 --- a/docs/reference/method/MongoDBCollection-distinct.txt +++ b/docs/reference/method/MongoDBCollection-distinct.txt @@ -19,15 +19,74 @@ Definition .. code-block:: php - function distinct(string $fieldName, array|object $filter = [], array $options = []): mixed[] + function distinct( + string $fieldName, + array|object $filter = [], + array $options = [] + ): mixed[] - This method has the following parameters: +Parameters +---------- + +``$fieldName`` : string + The field for which to return distinct values. + +``$filter`` : array|object + The filter criteria that specifies the documents from which to retrieve the + distinct values. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - collation + - array|object + - .. include:: /includes/extracts/collection-option-collation.rst + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + This is not supported for server versions prior to 4.4 and will result in an + exception at execution time if used. + + .. versionadded:: 1.13 + + * - maxTimeMS + - integer + - .. include:: /includes/extracts/common-option-maxTimeMS.rst + + * - readConcern + - :php:`MongoDB\\Driver\\ReadConcern ` + - .. include:: /includes/extracts/collection-option-readConcern.rst + + It is not possible to specify a :manual:`read concern + ` for individual operations as part of a + transaction. Instead, set the ``readConcern`` option when starting the + transaction with :php:`startTransaction `. + + * - readPreference + - :php:`MongoDB\\Driver\\ReadPreference ` + - .. include:: /includes/extracts/collection-option-readPreference.rst + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst - .. include:: /includes/apiargs/MongoDBCollection-method-distinct-param.rst + .. versionadded:: 1.3 - The ``$options`` parameter supports the following options: + * - typeMap + - array + - .. include:: /includes/extracts/collection-option-typeMap.rst - .. include:: /includes/apiargs/MongoDBCollection-method-distinct-option.rst + .. versionadded:: 1.5 Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-drop.txt b/docs/reference/method/MongoDBCollection-drop.txt index a2cd9410b..e66434894 100644 --- a/docs/reference/method/MongoDBCollection-drop.txt +++ b/docs/reference/method/MongoDBCollection-drop.txt @@ -21,13 +21,71 @@ Definition function drop(array $options = []): array|object - This method has the following parameters: +Parameters +---------- + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + This is not supported for server versions prior to 4.4 and will result in an + exception at execution time if used. + + .. versionadded:: 1.13 + + * - encryptedFields + - array|object + - A document describing encrypted fields for queryable encryption. If + omitted, the ``encryptedFieldsMap`` option within the + ``autoEncryption`` driver option will be consulted. If + ``encryptedFieldsMap`` was defined but does not specify this + collection, the library will make a final attempt to consult the + server-side value for ``encryptedFields``. See + `Field Encryption and Queryability `_ + in the MongoDB manual for more information. + + .. note:: + + This option is not passed to the + :manual:`drop ` command. The library uses + it to determine related metadata collections that should be dropped + in addition to an encrypted collection. + + .. versionadded:: 1.13 + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst + + .. versionadded:: 1.3 + + * - typeMap + - array + - .. include:: /includes/extracts/collection-option-typeMap.rst + + This will be used for the returned command result document. + + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - .. include:: /includes/extracts/collection-option-writeConcern.rst - .. include:: /includes/apiargs/MongoDBCollection-method-drop-param.rst + It is not possible to specify a :manual:`write concern + ` for individual operations as part of a + transaction. Instead, set the ``writeConcern`` option when starting the + transaction with :php:`startTransaction `. - The ``$options`` parameter supports the following options: - .. include:: /includes/apiargs/MongoDBCollection-method-drop-option.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-dropIndex.txt b/docs/reference/method/MongoDBCollection-dropIndex.txt index 0a7fbb53f..47aa1f04b 100644 --- a/docs/reference/method/MongoDBCollection-dropIndex.txt +++ b/docs/reference/method/MongoDBCollection-dropIndex.txt @@ -19,15 +19,65 @@ Definition .. code-block:: php - function dropIndex(string|MongoDB\Model\IndexInfo $indexName, array $options = []): array|object + function dropIndex( + string|MongoDB\Model\IndexInfo $indexName, + array $options = [] + ): array|object - This method has the following parameters: +Parameters +---------- + +``$indexName`` : string| :phpclass:`MongoDB\\Model\\IndexInfo` + The name or model object of the index to drop. View the existing indexes on + the collection using the :phpmethod:`listIndexes() + ` method. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + This is not supported for server versions prior to 4.4 and will result in an + exception at execution time if used. + + .. versionadded:: 1.13 + + * - maxTimeMS + - integer + - .. include:: /includes/extracts/common-option-maxTimeMS.rst + + .. versionadded:: 1.3 + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst + + .. versionadded:: 1.3 + + * - typeMap + - array + - .. include:: /includes/extracts/collection-option-typeMap.rst - .. include:: /includes/apiargs/MongoDBCollection-method-dropIndex-param.rst + This will be used for the returned command result document. - The ``$options`` parameter supports the following options: + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - .. include:: /includes/extracts/collection-option-writeConcern.rst - .. include:: /includes/apiargs/MongoDBCollection-method-dropIndex-option.rst + It is not possible to specify a :manual:`write concern + ` for individual operations as part of a + transaction. Instead, set the ``writeConcern`` option when starting the + transaction with :php:`startTransaction `. Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-dropIndexes.txt b/docs/reference/method/MongoDBCollection-dropIndexes.txt index ee48d493c..218ac78eb 100644 --- a/docs/reference/method/MongoDBCollection-dropIndexes.txt +++ b/docs/reference/method/MongoDBCollection-dropIndexes.txt @@ -22,13 +22,60 @@ Definition function dropIndexes(array $options = []): array|object - This method has the following parameters: +Parameters +---------- + +``$indexName`` : string| :phpclass:`MongoDB\\Model\\IndexInfo` + The name or model object of the index to drop. View the existing indexes on + the collection using the :phpmethod:`listIndexes() + ` method. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + This is not supported for server versions prior to 4.4 and will result in an + exception at execution time if used. + + .. versionadded:: 1.13 + + * - maxTimeMS + - integer + - .. include:: /includes/extracts/common-option-maxTimeMS.rst + + .. versionadded:: 1.3 + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst + + .. versionadded:: 1.3 + + * - typeMap + - array + - .. include:: /includes/extracts/collection-option-typeMap.rst - .. include:: /includes/apiargs/MongoDBCollection-method-dropIndex-param.rst + This will be used for the returned command result document. - The ``$options`` parameter supports the following options: + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - .. include:: /includes/extracts/collection-option-writeConcern.rst - .. include:: /includes/apiargs/MongoDBCollection-method-dropIndex-option.rst + It is not possible to specify a :manual:`write concern + ` for individual operations as part of a + transaction. Instead, set the ``writeConcern`` option when starting the + transaction with :php:`startTransaction `. Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-dropSearchIndex.txt b/docs/reference/method/MongoDBCollection-dropSearchIndex.txt index befd5bf03..b0ff46afd 100644 --- a/docs/reference/method/MongoDBCollection-dropSearchIndex.txt +++ b/docs/reference/method/MongoDBCollection-dropSearchIndex.txt @@ -23,15 +23,26 @@ Definition function dropSearchIndex(string $name, array $options = []): void - This method has the following parameters: +Parameters +---------- + +``$name`` : string + Name of the index to drop. - .. include:: /includes/apiargs/MongoDBCollection-method-dropSearchIndex-param.rst +``$options`` : array + An array specifying the desired options. - The ``$options`` parameter supports the following options: + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 - .. include:: /includes/apiargs/MongoDBCollection-method-dropSearchIndex-option.rst + * - Name + - Type + - Description - .. include:: /includes/extracts/note-atlas-search-requirement.rst + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst Errors/Exceptions ----------------- @@ -40,6 +51,11 @@ Errors/Exceptions .. include:: /includes/extracts/error-invalidargumentexception.rst .. include:: /includes/extracts/error-driver-runtimeexception.rst +Behavior +-------- + +.. include:: /includes/extracts/note-atlas-search-requirement.rst + See Also -------- diff --git a/docs/reference/method/MongoDBCollection-estimatedDocumentCount.txt b/docs/reference/method/MongoDBCollection-estimatedDocumentCount.txt index 1a8316293..95c4c66b2 100644 --- a/docs/reference/method/MongoDBCollection-estimatedDocumentCount.txt +++ b/docs/reference/method/MongoDBCollection-estimatedDocumentCount.txt @@ -23,13 +23,49 @@ Definition function countDocuments(array $options = []): integer - This method has the following parameters: +Parameters +---------- + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + This is not supported for server versions prior to 4.4 and will result in an + exception at execution time if used. + + .. versionadded:: 1.13 + + * - maxTimeMS + - integer + - .. include:: /includes/extracts/common-option-maxTimeMS.rst + + * - readConcern + - :php:`MongoDB\\Driver\\ReadConcern ` + - .. include:: /includes/extracts/collection-option-readConcern.rst - .. include:: /includes/apiargs/MongoDBCollection-method-estimateDocumentCount-param.rst + It is not possible to specify a :manual:`read concern + ` for individual operations as part of a + transaction. Instead, set the ``readConcern`` option when starting the + transaction with :php:`startTransaction `. - The ``$options`` parameter supports the following options: + * - readPreference + - :php:`MongoDB\\Driver\\ReadPreference ` + - .. include:: /includes/extracts/collection-option-readPreference.rst - .. include:: /includes/apiargs/MongoDBCollection-method-estimateDocumentCount-option.rst + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-explain.txt b/docs/reference/method/MongoDBCollection-explain.txt index 600f203b8..d7ccb7d7d 100644 --- a/docs/reference/method/MongoDBCollection-explain.txt +++ b/docs/reference/method/MongoDBCollection-explain.txt @@ -21,15 +21,53 @@ Definition .. code-block:: php - function explain(MongoDB\Operation\Explainable $explainable, array $options = []): array|object + function explain( + MongoDB\Operation\Explainable $explainable, + array $options = [] + ): array|object - This method has the following parameters: +Parameters +---------- + +``$explainable`` : :phpclass:`MongoDB\\Operation\\Explainable` + The command to explain. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + Defaults to the ``comment`` of the explained operation (if any). + + This is not supported for server versions prior to 4.4 and will result in an + exception at execution time if used. + + .. versionadded:: 1.13 + + * - readPreference + - :php:`MongoDB\\Driver\\ReadPreference ` + - .. include:: /includes/extracts/collection-option-readPreference.rst - .. include:: /includes/apiargs/MongoDBCollection-method-explain-param.rst + * - typeMap + - array + - .. include:: /includes/extracts/collection-option-typeMap.rst - The ``$options`` parameter supports the following options: + This will be used for the returned command result document. - .. include:: /includes/apiargs/MongoDBCollection-method-explain-option.rst + * - verbosity + - string + - The verbosity level at which to run the command. See the :manual:`explain + ` command for more information. Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-find.txt b/docs/reference/method/MongoDBCollection-find.txt index 4fe923893..f475df419 100644 --- a/docs/reference/method/MongoDBCollection-find.txt +++ b/docs/reference/method/MongoDBCollection-find.txt @@ -19,15 +19,209 @@ Definition .. code-block:: php - function find(array|object $filter = [], array $options = []): MongoDB\Driver\Cursor + function find( + array|object $filter = [], + array $options = [] + ): MongoDB\Driver\Cursor - This method has the following parameters: +Parameters +---------- + +``$filter`` : array|object + The filter criteria that specifies the documents to query. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - allowDiskUse + - boolean + - Enables writing to temporary files. When set to ``true``, queries can + write data to the ``_tmp`` sub-directory in the ``dbPath`` directory. + + * - allowPartialResults + - boolean + - For queries against a sharded collection, returns partial results from + the :program:`mongos` if some shards are unavailable instead of + throwing an error. + + * - batchSize + - integer + - The number of documents to return in the first batch. Defaults to + ``101``. A batchSize of ``0`` means that the cursor will be + established, but no documents will be returned in the first batch. + + Unlike the previous wire protocol version, a batchSize of ``1`` for the + :dbcommand:`find` command does not close the cursor. + + * - collation + - array|object + - .. include:: /includes/extracts/collection-option-collation.rst + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + The comment can be any valid BSON type for server versions 4.4 and above. + Earlier server versions only support string values. + + * - cursorType + - integer + - Indicates the type of cursor to use. ``cursorType`` supports the + following values: + + - ``MongoDB\Operation\Find::NON_TAILABLE`` (*default*) + - ``MongoDB\Operation\Find::TAILABLE`` + + * - hint + - string|array|object + - .. include:: /includes/extracts/common-option-hint.rst + + .. versionadded:: 1.2 + + * - let + - array|object + - .. include:: /includes/extracts/common-option-let.rst + + .. versionadded:: 1.13 + + * - limit + - integer + - The maximum number of documents to return. If unspecified, then + defaults to no limit. A limit of ``0`` is equivalent to setting no + limit. + + A negative limit is similar to a positive limit but closes the cursor + after returning a single batch of results. As such, with a negative + limit, if the limited result set does not fit into a single batch, the + number of documents received will be less than the specified limit. By + passing a negative limit, the client indicates to the server that it + will not ask for a subsequent batch via getMore. + + * - max + - array|object + - The exclusive upper bound for a specific index. + + .. versionadded:: 1.2 + + * - maxAwaitTimeMS + - integer + - Positive integer denoting the time limit in milliseconds for the server + to block a getMore operation if no data is available. This option + should only be used if cursorType is TAILABLE_AWAIT. + + .. versionadded:: 1.2 + + * - maxScan + - integer + - Maximum number of documents or index keys to scan when executing the + query. + + .. deprecated:: 1.4 + .. versionadded:: 1.2 + + * - maxTimeMS + - integer + - .. include:: /includes/extracts/common-option-maxTimeMS.rst + + * - min + - array|object + - The inclusive lower bound for a specific index. + + .. versionadded:: 1.2 + + * - modifiers + - array|object + - :manual:`Meta operators ` that + modify the output or behavior of a query. Use of these operators is + deprecated in favor of named options. + + * - noCursorTimeout + - boolean + - Prevents the server from timing out idle cursors after an inactivity + period (10 minutes). + + * - oplogReplay + - boolean + - Internal use for replica sets. To use ``oplogReplay``, you must include + the following condition in the filter: + + .. code-block:: javascript + + { ts: { $gte: } } + + The :php:`MongoDB\\BSON\\Timestamp ` + class reference describes how to represent MongoDB's BSON timestamp + type with PHP. + + .. deprecated:: 1.7 + + * - projection + - array|object + - The :ref:`projection specification ` to determine which + fields to include in the returned documents. See + :manual:`Project Fields to Return from Query ` + and :manual:`Projection Operators ` in + the MongoDB manual. + + * - readConcern + - :php:`MongoDB\\Driver\\ReadConcern ` + - .. include:: /includes/extracts/collection-option-readConcern.rst + + It is not possible to specify a :manual:`read concern + ` for individual operations as part of a + transaction. Instead, set the ``readConcern`` option when starting the + transaction with :php:`startTransaction `. + + * - readPreference + - :php:`MongoDB\\Driver\\ReadPreference ` + - .. include:: /includes/extracts/collection-option-readPreference.rst + + * - returnKey + - boolean + - If true, returns only the index keys in the resulting documents. + + .. versionadded:: 1.2 + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst + + .. versionadded:: 1.3 + + * - showRecordId + - boolean + - Determines whether to return the record identifier for each document. + If true, adds a field ``$recordId`` to the returned documents. + + .. versionadded:: 1.2 + + * - skip + - integer + - Number of documents to skip. Defaults to ``0``. + + * - sort + - array|object + - The sort specification for the ordering of the results. - .. include:: /includes/apiargs/MongoDBCollection-method-find-param.rst + * - snapshot + - boolean + - Prevents the cursor from returning a document more than once because of + an intervening write operation. - The ``$options`` parameter supports the following options: + .. deprecated:: 1.4 + .. versionadded:: 1.2 - .. include:: /includes/apiargs/MongoDBCollection-method-find-option.rst + * - typeMap + - array + - .. include:: /includes/extracts/collection-option-typeMap.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-findOne.txt b/docs/reference/method/MongoDBCollection-findOne.txt index 44829db30..7cc152559 100644 --- a/docs/reference/method/MongoDBCollection-findOne.txt +++ b/docs/reference/method/MongoDBCollection-findOne.txt @@ -19,15 +19,160 @@ Definition .. code-block:: php - function findOne(array|object $filter = [], array $options = []): array|object|null + function findOne( + array|object $filter = [], + array $options = [] + ): array|object|null - This method has the following parameters: +Parameters +---------- + +``$filter`` : array|object + The filter criteria that specifies the documents to query. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - allowDiskUse + - boolean + - Enables writing to temporary files. When set to ``true``, queries can + write data to the ``_tmp`` sub-directory in the ``dbPath`` directory. + + * - allowPartialResults + - boolean + - For queries against a sharded collection, returns partial results from + the :program:`mongos` if some shards are unavailable instead of + throwing an error. + + * - collation + - array|object + - .. include:: /includes/extracts/collection-option-collation.rst + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + The comment can be any valid BSON type for server versions 4.4 and above. + Earlier server versions only support string values. + + * - hint + - string|array|object + - .. include:: /includes/extracts/common-option-hint.rst + + .. versionadded:: 1.2 + + * - let + - array|object + - .. include:: /includes/extracts/common-option-let.rst + + .. versionadded:: 1.13 + + * - max + - array|object + - The exclusive upper bound for a specific index. + + .. versionadded:: 1.2 + + * - maxScan + - integer + - Maximum number of documents or index keys to scan when executing the + query. + + .. deprecated:: 1.4 + .. versionadded:: 1.2 + + * - maxTimeMS + - integer + - .. include:: /includes/extracts/common-option-maxTimeMS.rst + + * - min + - array|object + - The inclusive lower bound for a specific index. + + .. versionadded:: 1.2 + + * - modifiers + - array|object + - :manual:`Meta operators ` that + modify the output or behavior of a query. Use of these operators is + deprecated in favor of named options. + + * - oplogReplay + - boolean + - Internal use for replica sets. To use ``oplogReplay``, you must include + the following condition in the filter: + + .. code-block:: javascript + + { ts: { $gte: } } + + The :php:`MongoDB\\BSON\\Timestamp ` + class reference describes how to represent MongoDB's BSON timestamp + type with PHP. + + .. deprecated:: 1.7 + + * - projection + - array|object + - The :ref:`projection specification ` to determine which + fields to include in the returned documents. See + :manual:`Project Fields to Return from Query ` + and :manual:`Projection Operators ` in + the MongoDB manual. + + * - readConcern + - :php:`MongoDB\\Driver\\ReadConcern ` + - .. include:: /includes/extracts/collection-option-readConcern.rst + + It is not possible to specify a :manual:`read concern + ` for individual operations as part of a + transaction. Instead, set the ``readConcern`` option when starting the + transaction with :php:`startTransaction `. + + * - readPreference + - :php:`MongoDB\\Driver\\ReadPreference ` + - .. include:: /includes/extracts/collection-option-readPreference.rst + + * - returnKey + - boolean + - If true, returns only the index keys in the resulting documents. + + .. versionadded:: 1.2 + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst + + .. versionadded:: 1.3 + + * - showRecordId + - boolean + - Determines whether to return the record identifier for each document. + If true, adds a field ``$recordId`` to the returned documents. + + .. versionadded:: 1.2 + + * - skip + - integer + - Number of documents to skip. Defaults to ``0``. - .. include:: /includes/apiargs/MongoDBCollection-method-findOne-param.rst + * - sort + - array|object + - The sort specification for the ordering of the results. - The ``$options`` parameter supports the following options: + * - typeMap + - array + - .. include:: /includes/extracts/collection-option-typeMap.rst - .. include:: /includes/apiargs/MongoDBCollection-method-findOne-option.rst + This will be used for the returned result document. Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-findOneAndDelete.txt b/docs/reference/method/MongoDBCollection-findOneAndDelete.txt index e5531f416..0baac670f 100644 --- a/docs/reference/method/MongoDBCollection-findOneAndDelete.txt +++ b/docs/reference/method/MongoDBCollection-findOneAndDelete.txt @@ -19,15 +19,92 @@ Definition .. code-block:: php - function findOneAndDelete(array|object $filter = [], array $options = []): object|null + function findOneAndDelete( + array|object $filter = [], + array $options = [] + ): object|null - This method has the following parameters: +Parameters +---------- + +``$filter`` : array|object + The filter criteria that specifies the documents to delete. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - collation + - array|object + - .. include:: /includes/extracts/collection-option-collation.rst + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + This is not supported for server versions prior to 4.4 and will result in an + exception at execution time if used. + + .. versionadded:: 1.13 + + * - hint + - string|array|object + - .. include:: /includes/extracts/common-option-hint.rst + + This option is available in MongoDB 4.4+ and will result in an exception at + execution time if specified for an older server version. + + .. versionadded:: 1.7 + + * - let + - array|object + - .. include:: /includes/extracts/common-option-let.rst + + .. versionadded:: 1.13 + + * - maxTimeMS + - integer + - .. include:: /includes/extracts/common-option-maxTimeMS.rst + + * - projection + - array|object + - The :ref:`projection specification ` to determine which + fields to include in the returned documents. See + :manual:`Project Fields to Return from Query ` + and :manual:`Projection Operators ` in + the MongoDB manual. + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst + + .. versionadded:: 1.3 + + * - sort + - array|object + - The sort specification for the ordering of the results. + + * - typeMap + - array + - .. include:: /includes/extracts/collection-option-typeMap.rst - .. include:: /includes/apiargs/MongoDBCollection-method-findOneAndDelete-param.rst + This will be used for the returned result document. - The ``$options`` parameter supports the following options: + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - .. include:: /includes/extracts/collection-option-writeConcern.rst - .. include:: /includes/apiargs/MongoDBCollection-method-findOneAndDelete-option.rst + It is not possible to specify a :manual:`write concern + ` for individual operations as part of a + transaction. Instead, set the ``writeConcern`` option when starting the + transaction with :php:`startTransaction `. Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-findOneAndReplace.txt b/docs/reference/method/MongoDBCollection-findOneAndReplace.txt index 66bd7f12f..3acf35c3d 100644 --- a/docs/reference/method/MongoDBCollection-findOneAndReplace.txt +++ b/docs/reference/method/MongoDBCollection-findOneAndReplace.txt @@ -19,15 +19,115 @@ Definition .. code-block:: php - function findOneAndReplace(array|object $filter, array|object $replacement, array $options = []): object|null + function findOneAndReplace( + array|object $filter, + array|object $replacement, + array $options = [] + ): object|null - This method has the following parameters: +Parameters +---------- + +``$filter`` : array|object + The filter criteria that specifies the documents to replace. + +``$replacement`` : array|object + The replacement document. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - bypassDocumentValidation + - boolean + - If ``true``, allows the write operation to circumvent document level + validation. Defaults to ``false``. + + * - collation + - array|object + - .. include:: /includes/extracts/collection-option-collation.rst + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + This is not supported for server versions prior to 4.4 and will result in an + exception at execution time if used. + + .. versionadded:: 1.13 + + * - hint + - string|array|object + - .. include:: /includes/extracts/common-option-hint.rst + + This option is available in MongoDB 4.4+ and will result in an exception at + execution time if specified for an older server version. + + .. versionadded:: 1.7 + + * - let + - array|object + - .. include:: /includes/extracts/common-option-let.rst + + .. versionadded:: 1.13 + + * - maxTimeMS + - integer + - .. include:: /includes/extracts/common-option-maxTimeMS.rst + + * - projection + - array|object + - The :ref:`projection specification ` to determine which + fields to include in the returned documents. See + :manual:`Project Fields to Return from Query ` + and :manual:`Projection Operators ` in + the MongoDB manual. + + * - returnDocument + - integer + - Specifies whether to return the document before the replacement is + applied, or after. ``returnDocument`` supports the following values: + + - ``MongoDB\Operation\FindOneAndReplace::RETURN_DOCUMENT_BEFORE`` (*default*) + - ``MongoDB\Operation\FindOneAndReplace::RETURN_DOCUMENT_AFTER`` + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst + + .. versionadded:: 1.3 + + * - sort + - array|object + - The sort specification for the ordering of the results. + + * - typeMap + - array + - .. include:: /includes/extracts/collection-option-typeMap.rst + + This will be used for the returned result document. - .. include:: /includes/apiargs/MongoDBCollection-method-findOneAndReplace-param.rst + * - upsert + - boolean + - If set to ``true``, creates a new document when no document matches the + query criteria. The default value is ``false``, which does not insert a + new document when no match is found. - The ``$options`` parameter supports the following options: + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - .. include:: /includes/extracts/collection-option-writeConcern.rst - .. include:: /includes/apiargs/MongoDBCollection-method-findOneAndReplace-option.rst + It is not possible to specify a :manual:`write concern + ` for individual operations as part of a + transaction. Instead, set the ``writeConcern`` option when starting the + transaction with :php:`startTransaction `. Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-findOneAndUpdate.txt b/docs/reference/method/MongoDBCollection-findOneAndUpdate.txt index c903698b1..22225cdca 100644 --- a/docs/reference/method/MongoDBCollection-findOneAndUpdate.txt +++ b/docs/reference/method/MongoDBCollection-findOneAndUpdate.txt @@ -19,15 +19,126 @@ Definition .. code-block:: php - function findOneAndUpdate(array|object $filter, array|object $update, array $options = []): object|null + function findOneAndUpdate( + array|object $filter, + array|object $update, + array $options = [] + ): object|null - This method has the following parameters: +Parameters +---------- + +``$filter`` : array|object + The filter criteria that specifies the documents to update. + +``$update`` : array|object + Specifies the field and value combinations to update and any relevant update + operators. ``$update`` uses MongoDB's :method:`update operators + `. Starting with MongoDB 4.2, an `aggregation + pipeline `_ + can be passed as this parameter. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - bypassDocumentValidation + - boolean + - If ``true``, allows the write operation to circumvent document level + validation. Defaults to ``false``. + + * - arrayFilters + - array + - An array of filter documents that determines which array elements to + modify for an update operation on an array field. + + .. versionadded:: 1.3 + + * - collation + - array|object + - .. include:: /includes/extracts/collection-option-collation.rst + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + This is not supported for server versions prior to 4.4 and will result in an + exception at execution time if used. + + .. versionadded:: 1.13 + + * - hint + - string|array|object + - .. include:: /includes/extracts/common-option-hint.rst + + This option is available in MongoDB 4.4+ and will result in an exception at + execution time if specified for an older server version. + + .. versionadded:: 1.7 + + * - maxTimeMS + - integer + - .. include:: /includes/extracts/common-option-maxTimeMS.rst + + * - let + - array|object + - .. include:: /includes/extracts/common-option-let.rst + + .. versionadded:: 1.13 + + * - projection + - array|object + - The :ref:`projection specification ` to determine which + fields to include in the returned documents. See + :manual:`Project Fields to Return from Query ` + and :manual:`Projection Operators ` in + the MongoDB manual. + + * - returnDocument + - integer + - Specifies whether to return the document before the update is applied, + or after. ``returnDocument`` supports the following values: + + - ``MongoDB\Operation\FindOneAndUpdate::RETURN_DOCUMENT_BEFORE`` (*default*) + - ``MongoDB\Operation\FindOneAndUpdate::RETURN_DOCUMENT_AFTER`` + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst + + .. versionadded:: 1.3 + + * - sort + - array|object + - The sort specification for the ordering of the results. + + * - typeMap + - array + - .. include:: /includes/extracts/collection-option-typeMap.rst + + This will be used for the returned result document. - .. include:: /includes/apiargs/MongoDBCollection-method-findOneAndUpdate-param.rst + * - upsert + - boolean + - If set to ``true``, creates a new document when no document matches the + query criteria. The default value is ``false``, which does not insert a + new document when no match is found. - The ``$options`` parameter supports the following options: + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - .. include:: /includes/extracts/collection-option-writeConcern.rst - .. include:: /includes/apiargs/MongoDBCollection-method-findOneAndUpdate-option.rst + It is not possible to specify a :manual:`write concern + ` for individual operations as part of a + transaction. Instead, set the ``writeConcern`` option when starting the + transaction with :php:`startTransaction `. Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-insertMany.txt b/docs/reference/method/MongoDBCollection-insertMany.txt index 62b0858e6..df721293b 100644 --- a/docs/reference/method/MongoDBCollection-insertMany.txt +++ b/docs/reference/method/MongoDBCollection-insertMany.txt @@ -19,15 +19,66 @@ Definition .. code-block:: php - function insertMany(array $documents, array $options = []): MongoDB\InsertManyResult + function insertMany( + array $documents, + array $options = [] + ): MongoDB\InsertManyResult - This method has the following parameters: +Parameters +---------- + +``$documents`` : array + The documents to insert into the collection. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - bypassDocumentValidation + - boolean + - If ``true``, allows the write operation to circumvent document level + validation. Defaults to ``false``. + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + This is not supported for server versions prior to 4.4 and will result in an + exception at execution time if used. + + .. versionadded:: 1.13 + + * - ordered + - boolean + - If ``true``: when a single write fails, the operation will stop without + performing the remaining writes and throw an exception. + + If ``false``: when a single write fails, the operation will continue + with the remaining writes, if any, and throw an exception. + + The default is ``true``. + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst - .. include:: /includes/apiargs/MongoDBCollection-method-insertMany-param.rst + .. versionadded:: 1.3 - The ``$options`` parameter supports the following options: + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - .. include:: /includes/extracts/collection-option-writeConcern.rst - .. include:: /includes/apiargs/MongoDBCollection-method-insertMany-option.rst + It is not possible to specify a :manual:`write concern + ` for individual operations as part of a + transaction. Instead, set the ``writeConcern`` option when starting the + transaction with :php:`startTransaction `. Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-insertOne.txt b/docs/reference/method/MongoDBCollection-insertOne.txt index dd6e2f220..48084ef8f 100644 --- a/docs/reference/method/MongoDBCollection-insertOne.txt +++ b/docs/reference/method/MongoDBCollection-insertOne.txt @@ -19,15 +19,56 @@ Definition .. code-block:: php - function insertOne(array|object $document, array $options = []): MongoDB\InsertOneResult + function insertOne( + array|object $document, + array $options = [] + ): MongoDB\InsertOneResult - This method has the following parameters: +Parameters +---------- + +``$document`` : array|object + The document to insert into the collection. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - bypassDocumentValidation + - boolean + - If ``true``, allows the write operation to circumvent document level + validation. Defaults to ``false``. + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + This is not supported for server versions prior to 4.4 and will result in an + exception at execution time if used. + + .. versionadded:: 1.13 + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst - .. include:: /includes/apiargs/MongoDBCollection-method-insertOne-param.rst + .. versionadded:: 1.3 - The ``$options`` parameter supports the following options: + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - .. include:: /includes/extracts/collection-option-writeConcern.rst - .. include:: /includes/apiargs/MongoDBCollection-method-insertOne-option.rst + It is not possible to specify a :manual:`write concern + ` for individual operations as part of a + transaction. Instead, set the ``writeConcern`` option when starting the + transaction with :php:`startTransaction `. Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-listIndexes.txt b/docs/reference/method/MongoDBCollection-listIndexes.txt index 2508b2828..9d0668c1e 100644 --- a/docs/reference/method/MongoDBCollection-listIndexes.txt +++ b/docs/reference/method/MongoDBCollection-listIndexes.txt @@ -21,13 +21,38 @@ Definition function listIndexes(array $options = []): MongoDB\Model\IndexInfoIterator - This method has the following parameters: +Parameters +---------- + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + This is not supported for server versions prior to 4.4 and will result in an + exception at execution time if used. + + .. versionadded:: 1.13 - .. include:: /includes/apiargs/MongoDBCollection-method-listIndexes-param.rst + * - maxTimeMS + - integer + - .. include:: /includes/extracts/common-option-maxTimeMS.rst - The ``$options`` parameter supports the following options: + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst - .. include:: /includes/apiargs/MongoDBCollection-method-listIndexes-option.rst + .. versionadded:: 1.3 Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-listSearchIndexes.txt b/docs/reference/method/MongoDBCollection-listSearchIndexes.txt index 8dc986004..920434902 100644 --- a/docs/reference/method/MongoDBCollection-listSearchIndexes.txt +++ b/docs/reference/method/MongoDBCollection-listSearchIndexes.txt @@ -23,15 +23,72 @@ Definition function listSearchIndexes(array $options = []): Countable&Iterator - This method has the following parameters: +Parameters +---------- + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - batchSize + - integer + - Specifies the batch size for the cursor, which will apply to both the + initial ``aggregate`` command and any subsequent ``getMore`` commands. + This determines the maximum number of documents to return in each + response from the server. + + A batchSize of ``0`` is special in that and will only apply to the + initial ``aggregate`` command; subsequent ``getMore`` commands will use + the server's default batch size. This may be useful for quickly + returning a cursor or failure from ``aggregate`` without doing + significant server-side work. + + * - collation + - array|object + - .. include:: /includes/extracts/common-option-collation.rst + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst - .. include:: /includes/apiargs/MongoDBCollection-method-listSearchIndexes-param.rst + * - maxTimeMS + - integer + - .. include:: /includes/extracts/common-option-maxTimeMS.rst - The ``$options`` parameter supports the following options: + * - name + - string + - Name of the index to return information about. - .. include:: /includes/apiargs/MongoDBCollection-method-listSearchIndexes-option.rst + If name is not specified, information for all indexes on the collection + will be returned. - .. include:: /includes/extracts/note-atlas-search-requirement.rst + * - readConcern + - :php:`MongoDB\\Driver\\ReadConcern ` + - .. include:: /includes/extracts/collection-option-readConcern.rst + + It is not possible to specify a :manual:`read concern + ` for individual operations as part of a + transaction. Instead, set the ``readConcern`` option when starting the + transaction with :php:`startTransaction `. + + * - readPreference + - :php:`MongoDB\\Driver\\ReadPreference ` + - .. include:: /includes/extracts/collection-option-readPreference.rst + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst + + * - typeMap + - array + - .. include:: /includes/extracts/collection-option-typeMap.rst Return Values ------------- @@ -48,6 +105,11 @@ Errors/Exceptions .. include:: /includes/extracts/error-invalidargumentexception.rst .. include:: /includes/extracts/error-driver-runtimeexception.rst +Behavior +-------- + +.. include:: /includes/extracts/note-atlas-search-requirement.rst + See Also -------- diff --git a/docs/reference/method/MongoDBCollection-mapReduce.txt b/docs/reference/method/MongoDBCollection-mapReduce.txt index a38872bdc..5d8c917ad 100644 --- a/docs/reference/method/MongoDBCollection-mapReduce.txt +++ b/docs/reference/method/MongoDBCollection-mapReduce.txt @@ -24,15 +24,146 @@ Definition .. code-block:: php - function mapReduce(MongoDB\BSON\JavascriptInterface $map, MongoDB\BSON\JavascriptInterface $reduce, string|array|object $out, array $options = []): MongoDB\MapReduceResult + function mapReduce( + MongoDB\BSON\JavascriptInterface $map, + MongoDB\BSON\JavascriptInterface $reduce, + string|array|object $out, + array $options = [] + ): MongoDB\MapReduceResult + +Parameters +---------- + +``$map`` : :php:`MongoDB\\BSON\\Javascript ` + A JavaScript function that associates or "maps" a value with a key and emits + the key and value pair. + + .. note:: + + Passing a Javascript instance with a scope is deprecated. Put all scope + variables in the ``scope`` option of the MapReduce operation. + +``$reduce`` : :php:`MongoDB\\BSON\\Javascript ` + A JavaScript function that "reduces" to a single object all the values + associated with a particular key. + + .. note:: + + Passing a Javascript instance with a scope is deprecated. Put all scope + variables in the ``scope`` option of the MapReduce operation. + +``$out`` : string|array|object + Specifies where to output the result of the map-reduce operation. You can + either output to a collection or return the result inline. On a primary member + of a replica set you can output either to a collection or inline, but on a + secondary, only inline output is possible. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - bypassDocumentValidation + - boolean + - If ``true``, allows the write operation to circumvent document level + validation. Defaults to ``false``. + + This only applies when results are output to a collection. + + * - collation + - array|object + - .. include:: /includes/extracts/collection-option-collation.rst + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + This is not supported for server versions prior to 4.4 and will result in an + exception at execution time if used. + + .. versionadded:: 1.13 + + * - finalize + - :php:`MongoDB\\BSON\\Javascript ` + - Follows the reduce method and modifies the output. + + .. note:: + + Passing a Javascript instance with a scope is deprecated. Put all + scope variables in the ``scope`` option of the MapReduce operation. + + * - jsMode + - boolean + - Specifies whether to convert intermediate data into BSON format between + the execution of the map and reduce functions. + + * - limit + - integer + - Specifies a maximum number of documents for the input into the map + function. + + * - maxTimeMS + - integer + - .. include:: /includes/extracts/common-option-maxTimeMS.rst + + * - query + - array|object + - Specifies the selection criteria using query operators for determining + the documents input to the map function. + + * - readConcern + - :php:`MongoDB\\Driver\\ReadConcern ` + - .. include:: /includes/extracts/collection-option-readConcern.rst + + It is not possible to specify a :manual:`read concern + ` for individual operations as part of a + transaction. Instead, set the ``readConcern`` option when starting the + transaction with :php:`startTransaction `. + + * - readPreference + - :php:`MongoDB\\Driver\\ReadPreference ` + - .. include:: /includes/extracts/collection-option-readPreference.rst + + This option will be ignored when results are output to a collection. + + * - scope + - array|object + - Specifies global variables that are accessible in the map, reduce, and + finalize functions. + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst + + .. versionadded:: 1.3 + + * - sort + - array|object + - The sort specification for the ordering of the results. - This method has the following parameters: + * - typeMap + - array + - .. include:: /includes/extracts/collection-option-typeMap.rst - .. include:: /includes/apiargs/MongoDBCollection-method-mapReduce-param.rst + * - verbose + - boolean + - Specifies whether to include the timing information in the result + information. - The ``$options`` parameter supports the following options: + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - .. include:: /includes/extracts/collection-option-writeConcern.rst - .. include:: /includes/apiargs/MongoDBCollection-method-mapReduce-option.rst + It is not possible to specify a :manual:`write concern + ` for individual operations as part of a + transaction. Instead, set the ``writeConcern`` option when starting the + transaction with :php:`startTransaction `. Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-rename.txt b/docs/reference/method/MongoDBCollection-rename.txt index a40555f21..da0429bf2 100644 --- a/docs/reference/method/MongoDBCollection-rename.txt +++ b/docs/reference/method/MongoDBCollection-rename.txt @@ -21,15 +21,67 @@ Definition .. code-block:: php - function rename(string $toCollectionName, ?string $toDatabaseName = null, array $options = []): array|object + function rename( + string $toCollectionName, + ?string $toDatabaseName = null, + array $options = [] + ): array|object - This method has the following parameters: +Parameters +---------- + +``$toCollectionName`` : string + The new name of the collection. + +``$toDatabaseName`` : string + The new database name of the collection. If a new database name is not + specified, the database of the original collection will be used. If the new + name specifies a different database, the command copies the collection + to the new database and drops the source collection. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - dropTarget + - boolean + - If ``true``, MongoDB will drop the target before renaming the + collection. The default value is ``false``. + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + This is not supported for server versions prior to 4.4 and will result in an + exception at execution time if used. + + .. versionadded:: 1.13 + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst + + * - typeMap + - array + - .. include:: /includes/extracts/collection-option-typeMap.rst - .. include:: /includes/apiargs/MongoDBCollection-method-rename-param.rst + This will be used for the returned command result document. - The ``$options`` parameter supports the following options: + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - .. include:: /includes/extracts/collection-option-writeConcern.rst - .. include:: /includes/apiargs/MongoDBCollection-method-rename-option.rst + It is not possible to specify a :manual:`write concern + ` for individual operations as part of a + transaction. Instead, set the ``writeConcern`` option when starting the + transaction with :php:`startTransaction `. Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-replaceOne.txt b/docs/reference/method/MongoDBCollection-replaceOne.txt index e42f993e9..7fc1bc930 100644 --- a/docs/reference/method/MongoDBCollection-replaceOne.txt +++ b/docs/reference/method/MongoDBCollection-replaceOne.txt @@ -21,15 +21,85 @@ Definition .. code-block:: php - function replaceOne(array|object $filter, array|object $replacement, array $options = []): MongoDB\UpdateResult + function replaceOne( + array|object $filter, + array|object $replacement, + array $options = [] + ): MongoDB\UpdateResult - This method has the following parameters: +Parameters +---------- + +``$filter`` : array|object + The filter criteria that specifies the documents to replace. + +``$replacement`` : array|object + The replacement document. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - bypassDocumentValidation + - boolean + - If ``true``, allows the write operation to circumvent document level + validation. Defaults to ``false``. + + * - collation + - array|object + - .. include:: /includes/extracts/collection-option-collation.rst + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + This is not supported for server versions prior to 4.4 and will result in an + exception at execution time if used. + + .. versionadded:: 1.13 + + * - hint + - string|array|object + - .. include:: /includes/extracts/common-option-hint.rst + + This option is available in MongoDB 4.2+ and will result in an exception at + execution time if specified for an older server version. + + .. versionadded:: 1.6 + + * - let + - array|object + - .. include:: /includes/extracts/common-option-let.rst + + .. versionadded:: 1.13 + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst + + .. versionadded:: 1.3 - .. include:: /includes/apiargs/MongoDBCollection-method-replaceOne-param.rst + * - upsert + - boolean + - If set to ``true``, creates a new document when no document matches the + query criteria. The default value is ``false``, which does not insert a + new document when no match is found. - The ``$options`` parameter supports the following options: + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - .. include:: /includes/extracts/collection-option-writeConcern.rst - .. include:: /includes/apiargs/MongoDBCollection-method-replaceOne-option.rst + It is not possible to specify a :manual:`write concern + ` for individual operations as part of a + transaction. Instead, set the ``writeConcern`` option when starting the + transaction with :php:`startTransaction `. Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-updateMany.txt b/docs/reference/method/MongoDBCollection-updateMany.txt index 0e5f22b9d..f4421bc18 100644 --- a/docs/reference/method/MongoDBCollection-updateMany.txt +++ b/docs/reference/method/MongoDBCollection-updateMany.txt @@ -19,15 +19,96 @@ Definition .. code-block:: php - function updateMany(array|object $filter, array|object $update, array $options = []): MongoDB\UpdateResult + function updateMany( + array|object $filter, + array|object $update, + array $options = [] + ): MongoDB\UpdateResult - This method has the following parameters: +Parameters +---------- + +``$filter`` : array|object + The filter criteria that specifies the documents to update. + +``$update`` : array|object + Specifies the field and value combinations to update and any relevant update + operators. ``$update`` uses MongoDB's :method:`update operators + `. Starting with MongoDB 4.2, an `aggregation + pipeline `_ + can be passed as this parameter. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - arrayFilters + - array + - An array of filter documents that determines which array elements to + modify for an update operation on an array field. + + .. versionadded:: 1.3 + + * - bypassDocumentValidation + - boolean + - If ``true``, allows the write operation to circumvent document level + validation. Defaults to ``false``. + + * - collation + - array|object + - .. include:: /includes/extracts/collection-option-collation.rst + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + This is not supported for server versions prior to 4.4 and will result in an + exception at execution time if used. + + .. versionadded:: 1.13 + + * - hint + - string|array|object + - .. include:: /includes/extracts/common-option-hint.rst + + This option is available in MongoDB 4.2+ and will result in an exception at + execution time if specified for an older server version. + + .. versionadded:: 1.6 + + * - let + - array|object + - .. include:: /includes/extracts/common-option-let.rst + + .. versionadded:: 1.13 + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst + + .. versionadded:: 1.3 - .. include:: /includes/apiargs/MongoDBCollection-method-updateMany-param.rst + * - upsert + - boolean + - If set to ``true``, creates a new document when no document matches the + query criteria. The default value is ``false``, which does not insert a + new document when no match is found. - The ``$options`` parameter supports the following options: + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - .. include:: /includes/extracts/collection-option-writeConcern.rst - .. include:: /includes/apiargs/MongoDBCollection-method-updateMany-option.rst + It is not possible to specify a :manual:`write concern + ` for individual operations as part of a + transaction. Instead, set the ``writeConcern`` option when starting the + transaction with :php:`startTransaction `. Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-updateOne.txt b/docs/reference/method/MongoDBCollection-updateOne.txt index 2b930e232..5f3d7d187 100644 --- a/docs/reference/method/MongoDBCollection-updateOne.txt +++ b/docs/reference/method/MongoDBCollection-updateOne.txt @@ -21,15 +21,96 @@ Definition .. code-block:: php - function updateOne(array|object $filter, array|object $update, array $options = []): MongoDB\UpdateResult + function updateOne( + array|object $filter, + array|object $update, + array $options = [] + ): MongoDB\UpdateResult - This method has the following parameters: +Parameters +---------- + +``$filter`` : array|object + The filter criteria that specifies the documents to update. + +``$update`` : array|object + Specifies the field and value combinations to update and any relevant update + operators. ``$update`` uses MongoDB's :method:`update operators + `. Starting with MongoDB 4.2, an `aggregation + pipeline `_ + can be passed as this parameter. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - arrayFilters + - array + - An array of filter documents that determines which array elements to modify + for an update operation on an array field. + + .. versionadded:: 1.3 + + * - bypassDocumentValidation + - boolean + - If ``true``, allows the write operation to circumvent document level + validation. Defaults to ``false``. + + * - collation + - array|object + - .. include:: /includes/extracts/collection-option-collation.rst + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + This is not supported for server versions prior to 4.4 and will result in an + exception at execution time if used. + + .. versionadded:: 1.13 + + * - hint + - string|array|object + - .. include:: /includes/extracts/common-option-hint.rst + + This option is available in MongoDB 4.2+ and will result in an exception at + execution time if specified for an older server version. + + .. versionadded:: 1.6 + + * - let + - array|object + - .. include:: /includes/extracts/common-option-let.rst + + .. versionadded:: 1.13 + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst + + .. versionadded:: 1.3 - .. include:: /includes/apiargs/MongoDBCollection-method-updateOne-param.rst + * - upsert + - boolean + - If set to ``true``, creates a new document when no document matches the + query criteria. The default value is ``false``, which does not insert a + new document when no match is found. - The ``$options`` parameter supports the following options: + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - .. include:: /includes/extracts/collection-option-writeConcern.rst - .. include:: /includes/apiargs/MongoDBCollection-method-updateOne-option.rst + It is not possible to specify a :manual:`write concern + ` for individual operations as part of a + transaction. Instead, set the ``writeConcern`` option when starting the + transaction with :php:`startTransaction `. Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-updateSearchIndex.txt b/docs/reference/method/MongoDBCollection-updateSearchIndex.txt index 2633d3798..e50530759 100644 --- a/docs/reference/method/MongoDBCollection-updateSearchIndex.txt +++ b/docs/reference/method/MongoDBCollection-updateSearchIndex.txt @@ -21,18 +21,38 @@ Definition .. code-block:: php - function updateSearchIndex(string $name, array|object $definition, array $options = []): void + function updateSearchIndex( + string $name, + array|object $definition, + array $options = [] + ): void - This method has the following parameters: +Parameters +---------- + +``$name`` : string + Name of the index to update. + +``$definition`` : array|object + Document describing the updated search index definition. The specified + definition replaces the prior definition in the search index. For details on + definition syntax, see + :manual:`Search Index Definition Syntax `. - .. include:: /includes/apiargs/MongoDBCollection-method-updateSearchIndex-param.rst +``$options`` : array + An array specifying the desired options. - The ``$options`` parameter supports the following options: + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 - .. include:: /includes/apiargs/MongoDBCollection-method-updateSearchIndex-option.rst + * - Name + - Type + - Description - .. include:: /includes/extracts/note-atlas-search-requirement.rst - .. include:: /includes/extracts/note-atlas-search-async.rst + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst Errors/Exceptions ----------------- @@ -41,6 +61,12 @@ Errors/Exceptions .. include:: /includes/extracts/error-invalidargumentexception.rst .. include:: /includes/extracts/error-driver-runtimeexception.rst +Behavior +-------- + +.. include:: /includes/extracts/note-atlas-search-requirement.rst +.. include:: /includes/extracts/note-atlas-search-async.rst + See Also -------- diff --git a/docs/reference/method/MongoDBCollection-watch.txt b/docs/reference/method/MongoDBCollection-watch.txt index 50ef408dc..d71aa3e29 100644 --- a/docs/reference/method/MongoDBCollection-watch.txt +++ b/docs/reference/method/MongoDBCollection-watch.txt @@ -22,15 +22,95 @@ Definition .. code-block:: php - function watch(array $pipeline = [], array $options = []): MongoDB\ChangeStream + function watch( + array $pipeline = [], + array $options = [] + ): MongoDB\ChangeStream - This method has the following parameters: +Parameters +---------- + +``$pipeline`` : array|object + The pipeline of stages to append to an initial ``$changeStream`` stage. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - batchSize + - integer + - .. include:: /includes/extracts/watch-option-batchSize.rst + + * - collation + - array|object + - .. include:: /includes/extracts/common-option-collation.rst + + Starting in MongoDB 4.2, defaults to simple binary comparison if + omitted. In earlier versions, change streams opened on a single + collection would inherit the collection's default collation. + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + The comment can be any valid BSON type for server versions 4.4 and above. + Earlier server versions only support string values. + + .. versionadded:: 1.13 + + * - fullDocument + - string + - .. include:: /includes/extracts/watch-option-fullDocument.rst + + * - fullDocumentBeforeChange + - string + - .. include:: /includes/extracts/watch-option-fullDocumentBeforeChange.rst + + * - maxAwaitTimeMS + - integer + - .. include:: /includes/extracts/watch-option-maxAwaitTimeMS.rst + + * - readConcern + - :php:`MongoDB\\Driver\\ReadConcern ` + - .. include:: /includes/extracts/collection-option-readConcern.rst + + * - readPreference + - :php:`MongoDB\\Driver\\ReadPreference ` + - .. include:: /includes/extracts/collection-option-readPreference.rst + + This is used for both the initial change stream aggregation and for + server selection during an automatic resume. + + * - resumeAfter + - array|object + - .. include:: /includes/extracts/watch-option-resumeAfter.rst + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst + + * - showExpandedEvents + - boolean + - .. include:: /includes/extracts/watch-option-showExpandedEvents.rst - .. include:: /includes/apiargs/MongoDBCollection-method-watch-param.rst + * - startAfter + - array|object + - .. include:: /includes/extracts/watch-option-startAfter.rst - The ``$options`` parameter supports the following options: + * - startAtOperationTime + - :php:`MongoDB\\BSON\\TimestampInterface ` + - .. include:: /includes/extracts/watch-option-startAtOperationTime.rst - .. include:: /includes/apiargs/MongoDBCollection-method-watch-option.rst + * - typeMap + - array + - .. include:: /includes/extracts/collection-option-typeMap.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-withOptions.txt b/docs/reference/method/MongoDBCollection-withOptions.txt index a68a5fec0..293b093ae 100644 --- a/docs/reference/method/MongoDBCollection-withOptions.txt +++ b/docs/reference/method/MongoDBCollection-withOptions.txt @@ -21,13 +21,41 @@ Definition function withOptions(array $options = []): MongoDB\Collection - This method has the following parameters: - - .. include:: /includes/apiargs/MongoDBCollection-method-withOptions-param.rst - - The ``$options`` parameter supports the following options: +Parameters +---------- - .. include:: /includes/apiargs/MongoDBCollection-method-withOptions-option.rst +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - readConcern + - :php:`MongoDB\\Driver\\ReadConcern ` + - The default read concern to use for collection operations. Defaults to + the original collection's read concern. + + * - readPreference + - :php:`MongoDB\\Driver\\ReadPreference ` + - The default read preference to use for collection operations. Defaults + to the original collection's read preference. + + * - typeMap + - array + - The :php:`type map + ` + to apply to cursors, which determines how BSON documents are converted + to PHP values. Defaults to the original collection's type map. + + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - The default write concern to use for collection operations. Defaults to + the original collection's write concern. Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection__construct.txt b/docs/reference/method/MongoDBCollection__construct.txt index e8077c73f..091735006 100644 --- a/docs/reference/method/MongoDBCollection__construct.txt +++ b/docs/reference/method/MongoDBCollection__construct.txt @@ -19,15 +19,65 @@ Definition .. code-block:: php - function __construct(MongoDB\Driver\Manager $manager, string $databaseName, string $collectionName, array $options = []) + function __construct( + MongoDB\Driver\Manager $manager, + string $databaseName, + string $collectionName, + array $options = [] + ) This constructor has the following parameters: - .. include:: /includes/apiargs/MongoDBCollection-method-construct-param.rst +``$manager`` : :php:`MongoDB\\Driver\\Manager ` + The :php:`Manager ` instance from the driver. The + manager maintains connections between the driver and your MongoDB instances. - The ``$options`` parameter supports the following options: +``$databaseName`` : string + The name of the database. - .. include:: /includes/apiargs/MongoDBCollection-method-construct-option.rst +``$collectionName`` : string + The name of the collection. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - readConcern + - :php:`MongoDB\\Driver\\ReadConcern ` + - The default read concern to use for collection operations. Defaults to + the manager's read concern. + + * - readPreference + - :php:`MongoDB\\Driver\\ReadPreference ` + - The default read preference to use for collection operations. Defaults + to the manager's read preference. + + * - typeMap + - array + - Default :php:`type map + ` + to apply to cursors, which determines how BSON documents are converted + to PHP values. The library uses the following type map by default: + + .. code-block:: php + + [ + 'array' => 'MongoDB\Model\BSONArray', + 'document' => 'MongoDB\Model\BSONDocument', + 'root' => 'MongoDB\Model\BSONDocument', + ] + + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - The default write concern to use for collection operations. Defaults + to the manager's write concern. Errors/Exceptions ----------------- From faf9f32f043971176a63a6688ed0bdbbd71b3a1b Mon Sep 17 00:00:00 2001 From: Jeremy Mikola Date: Mon, 11 Dec 2023 13:43:39 -0500 Subject: [PATCH 16/18] Replace apiargs for Bucket methods --- .../method/MongoDBGridFSBucket-delete.txt | 6 +- .../MongoDBGridFSBucket-downloadToStream.txt | 9 +- ...oDBGridFSBucket-downloadToStreamByName.txt | 42 +++- .../method/MongoDBGridFSBucket-find.txt | 204 +++++++++++++++++- .../method/MongoDBGridFSBucket-findOne.txt | 155 ++++++++++++- ...BGridFSBucket-getFileDocumentForStream.txt | 6 +- ...MongoDBGridFSBucket-getFileIdForStream.txt | 6 +- ...MongoDBGridFSBucket-openDownloadStream.txt | 6 +- ...BGridFSBucket-openDownloadStreamByName.txt | 38 +++- .../MongoDBGridFSBucket-openUploadStream.txt | 45 +++- .../method/MongoDBGridFSBucket-rename.txt | 9 +- .../MongoDBGridFSBucket-uploadFromStream.txt | 49 ++++- .../method/MongoDBGridFSBucket__construct.txt | 74 ++++++- 13 files changed, 602 insertions(+), 47 deletions(-) diff --git a/docs/reference/method/MongoDBGridFSBucket-delete.txt b/docs/reference/method/MongoDBGridFSBucket-delete.txt index b063337e7..731fb4e4d 100644 --- a/docs/reference/method/MongoDBGridFSBucket-delete.txt +++ b/docs/reference/method/MongoDBGridFSBucket-delete.txt @@ -21,9 +21,11 @@ Definition function delete($id): void - This method has the following parameters: +Parameters +---------- - .. include:: /includes/apiargs/MongoDBGridFSBucket-method-delete-param.rst +``$id`` : mixed + The ``_id`` of the file to delete. Errors/Exceptions ----------------- diff --git a/docs/reference/method/MongoDBGridFSBucket-downloadToStream.txt b/docs/reference/method/MongoDBGridFSBucket-downloadToStream.txt index 2f2aa5da1..917f03b55 100644 --- a/docs/reference/method/MongoDBGridFSBucket-downloadToStream.txt +++ b/docs/reference/method/MongoDBGridFSBucket-downloadToStream.txt @@ -22,9 +22,14 @@ Definition function downloadToStream($id, $destination): void - This method has the following parameters: +Parameters +---------- + +``$id`` : mixed + The ``_id`` of the file to download. - .. include:: /includes/apiargs/MongoDBGridFSBucket-method-downloadToStream-param.rst +``$destination`` : resource + Writable stream, to which the GridFS file's contents will be written. Errors/Exceptions ----------------- diff --git a/docs/reference/method/MongoDBGridFSBucket-downloadToStreamByName.txt b/docs/reference/method/MongoDBGridFSBucket-downloadToStreamByName.txt index acc236f57..8bd4a1d65 100644 --- a/docs/reference/method/MongoDBGridFSBucket-downloadToStreamByName.txt +++ b/docs/reference/method/MongoDBGridFSBucket-downloadToStreamByName.txt @@ -20,15 +20,47 @@ Definition .. code-block:: php - function downloadToStreamByName(string $filename, resource $destination, array $options = []): void + function downloadToStreamByName( + string $filename, + resource $destination, + array $options = [] + ): void - This method has the following parameters: +Parameters +---------- + +``$filename`` : string + The ``filename`` of the file to download. + +``$destination`` : resource + Writable stream, to which the GridFS file's contents will be written. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - revision + - integer + - The revision of the file to retrieve. Files with the same ``filename`` + will be differentiated by their ``uploadDate`` field. - .. include:: /includes/apiargs/MongoDBGridFSBucket-method-downloadToStreamByName-param.rst + Revision numbers are defined as follows: - The ``$options`` parameter supports the following options: + - 0 = the original stored file + - 1 = the first revision + - 2 = the second revision + - etc... + - -2 = the second most recent revision + - -1 = the most recent revision - .. include:: /includes/apiargs/MongoDBGridFSBucket-method-downloadToStreamByName-option.rst + Defaults to -1 (i.e. the most recent revision). Errors/Exceptions ----------------- diff --git a/docs/reference/method/MongoDBGridFSBucket-find.txt b/docs/reference/method/MongoDBGridFSBucket-find.txt index e0a4e6621..937a91398 100644 --- a/docs/reference/method/MongoDBGridFSBucket-find.txt +++ b/docs/reference/method/MongoDBGridFSBucket-find.txt @@ -19,15 +19,209 @@ Definition .. code-block:: php - function find(array|object $filter = [], array $options = []): MongoDB\Driver\Cursor + function find( + array|object $filter = [], + array $options = [] + ): MongoDB\Driver\Cursor - This method has the following parameters: +Parameters +---------- + +``$filter`` : array|object + The filter criteria that specifies the documents to query. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - allowDiskUse + - boolean + - Enables writing to temporary files. When set to ``true``, queries can + write data to the ``_tmp`` sub-directory in the ``dbPath`` directory. + + * - allowPartialResults + - boolean + - For queries against a sharded collection, returns partial results from + the :program:`mongos` if some shards are unavailable instead of + throwing an error. + + * - batchSize + - integer + - The number of documents to return in the first batch. Defaults to + ``101``. A batchSize of ``0`` means that the cursor will be + established, but no documents will be returned in the first batch. + + Unlike the previous wire protocol version, a batchSize of ``1`` for the + :dbcommand:`find` command does not close the cursor. + + * - collation + - array|object + - .. include:: /includes/extracts/common-option-collation.rst + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + The comment can be any valid BSON type for server versions 4.4 and above. + Earlier server versions only support string values. + + * - cursorType + - integer + - Indicates the type of cursor to use. ``cursorType`` supports the + following values: + + - ``MongoDB\Operation\Find::NON_TAILABLE`` (*default*) + - ``MongoDB\Operation\Find::TAILABLE`` + + * - hint + - string|array|object + - .. include:: /includes/extracts/common-option-hint.rst + + .. versionadded:: 1.2 + + * - let + - array|object + - .. include:: /includes/extracts/common-option-let.rst + + .. versionadded:: 1.13 + + * - limit + - integer + - The maximum number of documents to return. If unspecified, then + defaults to no limit. A limit of ``0`` is equivalent to setting no + limit. + + A negative limit is similar to a positive limit but closes the cursor + after returning a single batch of results. As such, with a negative + limit, if the limited result set does not fit into a single batch, the + number of documents received will be less than the specified limit. By + passing a negative limit, the client indicates to the server that it + will not ask for a subsequent batch via getMore. + + * - max + - array|object + - The exclusive upper bound for a specific index. + + .. versionadded:: 1.2 + + * - maxAwaitTimeMS + - integer + - Positive integer denoting the time limit in milliseconds for the server + to block a getMore operation if no data is available. This option + should only be used if cursorType is TAILABLE_AWAIT. + + .. versionadded:: 1.2 + + * - maxScan + - integer + - Maximum number of documents or index keys to scan when executing the + query. + + .. deprecated:: 1.4 + .. versionadded:: 1.2 + + * - maxTimeMS + - integer + - .. include:: /includes/extracts/common-option-maxTimeMS.rst + + * - min + - array|object + - The inclusive lower bound for a specific index. + + .. versionadded:: 1.2 + + * - modifiers + - array|object + - :manual:`Meta operators ` that + modify the output or behavior of a query. Use of these operators is + deprecated in favor of named options. + + * - noCursorTimeout + - boolean + - Prevents the server from timing out idle cursors after an inactivity + period (10 minutes). + + * - oplogReplay + - boolean + - Internal use for replica sets. To use ``oplogReplay``, you must include + the following condition in the filter: + + .. code-block:: javascript + + { ts: { $gte: } } + + The :php:`MongoDB\\BSON\\Timestamp ` + class reference describes how to represent MongoDB's BSON timestamp + type with PHP. + + .. deprecated:: 1.7 + + * - projection + - array|object + - The :ref:`projection specification ` to determine which + fields to include in the returned documents. See + :manual:`Project Fields to Return from Query ` + and :manual:`Projection Operators ` in + the MongoDB manual. + + * - readConcern + - :php:`MongoDB\\Driver\\ReadConcern ` + - .. include:: /includes/extracts/bucket-option-readConcern.rst + + It is not possible to specify a :manual:`read concern + ` for individual operations as part of a + transaction. Instead, set the ``readConcern`` option when starting the + transaction with :php:`startTransaction `. + + * - readPreference + - :php:`MongoDB\\Driver\\ReadPreference ` + - .. include:: /includes/extracts/bucket-option-readPreference.rst + + * - returnKey + - boolean + - If true, returns only the index keys in the resulting documents. + + .. versionadded:: 1.2 + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst + + .. versionadded:: 1.3 + + * - showRecordId + - boolean + - Determines whether to return the record identifier for each document. + If true, adds a field ``$recordId`` to the returned documents. + + .. versionadded:: 1.2 + + * - skip + - integer + - Number of documents to skip. Defaults to ``0``. + + * - sort + - array|object + - The sort specification for the ordering of the results. - .. include:: /includes/apiargs/MongoDBCollection-method-find-param.rst + * - snapshot + - boolean + - Prevents the cursor from returning a document more than once because of + an intervening write operation. - The ``$options`` parameter supports the following options: + .. deprecated:: 1.4 + .. versionadded:: 1.2 - .. include:: /includes/apiargs/MongoDBGridFSBucket-method-find-option.rst + * - typeMap + - array + - .. include:: /includes/extracts/bucket-option-typeMap.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBGridFSBucket-findOne.txt b/docs/reference/method/MongoDBGridFSBucket-findOne.txt index f126448d9..df6ecdbd6 100644 --- a/docs/reference/method/MongoDBGridFSBucket-findOne.txt +++ b/docs/reference/method/MongoDBGridFSBucket-findOne.txt @@ -20,15 +20,160 @@ Definition .. code-block:: php - function findOne(array|object $filter = [], array $options = []): array|object|null + function findOne( + array|object $filter = [], + array $options = [] + ): array|object|null - This method has the following parameters: +Parameters +---------- + +``$filter`` : array|object + The filter criteria that specifies the documents to query. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - allowDiskUse + - boolean + - Enables writing to temporary files. When set to ``true``, queries can + write data to the ``_tmp`` sub-directory in the ``dbPath`` directory. + + * - allowPartialResults + - boolean + - For queries against a sharded collection, returns partial results from + the :program:`mongos` if some shards are unavailable instead of + throwing an error. + + * - collation + - array|object + - .. include:: /includes/extracts/common-option-collation.rst + + * - comment + - mixed + - .. include:: /includes/extracts/common-option-comment.rst + + The comment can be any valid BSON type for server versions 4.4 and above. + Earlier server versions only support string values. + + * - hint + - string|array|object + - .. include:: /includes/extracts/common-option-hint.rst + + .. versionadded:: 1.2 + + * - let + - array|object + - .. include:: /includes/extracts/common-option-let.rst + + .. versionadded:: 1.13 + + * - max + - array|object + - The exclusive upper bound for a specific index. + + .. versionadded:: 1.2 + + * - maxScan + - integer + - Maximum number of documents or index keys to scan when executing the + query. + + .. deprecated:: 1.4 + .. versionadded:: 1.2 + + * - maxTimeMS + - integer + - .. include:: /includes/extracts/common-option-maxTimeMS.rst + + * - min + - array|object + - The inclusive lower bound for a specific index. + + .. versionadded:: 1.2 + + * - modifiers + - array|object + - :manual:`Meta operators ` that + modify the output or behavior of a query. Use of these operators is + deprecated in favor of named options. + + * - oplogReplay + - boolean + - Internal use for replica sets. To use ``oplogReplay``, you must include + the following condition in the filter: + + .. code-block:: javascript + + { ts: { $gte: } } + + The :php:`MongoDB\\BSON\\Timestamp ` + class reference describes how to represent MongoDB's BSON timestamp + type with PHP. + + .. deprecated:: 1.7 + + * - projection + - array|object + - The :ref:`projection specification ` to determine which + fields to include in the returned documents. See + :manual:`Project Fields to Return from Query ` + and :manual:`Projection Operators ` in + the MongoDB manual. + + * - readConcern + - :php:`MongoDB\\Driver\\ReadConcern ` + - .. include:: /includes/extracts/bucket-option-readConcern.rst + + It is not possible to specify a :manual:`read concern + ` for individual operations as part of a + transaction. Instead, set the ``readConcern`` option when starting the + transaction with :php:`startTransaction `. + + * - readPreference + - :php:`MongoDB\\Driver\\ReadPreference ` + - .. include:: /includes/extracts/bucket-option-readPreference.rst + + * - returnKey + - boolean + - If true, returns only the index keys in the resulting documents. + + .. versionadded:: 1.2 + + * - session + - :php:`MongoDB\\Driver\\Session ` + - .. include:: /includes/extracts/common-option-session.rst + + .. versionadded:: 1.3 + + * - showRecordId + - boolean + - Determines whether to return the record identifier for each document. + If true, adds a field ``$recordId`` to the returned documents. + + .. versionadded:: 1.2 + + * - skip + - integer + - Number of documents to skip. Defaults to ``0``. - .. include:: /includes/apiargs/MongoDBCollection-method-findOne-param.rst + * - sort + - array|object + - The sort specification for the ordering of the results. - The ``$options`` parameter supports the following options: + * - typeMap + - array + - .. include:: /includes/extracts/bucket-option-typeMap.rst - .. include:: /includes/apiargs/MongoDBGridFSBucket-method-findOne-option.rst + This will be used for the returned result document. Return Values ------------- diff --git a/docs/reference/method/MongoDBGridFSBucket-getFileDocumentForStream.txt b/docs/reference/method/MongoDBGridFSBucket-getFileDocumentForStream.txt index f8d633ed2..fa8625f9d 100644 --- a/docs/reference/method/MongoDBGridFSBucket-getFileDocumentForStream.txt +++ b/docs/reference/method/MongoDBGridFSBucket-getFileDocumentForStream.txt @@ -21,9 +21,11 @@ Definition function getFileDocumentForStream(resource $stream): array|object - This method has the following parameters: +Parameters +---------- - .. include:: /includes/apiargs/MongoDBGridFSBucket-method-getFileDocumentForStream-param.rst +``$stream`` : resource + The GridFS stream resource. Return Values ------------- diff --git a/docs/reference/method/MongoDBGridFSBucket-getFileIdForStream.txt b/docs/reference/method/MongoDBGridFSBucket-getFileIdForStream.txt index f88dc885a..b42ab19b3 100644 --- a/docs/reference/method/MongoDBGridFSBucket-getFileIdForStream.txt +++ b/docs/reference/method/MongoDBGridFSBucket-getFileIdForStream.txt @@ -21,9 +21,11 @@ Definition function getFileIdForStream(resource $stream): mixed - This method has the following parameters: +Parameters +---------- - .. include:: /includes/apiargs/MongoDBGridFSBucket-method-getFileIdForStream-param.rst +``$stream`` : resource + The GridFS stream resource. Return Values ------------- diff --git a/docs/reference/method/MongoDBGridFSBucket-openDownloadStream.txt b/docs/reference/method/MongoDBGridFSBucket-openDownloadStream.txt index 85f2150a3..9118cecc7 100644 --- a/docs/reference/method/MongoDBGridFSBucket-openDownloadStream.txt +++ b/docs/reference/method/MongoDBGridFSBucket-openDownloadStream.txt @@ -21,9 +21,11 @@ Definition function openDownloadStream($id): resource - This method has the following parameters: +Parameters +---------- - .. include:: /includes/apiargs/MongoDBGridFSBucket-method-openDownloadStream-param.rst +``$id`` : mixed + The ``_id`` of the file to download. Return Values ------------- diff --git a/docs/reference/method/MongoDBGridFSBucket-openDownloadStreamByName.txt b/docs/reference/method/MongoDBGridFSBucket-openDownloadStreamByName.txt index cb3a336ee..4c0b525dd 100644 --- a/docs/reference/method/MongoDBGridFSBucket-openDownloadStreamByName.txt +++ b/docs/reference/method/MongoDBGridFSBucket-openDownloadStreamByName.txt @@ -19,15 +19,43 @@ Definition .. code-block:: php - function openDownloadStreamByName(string $filename, array $options = []): resource + function openDownloadStreamByName( + string $filename, + array $options = [] + ): resource - This method has the following parameters: +Parameters +---------- + +``$filename`` : string + The ``filename`` of the file to download. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - revision + - integer + - The revision of the file to retrieve. Files with the same ``filename`` + will be differentiated by their ``uploadDate`` field. - .. include:: /includes/apiargs/MongoDBGridFSBucket-method-openDownloadStreamByName-param.rst + Revision numbers are defined as follows: - The ``$options`` parameter supports the following options: + - 0 = the original stored file + - 1 = the first revision + - 2 = the second revision + - etc... + - -2 = the second most recent revision + - -1 = the most recent revision - .. include:: /includes/apiargs/MongoDBGridFSBucket-method-openDownloadStreamByName-option.rst + Defaults to -1 (i.e. the most recent revision). Return Values ------------- diff --git a/docs/reference/method/MongoDBGridFSBucket-openUploadStream.txt b/docs/reference/method/MongoDBGridFSBucket-openUploadStream.txt index 348b325f4..2870b5445 100644 --- a/docs/reference/method/MongoDBGridFSBucket-openUploadStream.txt +++ b/docs/reference/method/MongoDBGridFSBucket-openUploadStream.txt @@ -19,15 +19,50 @@ Definition .. code-block:: php - function openUploadStream(string $filename, array $options = []): resource + function openUploadStream( + string $filename, + array $options = [] + ): resource - This method has the following parameters: +Parameters +---------- + +``$filename`` : string + The ``filename`` of the file to create. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - _id + - mixed + - Value to use as the file document identifier. Defaults to a new + :php:`MongoDB\\BSON\\ObjectId ` object. + + * - chunkSizeBytes + - integer + - The chunk size in bytes. Defaults to the bucket's ``chunkSizeBytes`` + option. + + * - disableMD5 + - boolean + - Whether to disable automatic MD5 generation when storing files. - .. include:: /includes/apiargs/MongoDBGridFSBucket-method-openUploadStream-param.rst + Defaults to ``false``. - The ``$options`` parameter supports the following options: + .. versionadded: 1.4 - .. include:: /includes/apiargs/MongoDBGridFSBucket-method-openUploadStream-option.rst + * - metadata + - array|object + - User data for the ``metadata`` field of the file document. If not + specified, the ``metadata`` field will not be set on the file document. Return Values ------------- diff --git a/docs/reference/method/MongoDBGridFSBucket-rename.txt b/docs/reference/method/MongoDBGridFSBucket-rename.txt index 888d1ae3f..20d9c1d7f 100644 --- a/docs/reference/method/MongoDBGridFSBucket-rename.txt +++ b/docs/reference/method/MongoDBGridFSBucket-rename.txt @@ -21,9 +21,14 @@ Definition function rename($id, string $newFilename): void - This method has the following parameters: +Parameters +---------- + +``$id`` : mixed + The ``_id`` of the file to rename. - .. include:: /includes/apiargs/MongoDBGridFSBucket-method-rename-param.rst +``$newFilename`` : string + The new ``filename`` value. Errors/Exceptions ----------------- diff --git a/docs/reference/method/MongoDBGridFSBucket-uploadFromStream.txt b/docs/reference/method/MongoDBGridFSBucket-uploadFromStream.txt index 18e5944b6..89cb8d2f3 100644 --- a/docs/reference/method/MongoDBGridFSBucket-uploadFromStream.txt +++ b/docs/reference/method/MongoDBGridFSBucket-uploadFromStream.txt @@ -19,15 +19,54 @@ Definition .. code-block:: php - function uploadFromStream(string $filename, resource $source, array $options = []): mixed + function uploadFromStream( + string $filename, + resource $source, + array $options = [] + ): mixed - This method has the following parameters: +Parameters +---------- + +``$filename`` : string + The ``filename`` of the file to create. + +``$source`` : resource + Readable stream, from which the new GridFS file's contents will be read. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - _id + - mixed + - Value to use as the file document identifier. Defaults to a new + :php:`MongoDB\\BSON\\ObjectId ` object. + + * - chunkSizeBytes + - integer + - The chunk size in bytes. Defaults to the bucket's ``chunkSizeBytes`` + option. + + * - disableMD5 + - boolean + - Whether to disable automatic MD5 generation when storing files. - .. include:: /includes/apiargs/MongoDBGridFSBucket-method-uploadFromStream-param.rst + Defaults to ``false``. - The ``$options`` parameter supports the following options: + .. versionadded: 1.4 - .. include:: /includes/apiargs/MongoDBGridFSBucket-method-uploadFromStream-option.rst + * - metadata + - array|object + - User data for the ``metadata`` field of the file document. If not + specified, the ``metadata`` field will not be set on the file document. Return Values ------------- diff --git a/docs/reference/method/MongoDBGridFSBucket__construct.txt b/docs/reference/method/MongoDBGridFSBucket__construct.txt index c6c309bb3..25271e0cb 100644 --- a/docs/reference/method/MongoDBGridFSBucket__construct.txt +++ b/docs/reference/method/MongoDBGridFSBucket__construct.txt @@ -19,15 +19,79 @@ Definition .. code-block:: php - function __construct(MongoDB\Driver\Manager $manager, string $databaseName, array $options = []) + function __construct( + MongoDB\Driver\Manager $manager, + string $databaseName, + array $options = [] + ) - This constructor has the following parameters: +Parameters +---------- + +``$manager`` : :php:`MongoDB\\Driver\\Manager ` + The :php:`Manager ` instance from the driver. The + manager maintains connections between the driver and your MongoDB instances. + +``$databaseName`` : string + The name of the database. + +``$options`` : array + An array specifying the desired options. + + .. list-table:: + :header-rows: 1 + :widths: 20 20 80 + + * - Name + - Type + - Description + + * - bucketName + - string + - The bucket name, which will be used as a prefix for the files and + chunks collections. Defaults to ``"fs"``. + + * - chunkSizeBytes + - integer + - The chunk size in bytes. Defaults to ``261120`` (i.e. 255 KiB). + + * - disableMD5 + - boolean + - Whether to disable automatic MD5 generation when storing files. + + Defaults to ``false``. + + .. versionadded: 1.4 + + * - readConcern + - :php:`MongoDB\\Driver\\ReadConcern ` + - The default read concern to use for bucket operations. Defaults to the + manager's read concern. + + * - readPreference + - :php:`MongoDB\\Driver\\ReadPreference ` + - The default read preference to use for bucket operations. Defaults to + the manager's read preference. + + * - typeMap + - array + - Default :php:`type map + ` + to apply to cursors, which determines how BSON documents are converted + to PHP values. The library uses the following type map by default: - .. include:: /includes/apiargs/MongoDBGridFSBucket-method-construct-param.rst + .. code-block:: php - The ``$options`` parameter supports the following options: + [ + 'array' => 'MongoDB\Model\BSONArray', + 'document' => 'MongoDB\Model\BSONDocument', + 'root' => 'MongoDB\Model\BSONDocument', + ] - .. include:: /includes/apiargs/MongoDBGridFSBucket-method-construct-option.rst + * - writeConcern + - :php:`MongoDB\\Driver\\WriteConcern ` + - The default write concern to use for bucket operations. Defaults to the + manager's write concern. Errors/Exceptions ----------------- From 70f5d2efa8fff93c46b3e0fe3902892520eb3d67 Mon Sep 17 00:00:00 2001 From: Jeremy Mikola Date: Mon, 11 Dec 2023 14:34:23 -0500 Subject: [PATCH 17/18] Use extracts for repeated option notes --- docs/includes/extracts-common-option.yaml | 17 +++++++ docs/includes/extracts-option-requires.yaml | 48 +++++++++++++++++++ .../method/MongoDBClient-dropDatabase.txt | 3 +- .../MongoDBClient-listDatabaseNames.txt | 3 +- .../method/MongoDBClient-listDatabases.txt | 3 +- docs/reference/method/MongoDBClient-watch.txt | 3 +- .../method/MongoDBCollection-aggregate.txt | 10 +--- .../method/MongoDBCollection-bulkWrite.txt | 8 +--- .../method/MongoDBCollection-count.txt | 8 +--- .../MongoDBCollection-countDocuments.txt | 8 +--- .../method/MongoDBCollection-createIndex.txt | 8 +--- .../MongoDBCollection-createIndexes.txt | 21 ++++---- .../method/MongoDBCollection-deleteMany.txt | 11 ++--- .../method/MongoDBCollection-deleteOne.txt | 11 ++--- .../method/MongoDBCollection-distinct.txt | 8 +--- .../method/MongoDBCollection-drop.txt | 8 +--- .../method/MongoDBCollection-dropIndex.txt | 8 +--- .../method/MongoDBCollection-dropIndexes.txt | 8 +--- ...ngoDBCollection-estimatedDocumentCount.txt | 8 +--- .../method/MongoDBCollection-explain.txt | 5 +- .../method/MongoDBCollection-find.txt | 8 +--- .../method/MongoDBCollection-findOne.txt | 8 +--- .../MongoDBCollection-findOneAndDelete.txt | 11 ++--- .../MongoDBCollection-findOneAndReplace.txt | 11 ++--- .../MongoDBCollection-findOneAndUpdate.txt | 11 ++--- .../method/MongoDBCollection-insertMany.txt | 8 +--- .../method/MongoDBCollection-insertOne.txt | 8 +--- .../method/MongoDBCollection-listIndexes.txt | 3 +- .../MongoDBCollection-listSearchIndexes.txt | 5 +- .../method/MongoDBCollection-mapReduce.txt | 13 ++--- .../method/MongoDBCollection-rename.txt | 8 +--- .../method/MongoDBCollection-replaceOne.txt | 11 ++--- .../method/MongoDBCollection-updateMany.txt | 11 ++--- .../method/MongoDBCollection-updateOne.txt | 11 ++--- .../method/MongoDBCollection-watch.txt | 3 +- .../MongoDBDatabase-createCollection.txt | 18 +++---- .../reference/method/MongoDBDatabase-drop.txt | 3 +- .../method/MongoDBDatabase-dropCollection.txt | 3 +- .../MongoDBDatabase-listCollectionNames.txt | 3 +- .../MongoDBDatabase-listCollections.txt | 3 +- .../MongoDBDatabase-modifyCollection.txt | 3 +- .../MongoDBDatabase-renameCollection.txt | 3 +- .../method/MongoDBDatabase-watch.txt | 3 +- .../method/MongoDBGridFSBucket-find.txt | 8 +--- .../method/MongoDBGridFSBucket-findOne.txt | 8 +--- 45 files changed, 157 insertions(+), 235 deletions(-) create mode 100644 docs/includes/extracts-option-requires.yaml diff --git a/docs/includes/extracts-common-option.yaml b/docs/includes/extracts-common-option.yaml index 2df3b1c5d..65940b1c4 100644 --- a/docs/includes/extracts-common-option.yaml +++ b/docs/includes/extracts-common-option.yaml @@ -13,6 +13,11 @@ content: | :manual:`currentOp ` output, and :manual:`logs `. --- +ref: common-option-comment-string-before-4.4 +content: | + The comment can be any valid BSON type since MongoDB 4.4. Earlier server + versions only support string values. +--- ref: common-option-hint content: | The index to use. Specify either the index name as a string or the index key @@ -41,6 +46,12 @@ content: | replacement: object: object --- +ref: common-option-readConcern-transaction +content: | + It is not possible to specify a read concern for individual operations as part + of a transaction. Instead, set the ``readConcern`` option when + :php:`starting the transaction `. +--- ref: common-option-readPreference content: | :manual:`Read preference ` to use for the @@ -66,4 +77,10 @@ content: | Defaults to the {{object}}'s write concern. replacement: object: object +--- +ref: common-option-writeConcern-transaction +content: | + It is not possible to specify a write concern for individual operations as + part of a transaction. Instead, set the ``writeConcern`` option when + :php:`starting the transaction `. ... diff --git a/docs/includes/extracts-option-requires.yaml b/docs/includes/extracts-option-requires.yaml new file mode 100644 index 000000000..3b65fbbab --- /dev/null +++ b/docs/includes/extracts-option-requires.yaml @@ -0,0 +1,48 @@ +--- +ref: option-requires-4.2 +source: + ref: option-requires-version + file: extracts-option-requires.yaml +replacement: + version: "4.2" +--- +ref: option-requires-4.4 +source: + ref: option-requires-version + file: extracts-option-requires.yaml +replacement: + version: "4.4" +--- +ref: option-requires-5.0 +source: + ref: option-requires-version + file: extracts-option-requires.yaml +replacement: + version: "5.0" +--- +ref: option-requires-5.3 +source: + ref: option-requires-version + file: extracts-option-requires.yaml +replacement: + version: "5.3" +--- +ref: option-requires-6.0 +source: + ref: option-requires-version + file: extracts-option-requires.yaml +replacement: + version: "6.0" +--- +ref: option-requires-7.0 +source: + ref: option-requires-version + file: extracts-option-requires.yaml +replacement: + version: "7.0" +--- +ref: option-requires-version +content: | + This option is available since MongoDB {{version}} and will result in an + exception at execution time if specified for an older server version. +... diff --git a/docs/reference/method/MongoDBClient-dropDatabase.txt b/docs/reference/method/MongoDBClient-dropDatabase.txt index e8b1863ff..5a2687651 100644 --- a/docs/reference/method/MongoDBClient-dropDatabase.txt +++ b/docs/reference/method/MongoDBClient-dropDatabase.txt @@ -42,8 +42,7 @@ Parameters - mixed - .. include:: /includes/extracts/common-option-comment.rst - This is not supported for server versions prior to 4.4 and will result - in an exception at execution time if used. + .. include:: /includes/extracts/option-requires-4.4.rst .. versionadded:: 1.13 diff --git a/docs/reference/method/MongoDBClient-listDatabaseNames.txt b/docs/reference/method/MongoDBClient-listDatabaseNames.txt index 5d5b237df..cac7d22c6 100644 --- a/docs/reference/method/MongoDBClient-listDatabaseNames.txt +++ b/docs/reference/method/MongoDBClient-listDatabaseNames.txt @@ -51,8 +51,7 @@ Parameters - mixed - .. include:: /includes/extracts/common-option-comment.rst - This is not supported for server versions prior to 4.4 and will result - in an exception at execution time if used. + .. include:: /includes/extracts/option-requires-4.4.rst .. versionadded:: 1.13 diff --git a/docs/reference/method/MongoDBClient-listDatabases.txt b/docs/reference/method/MongoDBClient-listDatabases.txt index 2ba5935d2..dd6b2da84 100644 --- a/docs/reference/method/MongoDBClient-listDatabases.txt +++ b/docs/reference/method/MongoDBClient-listDatabases.txt @@ -49,8 +49,7 @@ Parameters - mixed - .. include:: /includes/extracts/common-option-comment.rst - This is not supported for server versions prior to 4.4 and will result - in an exception at execution time if used. + .. include:: /includes/extracts/option-requires-4.4.rst .. versionadded:: 1.13 diff --git a/docs/reference/method/MongoDBClient-watch.txt b/docs/reference/method/MongoDBClient-watch.txt index b98a48edd..2977475a6 100644 --- a/docs/reference/method/MongoDBClient-watch.txt +++ b/docs/reference/method/MongoDBClient-watch.txt @@ -56,8 +56,7 @@ Parameters - mixed - .. include:: /includes/extracts/common-option-comment.rst - The comment can be any valid BSON type for server versions 4.4 and above. - Earlier server versions only support string values. + .. include:: /includes/extracts/common-option-comment-string-before-4.4.rst .. versionadded:: 1.13 diff --git a/docs/reference/method/MongoDBCollection-aggregate.txt b/docs/reference/method/MongoDBCollection-aggregate.txt index 082a884ce..11f9d19b4 100644 --- a/docs/reference/method/MongoDBCollection-aggregate.txt +++ b/docs/reference/method/MongoDBCollection-aggregate.txt @@ -110,10 +110,7 @@ Parameters - :php:`MongoDB\\Driver\\ReadConcern ` - .. include:: /includes/extracts/collection-option-readConcern.rst - It is not possible to specify a :manual:`read concern - ` for individual operations as part of a - transaction. Instead, set the ``readConcern`` option when starting the - transaction with :php:`startTransaction `. + .. include:: /includes/extracts/common-option-readConcern-transaction.rst * - readPreference - :php:`MongoDB\\Driver\\ReadPreference ` @@ -133,10 +130,7 @@ Parameters - :php:`MongoDB\\Driver\\WriteConcern ` - .. include:: /includes/extracts/collection-option-writeConcern.rst - It is not possible to specify a :manual:`write concern - ` for individual operations as part of a - transaction. Instead, set the ``writeConcern`` option when starting the - transaction with :php:`startTransaction `. + .. include:: /includes/extracts/common-option-writeConcern-transaction.rst This only applies when a :ref:`$out ` or :ref:`$merge ` stage is specified. diff --git a/docs/reference/method/MongoDBCollection-bulkWrite.txt b/docs/reference/method/MongoDBCollection-bulkWrite.txt index 64ae03f6d..a86e9cc6f 100644 --- a/docs/reference/method/MongoDBCollection-bulkWrite.txt +++ b/docs/reference/method/MongoDBCollection-bulkWrite.txt @@ -74,8 +74,7 @@ Parameters - mixed - .. include:: /includes/extracts/common-option-comment.rst - This is not supported for server versions prior to 4.4 and will result - in an exception at execution time if used. + .. include:: /includes/extracts/option-requires-4.4.rst .. versionadded:: 1.13 @@ -105,10 +104,7 @@ Parameters - :php:`MongoDB\\Driver\\WriteConcern ` - .. include:: /includes/extracts/collection-option-writeConcern.rst - It is not possible to specify a :manual:`write concern - ` for individual operations as part of a - transaction. Instead, set the ``writeConcern`` option when starting the - transaction with :php:`startTransaction `. + .. include:: /includes/extracts/common-option-writeConcern-transaction.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-count.txt b/docs/reference/method/MongoDBCollection-count.txt index 2f641d893..0048703f4 100644 --- a/docs/reference/method/MongoDBCollection-count.txt +++ b/docs/reference/method/MongoDBCollection-count.txt @@ -51,8 +51,7 @@ Parameters - mixed - .. include:: /includes/extracts/common-option-comment.rst - This is not supported for server versions prior to 4.4 and will result - in an exception at execution time if used. + .. include:: /includes/extracts/option-requires-4.4.rst .. versionadded:: 1.13 @@ -78,10 +77,7 @@ Parameters - :php:`MongoDB\\Driver\\ReadConcern ` - .. include:: /includes/extracts/collection-option-readConcern.rst - It is not possible to specify a :manual:`read concern - ` for individual operations as part of a - transaction. Instead, set the ``readConcern`` option when starting the - transaction with :php:`startTransaction `. + .. include:: /includes/extracts/common-option-readConcern-transaction.rst * - readPreference - :php:`MongoDB\\Driver\\ReadPreference ` diff --git a/docs/reference/method/MongoDBCollection-countDocuments.txt b/docs/reference/method/MongoDBCollection-countDocuments.txt index ba7e1a8b6..dc62b1d65 100644 --- a/docs/reference/method/MongoDBCollection-countDocuments.txt +++ b/docs/reference/method/MongoDBCollection-countDocuments.txt @@ -48,8 +48,7 @@ Parameters - mixed - .. include:: /includes/extracts/common-option-comment.rst - The comment can be any valid BSON type for server versions 4.4 and above. - Earlier server versions only support string values. + .. include:: /includes/extracts/common-option-comment-string-before-4.4.rst * - hint - string|array|object @@ -67,10 +66,7 @@ Parameters - :php:`MongoDB\\Driver\\ReadConcern ` - .. include:: /includes/extracts/collection-option-readConcern.rst - It is not possible to specify a :manual:`read concern - ` for individual operations as part of a - transaction. Instead, set the ``readConcern`` option when starting the - transaction with :php:`startTransaction `. + .. include:: /includes/extracts/common-option-readConcern-transaction.rst * - readPreference - :php:`MongoDB\\Driver\\ReadPreference ` diff --git a/docs/reference/method/MongoDBCollection-createIndex.txt b/docs/reference/method/MongoDBCollection-createIndex.txt index 5dda0dedd..7f8aca41d 100644 --- a/docs/reference/method/MongoDBCollection-createIndex.txt +++ b/docs/reference/method/MongoDBCollection-createIndex.txt @@ -91,8 +91,7 @@ Parameters - mixed - .. include:: /includes/extracts/common-option-comment.rst - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. + .. include:: /includes/extracts/option-requires-4.4.rst .. versionadded:: 1.13 @@ -127,10 +126,7 @@ Parameters - :php:`MongoDB\\Driver\\WriteConcern ` - .. include:: /includes/extracts/collection-option-writeConcern.rst - It is not possible to specify a :manual:`write concern - ` for individual operations as part of a - transaction. Instead, set the ``writeConcern`` option when starting the - transaction with :php:`startTransaction `. + .. include:: /includes/extracts/common-option-writeConcern-transaction.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-createIndexes.txt b/docs/reference/method/MongoDBCollection-createIndexes.txt index b53bbf51e..efb740ea2 100644 --- a/docs/reference/method/MongoDBCollection-createIndexes.txt +++ b/docs/reference/method/MongoDBCollection-createIndexes.txt @@ -55,22 +55,22 @@ Parameters - mixed - .. include:: /includes/extracts/common-option-comment.rst - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. + .. include:: /includes/extracts/option-requires-4.4.rst .. versionadded:: 1.13 * - commitQuorum - string|integer - Specifies how many data-bearing members of a replica set, including the - primary, must complete the index builds successfully before the primary marks - the indexes as ready. + primary, must complete the index builds successfully before the primary + marks the indexes as ready. - This option accepts the same values for the ``w`` field in a write concern - plus ``"votingMembers"``, which indicates all voting data-bearing nodes. + This option accepts the same values for the ``w`` field in a write + concern plus ``"votingMembers"``, which indicates all voting + data-bearing nodes. - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. + This is not supported for server versions prior to 4.4 and will result + in an exception at execution time if used. .. versionadded:: 1.7 @@ -90,10 +90,7 @@ Parameters - :php:`MongoDB\\Driver\\WriteConcern ` - .. include:: /includes/extracts/collection-option-writeConcern.rst - It is not possible to specify a :manual:`write concern - ` for individual operations as part of a - transaction. Instead, set the ``writeConcern`` option when starting the - transaction with :php:`startTransaction `. + .. include:: /includes/extracts/common-option-writeConcern-transaction.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-deleteMany.txt b/docs/reference/method/MongoDBCollection-deleteMany.txt index 868bdf38b..ccb5e37db 100644 --- a/docs/reference/method/MongoDBCollection-deleteMany.txt +++ b/docs/reference/method/MongoDBCollection-deleteMany.txt @@ -49,8 +49,7 @@ Parameters - mixed - .. include:: /includes/extracts/common-option-comment.rst - This is not supported for server versions prior to 4.4 and will result - in an exception at execution time if used. + .. include:: /includes/extracts/option-requires-4.4.rst .. versionadded:: 1.13 @@ -58,8 +57,7 @@ Parameters - string|array|object - .. include:: /includes/extracts/common-option-hint.rst - This option is available in MongoDB 4.4+ and will result in an - exception at execution time if specified for an older server version. + .. include:: /includes/extracts/option-requires-4.4.rst .. versionadded:: 1.7 @@ -79,10 +77,7 @@ Parameters - :php:`MongoDB\\Driver\\WriteConcern ` - .. include:: /includes/extracts/collection-option-writeConcern.rst - It is not possible to specify a :manual:`write concern - ` for individual operations as part of a - transaction. Instead, set the ``writeConcern`` option when starting the - transaction with :php:`startTransaction `. + .. include:: /includes/extracts/common-option-writeConcern-transaction.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-deleteOne.txt b/docs/reference/method/MongoDBCollection-deleteOne.txt index 88903a48e..0c6598914 100644 --- a/docs/reference/method/MongoDBCollection-deleteOne.txt +++ b/docs/reference/method/MongoDBCollection-deleteOne.txt @@ -51,8 +51,7 @@ Parameters - mixed - .. include:: /includes/extracts/common-option-comment.rst - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. + .. include:: /includes/extracts/option-requires-4.4.rst .. versionadded:: 1.13 @@ -60,8 +59,7 @@ Parameters - string|array|object - .. include:: /includes/extracts/common-option-hint.rst - This option is available in MongoDB 4.4+ and will result in an exception at - execution time if specified for an older server version. + .. include:: /includes/extracts/option-requires-4.4.rst .. versionadded:: 1.7 @@ -81,10 +79,7 @@ Parameters - :php:`MongoDB\\Driver\\WriteConcern ` - .. include:: /includes/extracts/collection-option-writeConcern.rst - It is not possible to specify a :manual:`write concern - ` for individual operations as part of a - transaction. Instead, set the ``writeConcern`` option when starting the - transaction with :php:`startTransaction `. + .. include:: /includes/extracts/common-option-writeConcern-transaction.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-distinct.txt b/docs/reference/method/MongoDBCollection-distinct.txt index 873d2fb78..42eae0681 100644 --- a/docs/reference/method/MongoDBCollection-distinct.txt +++ b/docs/reference/method/MongoDBCollection-distinct.txt @@ -54,8 +54,7 @@ Parameters - mixed - .. include:: /includes/extracts/common-option-comment.rst - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. + .. include:: /includes/extracts/option-requires-4.4.rst .. versionadded:: 1.13 @@ -67,10 +66,7 @@ Parameters - :php:`MongoDB\\Driver\\ReadConcern ` - .. include:: /includes/extracts/collection-option-readConcern.rst - It is not possible to specify a :manual:`read concern - ` for individual operations as part of a - transaction. Instead, set the ``readConcern`` option when starting the - transaction with :php:`startTransaction `. + .. include:: /includes/extracts/common-option-readConcern-transaction.rst * - readPreference - :php:`MongoDB\\Driver\\ReadPreference ` diff --git a/docs/reference/method/MongoDBCollection-drop.txt b/docs/reference/method/MongoDBCollection-drop.txt index e66434894..0704ff6a8 100644 --- a/docs/reference/method/MongoDBCollection-drop.txt +++ b/docs/reference/method/MongoDBCollection-drop.txt @@ -39,8 +39,7 @@ Parameters - mixed - .. include:: /includes/extracts/common-option-comment.rst - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. + .. include:: /includes/extracts/option-requires-4.4.rst .. versionadded:: 1.13 @@ -80,10 +79,7 @@ Parameters - :php:`MongoDB\\Driver\\WriteConcern ` - .. include:: /includes/extracts/collection-option-writeConcern.rst - It is not possible to specify a :manual:`write concern - ` for individual operations as part of a - transaction. Instead, set the ``writeConcern`` option when starting the - transaction with :php:`startTransaction `. + .. include:: /includes/extracts/common-option-writeConcern-transaction.rst diff --git a/docs/reference/method/MongoDBCollection-dropIndex.txt b/docs/reference/method/MongoDBCollection-dropIndex.txt index 47aa1f04b..07a181458 100644 --- a/docs/reference/method/MongoDBCollection-dropIndex.txt +++ b/docs/reference/method/MongoDBCollection-dropIndex.txt @@ -47,8 +47,7 @@ Parameters - mixed - .. include:: /includes/extracts/common-option-comment.rst - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. + .. include:: /includes/extracts/option-requires-4.4.rst .. versionadded:: 1.13 @@ -74,10 +73,7 @@ Parameters - :php:`MongoDB\\Driver\\WriteConcern ` - .. include:: /includes/extracts/collection-option-writeConcern.rst - It is not possible to specify a :manual:`write concern - ` for individual operations as part of a - transaction. Instead, set the ``writeConcern`` option when starting the - transaction with :php:`startTransaction `. + .. include:: /includes/extracts/common-option-writeConcern-transaction.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-dropIndexes.txt b/docs/reference/method/MongoDBCollection-dropIndexes.txt index 218ac78eb..41fda6e40 100644 --- a/docs/reference/method/MongoDBCollection-dropIndexes.txt +++ b/docs/reference/method/MongoDBCollection-dropIndexes.txt @@ -45,8 +45,7 @@ Parameters - mixed - .. include:: /includes/extracts/common-option-comment.rst - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. + .. include:: /includes/extracts/option-requires-4.4.rst .. versionadded:: 1.13 @@ -72,10 +71,7 @@ Parameters - :php:`MongoDB\\Driver\\WriteConcern ` - .. include:: /includes/extracts/collection-option-writeConcern.rst - It is not possible to specify a :manual:`write concern - ` for individual operations as part of a - transaction. Instead, set the ``writeConcern`` option when starting the - transaction with :php:`startTransaction `. + .. include:: /includes/extracts/common-option-writeConcern-transaction.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-estimatedDocumentCount.txt b/docs/reference/method/MongoDBCollection-estimatedDocumentCount.txt index 95c4c66b2..59a7b2124 100644 --- a/docs/reference/method/MongoDBCollection-estimatedDocumentCount.txt +++ b/docs/reference/method/MongoDBCollection-estimatedDocumentCount.txt @@ -41,8 +41,7 @@ Parameters - mixed - .. include:: /includes/extracts/common-option-comment.rst - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. + .. include:: /includes/extracts/option-requires-4.4.rst .. versionadded:: 1.13 @@ -54,10 +53,7 @@ Parameters - :php:`MongoDB\\Driver\\ReadConcern ` - .. include:: /includes/extracts/collection-option-readConcern.rst - It is not possible to specify a :manual:`read concern - ` for individual operations as part of a - transaction. Instead, set the ``readConcern`` option when starting the - transaction with :php:`startTransaction `. + .. include:: /includes/extracts/common-option-readConcern-transaction.rst * - readPreference - :php:`MongoDB\\Driver\\ReadPreference ` diff --git a/docs/reference/method/MongoDBCollection-explain.txt b/docs/reference/method/MongoDBCollection-explain.txt index d7ccb7d7d..ad63ec56a 100644 --- a/docs/reference/method/MongoDBCollection-explain.txt +++ b/docs/reference/method/MongoDBCollection-explain.txt @@ -47,10 +47,9 @@ Parameters - mixed - .. include:: /includes/extracts/common-option-comment.rst - Defaults to the ``comment`` of the explained operation (if any). + .. include:: /includes/extracts/option-requires-4.4.rst - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. + Defaults to the ``comment`` of the explained operation (if any). .. versionadded:: 1.13 diff --git a/docs/reference/method/MongoDBCollection-find.txt b/docs/reference/method/MongoDBCollection-find.txt index f475df419..8c0ce7c22 100644 --- a/docs/reference/method/MongoDBCollection-find.txt +++ b/docs/reference/method/MongoDBCollection-find.txt @@ -69,8 +69,7 @@ Parameters - mixed - .. include:: /includes/extracts/common-option-comment.rst - The comment can be any valid BSON type for server versions 4.4 and above. - Earlier server versions only support string values. + .. include:: /includes/extracts/common-option-comment-string-before-4.4.rst * - cursorType - integer @@ -175,10 +174,7 @@ Parameters - :php:`MongoDB\\Driver\\ReadConcern ` - .. include:: /includes/extracts/collection-option-readConcern.rst - It is not possible to specify a :manual:`read concern - ` for individual operations as part of a - transaction. Instead, set the ``readConcern`` option when starting the - transaction with :php:`startTransaction `. + .. include:: /includes/extracts/common-option-readConcern-transaction.rst * - readPreference - :php:`MongoDB\\Driver\\ReadPreference ` diff --git a/docs/reference/method/MongoDBCollection-findOne.txt b/docs/reference/method/MongoDBCollection-findOne.txt index 7cc152559..c5230c6cf 100644 --- a/docs/reference/method/MongoDBCollection-findOne.txt +++ b/docs/reference/method/MongoDBCollection-findOne.txt @@ -60,8 +60,7 @@ Parameters - mixed - .. include:: /includes/extracts/common-option-comment.rst - The comment can be any valid BSON type for server versions 4.4 and above. - Earlier server versions only support string values. + .. include:: /includes/extracts/common-option-comment-string-before-4.4.rst * - hint - string|array|object @@ -132,10 +131,7 @@ Parameters - :php:`MongoDB\\Driver\\ReadConcern ` - .. include:: /includes/extracts/collection-option-readConcern.rst - It is not possible to specify a :manual:`read concern - ` for individual operations as part of a - transaction. Instead, set the ``readConcern`` option when starting the - transaction with :php:`startTransaction `. + .. include:: /includes/extracts/common-option-readConcern-transaction.rst * - readPreference - :php:`MongoDB\\Driver\\ReadPreference ` diff --git a/docs/reference/method/MongoDBCollection-findOneAndDelete.txt b/docs/reference/method/MongoDBCollection-findOneAndDelete.txt index 0baac670f..b34bd5788 100644 --- a/docs/reference/method/MongoDBCollection-findOneAndDelete.txt +++ b/docs/reference/method/MongoDBCollection-findOneAndDelete.txt @@ -49,8 +49,7 @@ Parameters - mixed - .. include:: /includes/extracts/common-option-comment.rst - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. + .. include:: /includes/extracts/option-requires-4.4.rst .. versionadded:: 1.13 @@ -58,8 +57,7 @@ Parameters - string|array|object - .. include:: /includes/extracts/common-option-hint.rst - This option is available in MongoDB 4.4+ and will result in an exception at - execution time if specified for an older server version. + .. include:: /includes/extracts/option-requires-4.4.rst .. versionadded:: 1.7 @@ -101,10 +99,7 @@ Parameters - :php:`MongoDB\\Driver\\WriteConcern ` - .. include:: /includes/extracts/collection-option-writeConcern.rst - It is not possible to specify a :manual:`write concern - ` for individual operations as part of a - transaction. Instead, set the ``writeConcern`` option when starting the - transaction with :php:`startTransaction `. + .. include:: /includes/extracts/common-option-writeConcern-transaction.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-findOneAndReplace.txt b/docs/reference/method/MongoDBCollection-findOneAndReplace.txt index 3acf35c3d..697e73710 100644 --- a/docs/reference/method/MongoDBCollection-findOneAndReplace.txt +++ b/docs/reference/method/MongoDBCollection-findOneAndReplace.txt @@ -58,8 +58,7 @@ Parameters - mixed - .. include:: /includes/extracts/common-option-comment.rst - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. + .. include:: /includes/extracts/option-requires-4.4.rst .. versionadded:: 1.13 @@ -67,8 +66,7 @@ Parameters - string|array|object - .. include:: /includes/extracts/common-option-hint.rst - This option is available in MongoDB 4.4+ and will result in an exception at - execution time if specified for an older server version. + .. include:: /includes/extracts/option-requires-4.4.rst .. versionadded:: 1.7 @@ -124,10 +122,7 @@ Parameters - :php:`MongoDB\\Driver\\WriteConcern ` - .. include:: /includes/extracts/collection-option-writeConcern.rst - It is not possible to specify a :manual:`write concern - ` for individual operations as part of a - transaction. Instead, set the ``writeConcern`` option when starting the - transaction with :php:`startTransaction `. + .. include:: /includes/extracts/common-option-writeConcern-transaction.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-findOneAndUpdate.txt b/docs/reference/method/MongoDBCollection-findOneAndUpdate.txt index 22225cdca..cbfbad16e 100644 --- a/docs/reference/method/MongoDBCollection-findOneAndUpdate.txt +++ b/docs/reference/method/MongoDBCollection-findOneAndUpdate.txt @@ -69,8 +69,7 @@ Parameters - mixed - .. include:: /includes/extracts/common-option-comment.rst - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. + .. include:: /includes/extracts/option-requires-4.4.rst .. versionadded:: 1.13 @@ -78,8 +77,7 @@ Parameters - string|array|object - .. include:: /includes/extracts/common-option-hint.rst - This option is available in MongoDB 4.4+ and will result in an exception at - execution time if specified for an older server version. + .. include:: /includes/extracts/option-requires-4.4.rst .. versionadded:: 1.7 @@ -135,10 +133,7 @@ Parameters - :php:`MongoDB\\Driver\\WriteConcern ` - .. include:: /includes/extracts/collection-option-writeConcern.rst - It is not possible to specify a :manual:`write concern - ` for individual operations as part of a - transaction. Instead, set the ``writeConcern`` option when starting the - transaction with :php:`startTransaction `. + .. include:: /includes/extracts/common-option-writeConcern-transaction.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-insertMany.txt b/docs/reference/method/MongoDBCollection-insertMany.txt index df721293b..6ff516e7e 100644 --- a/docs/reference/method/MongoDBCollection-insertMany.txt +++ b/docs/reference/method/MongoDBCollection-insertMany.txt @@ -50,8 +50,7 @@ Parameters - mixed - .. include:: /includes/extracts/common-option-comment.rst - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. + .. include:: /includes/extracts/option-requires-4.4.rst .. versionadded:: 1.13 @@ -75,10 +74,7 @@ Parameters - :php:`MongoDB\\Driver\\WriteConcern ` - .. include:: /includes/extracts/collection-option-writeConcern.rst - It is not possible to specify a :manual:`write concern - ` for individual operations as part of a - transaction. Instead, set the ``writeConcern`` option when starting the - transaction with :php:`startTransaction `. + .. include:: /includes/extracts/common-option-writeConcern-transaction.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-insertOne.txt b/docs/reference/method/MongoDBCollection-insertOne.txt index 48084ef8f..ce6f04840 100644 --- a/docs/reference/method/MongoDBCollection-insertOne.txt +++ b/docs/reference/method/MongoDBCollection-insertOne.txt @@ -50,8 +50,7 @@ Parameters - mixed - .. include:: /includes/extracts/common-option-comment.rst - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. + .. include:: /includes/extracts/option-requires-4.4.rst .. versionadded:: 1.13 @@ -65,10 +64,7 @@ Parameters - :php:`MongoDB\\Driver\\WriteConcern ` - .. include:: /includes/extracts/collection-option-writeConcern.rst - It is not possible to specify a :manual:`write concern - ` for individual operations as part of a - transaction. Instead, set the ``writeConcern`` option when starting the - transaction with :php:`startTransaction `. + .. include:: /includes/extracts/common-option-writeConcern-transaction.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-listIndexes.txt b/docs/reference/method/MongoDBCollection-listIndexes.txt index 9d0668c1e..84ee74b38 100644 --- a/docs/reference/method/MongoDBCollection-listIndexes.txt +++ b/docs/reference/method/MongoDBCollection-listIndexes.txt @@ -39,8 +39,7 @@ Parameters - mixed - .. include:: /includes/extracts/common-option-comment.rst - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. + .. include:: /includes/extracts/option-requires-4.4.rst .. versionadded:: 1.13 diff --git a/docs/reference/method/MongoDBCollection-listSearchIndexes.txt b/docs/reference/method/MongoDBCollection-listSearchIndexes.txt index 920434902..414848a0c 100644 --- a/docs/reference/method/MongoDBCollection-listSearchIndexes.txt +++ b/docs/reference/method/MongoDBCollection-listSearchIndexes.txt @@ -73,10 +73,7 @@ Parameters - :php:`MongoDB\\Driver\\ReadConcern ` - .. include:: /includes/extracts/collection-option-readConcern.rst - It is not possible to specify a :manual:`read concern - ` for individual operations as part of a - transaction. Instead, set the ``readConcern`` option when starting the - transaction with :php:`startTransaction `. + .. include:: /includes/extracts/common-option-readConcern-transaction.rst * - readPreference - :php:`MongoDB\\Driver\\ReadPreference ` diff --git a/docs/reference/method/MongoDBCollection-mapReduce.txt b/docs/reference/method/MongoDBCollection-mapReduce.txt index 5d8c917ad..1cb66f357 100644 --- a/docs/reference/method/MongoDBCollection-mapReduce.txt +++ b/docs/reference/method/MongoDBCollection-mapReduce.txt @@ -84,8 +84,7 @@ Parameters - mixed - .. include:: /includes/extracts/common-option-comment.rst - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. + .. include:: /includes/extracts/option-requires-4.4.rst .. versionadded:: 1.13 @@ -121,10 +120,7 @@ Parameters - :php:`MongoDB\\Driver\\ReadConcern ` - .. include:: /includes/extracts/collection-option-readConcern.rst - It is not possible to specify a :manual:`read concern - ` for individual operations as part of a - transaction. Instead, set the ``readConcern`` option when starting the - transaction with :php:`startTransaction `. + .. include:: /includes/extracts/common-option-readConcern-transaction.rst * - readPreference - :php:`MongoDB\\Driver\\ReadPreference ` @@ -160,10 +156,7 @@ Parameters - :php:`MongoDB\\Driver\\WriteConcern ` - .. include:: /includes/extracts/collection-option-writeConcern.rst - It is not possible to specify a :manual:`write concern - ` for individual operations as part of a - transaction. Instead, set the ``writeConcern`` option when starting the - transaction with :php:`startTransaction `. + .. include:: /includes/extracts/common-option-writeConcern-transaction.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-rename.txt b/docs/reference/method/MongoDBCollection-rename.txt index da0429bf2..2b617de94 100644 --- a/docs/reference/method/MongoDBCollection-rename.txt +++ b/docs/reference/method/MongoDBCollection-rename.txt @@ -59,8 +59,7 @@ Parameters - mixed - .. include:: /includes/extracts/common-option-comment.rst - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. + .. include:: /includes/extracts/option-requires-4.4.rst .. versionadded:: 1.13 @@ -78,10 +77,7 @@ Parameters - :php:`MongoDB\\Driver\\WriteConcern ` - .. include:: /includes/extracts/collection-option-writeConcern.rst - It is not possible to specify a :manual:`write concern - ` for individual operations as part of a - transaction. Instead, set the ``writeConcern`` option when starting the - transaction with :php:`startTransaction `. + .. include:: /includes/extracts/common-option-writeConcern-transaction.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-replaceOne.txt b/docs/reference/method/MongoDBCollection-replaceOne.txt index 7fc1bc930..94395eff0 100644 --- a/docs/reference/method/MongoDBCollection-replaceOne.txt +++ b/docs/reference/method/MongoDBCollection-replaceOne.txt @@ -60,8 +60,7 @@ Parameters - mixed - .. include:: /includes/extracts/common-option-comment.rst - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. + .. include:: /includes/extracts/option-requires-4.4.rst .. versionadded:: 1.13 @@ -69,8 +68,7 @@ Parameters - string|array|object - .. include:: /includes/extracts/common-option-hint.rst - This option is available in MongoDB 4.2+ and will result in an exception at - execution time if specified for an older server version. + .. include:: /includes/extracts/option-requires-4.2.rst .. versionadded:: 1.6 @@ -96,10 +94,7 @@ Parameters - :php:`MongoDB\\Driver\\WriteConcern ` - .. include:: /includes/extracts/collection-option-writeConcern.rst - It is not possible to specify a :manual:`write concern - ` for individual operations as part of a - transaction. Instead, set the ``writeConcern`` option when starting the - transaction with :php:`startTransaction `. + .. include:: /includes/extracts/common-option-writeConcern-transaction.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-updateMany.txt b/docs/reference/method/MongoDBCollection-updateMany.txt index f4421bc18..07f29211e 100644 --- a/docs/reference/method/MongoDBCollection-updateMany.txt +++ b/docs/reference/method/MongoDBCollection-updateMany.txt @@ -69,8 +69,7 @@ Parameters - mixed - .. include:: /includes/extracts/common-option-comment.rst - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. + .. include:: /includes/extracts/option-requires-4.4.rst .. versionadded:: 1.13 @@ -78,8 +77,7 @@ Parameters - string|array|object - .. include:: /includes/extracts/common-option-hint.rst - This option is available in MongoDB 4.2+ and will result in an exception at - execution time if specified for an older server version. + .. include:: /includes/extracts/option-requires-4.2.rst .. versionadded:: 1.6 @@ -105,10 +103,7 @@ Parameters - :php:`MongoDB\\Driver\\WriteConcern ` - .. include:: /includes/extracts/collection-option-writeConcern.rst - It is not possible to specify a :manual:`write concern - ` for individual operations as part of a - transaction. Instead, set the ``writeConcern`` option when starting the - transaction with :php:`startTransaction `. + .. include:: /includes/extracts/common-option-writeConcern-transaction.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-updateOne.txt b/docs/reference/method/MongoDBCollection-updateOne.txt index 5f3d7d187..2a981cb2b 100644 --- a/docs/reference/method/MongoDBCollection-updateOne.txt +++ b/docs/reference/method/MongoDBCollection-updateOne.txt @@ -71,8 +71,7 @@ Parameters - mixed - .. include:: /includes/extracts/common-option-comment.rst - This is not supported for server versions prior to 4.4 and will result in an - exception at execution time if used. + .. include:: /includes/extracts/option-requires-4.4.rst .. versionadded:: 1.13 @@ -80,8 +79,7 @@ Parameters - string|array|object - .. include:: /includes/extracts/common-option-hint.rst - This option is available in MongoDB 4.2+ and will result in an exception at - execution time if specified for an older server version. + .. include:: /includes/extracts/option-requires-4.2.rst .. versionadded:: 1.6 @@ -107,10 +105,7 @@ Parameters - :php:`MongoDB\\Driver\\WriteConcern ` - .. include:: /includes/extracts/collection-option-writeConcern.rst - It is not possible to specify a :manual:`write concern - ` for individual operations as part of a - transaction. Instead, set the ``writeConcern`` option when starting the - transaction with :php:`startTransaction `. + .. include:: /includes/extracts/common-option-writeConcern-transaction.rst Return Values ------------- diff --git a/docs/reference/method/MongoDBCollection-watch.txt b/docs/reference/method/MongoDBCollection-watch.txt index d71aa3e29..c54123bd3 100644 --- a/docs/reference/method/MongoDBCollection-watch.txt +++ b/docs/reference/method/MongoDBCollection-watch.txt @@ -60,8 +60,7 @@ Parameters - mixed - .. include:: /includes/extracts/common-option-comment.rst - The comment can be any valid BSON type for server versions 4.4 and above. - Earlier server versions only support string values. + .. include:: /includes/extracts/common-option-comment-string-before-4.4.rst .. versionadded:: 1.13 diff --git a/docs/reference/method/MongoDBDatabase-createCollection.txt b/docs/reference/method/MongoDBDatabase-createCollection.txt index 2fe421b4e..2351f5d37 100644 --- a/docs/reference/method/MongoDBDatabase-createCollection.txt +++ b/docs/reference/method/MongoDBDatabase-createCollection.txt @@ -85,8 +85,7 @@ Parameters See the :manual:`create ` command documentation for more information. - This option is available in MongoDB 6.0+ and will result in an - exception at execution time if specified for an older server version. + .. include:: /includes/extracts/option-requires-6.0.rst .. versionadded:: 1.13 @@ -97,8 +96,7 @@ Parameters :manual:`create ` command documentation for more information. - This option is available in MongoDB 5.3+ and will result in an - exception at execution time if specified for an older server version. + .. include:: /includes/extracts/option-requires-5.3.rst .. versionadded:: 1.13 @@ -110,8 +108,7 @@ Parameters - mixed - .. include:: /includes/extracts/common-option-comment.rst - This is not supported for server versions prior to 4.4 and will result - in an exception at execution time if used. + .. include:: /includes/extracts/option-requires-4.4.rst .. versionadded:: 1.13 @@ -123,8 +120,7 @@ Parameters `Field Encryption and Queryability `_ in the MongoDB manual for more information. - This option is available in MongoDB 7.0+ and will result in an - exception at execution time if specified for an older server version. + .. include:: /includes/extracts/option-requires-7.0.rst .. versionadded:: 1.13 @@ -134,8 +130,7 @@ Parameters the :manual:`create ` command documentation for more information. - This option is available in MongoDB 5.0+ and will result in an - exception at execution time if specified for an older server version. + .. include:: /includes/extracts/option-requires-5.0.rst .. versionadded:: 1.9 @@ -234,8 +229,7 @@ Parameters the :manual:`create ` command documentation for supported options. - This option is available in MongoDB 5.0+ and will result in an - exception at execution time if specified for an older server version. + .. include:: /includes/extracts/option-requires-5.0.rst .. versionadded:: 1.9 diff --git a/docs/reference/method/MongoDBDatabase-drop.txt b/docs/reference/method/MongoDBDatabase-drop.txt index 9e4ab7992..457fad1ae 100644 --- a/docs/reference/method/MongoDBDatabase-drop.txt +++ b/docs/reference/method/MongoDBDatabase-drop.txt @@ -39,8 +39,7 @@ Parameters - mixed - .. include:: /includes/extracts/common-option-comment.rst - This is not supported for server versions prior to 4.4 and will result - in an exception at execution time if used. + .. include:: /includes/extracts/option-requires-4.4.rst .. versionadded:: 1.13 diff --git a/docs/reference/method/MongoDBDatabase-dropCollection.txt b/docs/reference/method/MongoDBDatabase-dropCollection.txt index fe3cd6890..018f3ccaf 100644 --- a/docs/reference/method/MongoDBDatabase-dropCollection.txt +++ b/docs/reference/method/MongoDBDatabase-dropCollection.txt @@ -45,8 +45,7 @@ Parameters - mixed - .. include:: /includes/extracts/common-option-comment.rst - This is not supported for server versions prior to 4.4 and will result - in an exception at execution time if used. + .. include:: /includes/extracts/option-requires-4.4.rst .. versionadded:: 1.13 diff --git a/docs/reference/method/MongoDBDatabase-listCollectionNames.txt b/docs/reference/method/MongoDBDatabase-listCollectionNames.txt index 14bb4c352..53814f729 100644 --- a/docs/reference/method/MongoDBDatabase-listCollectionNames.txt +++ b/docs/reference/method/MongoDBDatabase-listCollectionNames.txt @@ -52,8 +52,7 @@ Parameters - mixed - .. include:: /includes/extracts/common-option-comment.rst - This is not supported for server versions prior to 4.4 and will result - in an exception at execution time if used. + .. include:: /includes/extracts/option-requires-4.4.rst .. versionadded:: 1.13 diff --git a/docs/reference/method/MongoDBDatabase-listCollections.txt b/docs/reference/method/MongoDBDatabase-listCollections.txt index ebb3d717d..d66b6a5f3 100644 --- a/docs/reference/method/MongoDBDatabase-listCollections.txt +++ b/docs/reference/method/MongoDBDatabase-listCollections.txt @@ -50,8 +50,7 @@ Parameters - mixed - .. include:: /includes/extracts/common-option-comment.rst - This is not supported for server versions prior to 4.4 and will result - in an exception at execution time if used. + .. include:: /includes/extracts/option-requires-4.4.rst .. versionadded:: 1.13 diff --git a/docs/reference/method/MongoDBDatabase-modifyCollection.txt b/docs/reference/method/MongoDBDatabase-modifyCollection.txt index fec9144e1..0a756b015 100644 --- a/docs/reference/method/MongoDBDatabase-modifyCollection.txt +++ b/docs/reference/method/MongoDBDatabase-modifyCollection.txt @@ -52,8 +52,7 @@ Parameters - mixed - .. include:: /includes/extracts/common-option-comment.rst - This is not supported for server versions prior to 4.4 and will result - in an exception at execution time if used. + .. include:: /includes/extracts/option-requires-4.4.rst .. versionadded:: 1.13 diff --git a/docs/reference/method/MongoDBDatabase-renameCollection.txt b/docs/reference/method/MongoDBDatabase-renameCollection.txt index 80b6be83e..778dc10ad 100644 --- a/docs/reference/method/MongoDBDatabase-renameCollection.txt +++ b/docs/reference/method/MongoDBDatabase-renameCollection.txt @@ -58,8 +58,7 @@ Parameters - mixed - .. include:: /includes/extracts/common-option-comment.rst - This is not supported for server versions prior to 4.4 and will result - in an exception at execution time if used. + .. include:: /includes/extracts/option-requires-4.4.rst .. versionadded:: 1.13 diff --git a/docs/reference/method/MongoDBDatabase-watch.txt b/docs/reference/method/MongoDBDatabase-watch.txt index 8185956a1..c79656ecb 100644 --- a/docs/reference/method/MongoDBDatabase-watch.txt +++ b/docs/reference/method/MongoDBDatabase-watch.txt @@ -56,8 +56,7 @@ Parameters - mixed - .. include:: /includes/extracts/common-option-comment.rst - The comment can be any valid BSON type for server versions 4.4 and above. - Earlier server versions only support string values. + .. include:: /includes/extracts/common-option-comment-string-before-4.4.rst .. versionadded:: 1.13 diff --git a/docs/reference/method/MongoDBGridFSBucket-find.txt b/docs/reference/method/MongoDBGridFSBucket-find.txt index 937a91398..d112dd668 100644 --- a/docs/reference/method/MongoDBGridFSBucket-find.txt +++ b/docs/reference/method/MongoDBGridFSBucket-find.txt @@ -69,8 +69,7 @@ Parameters - mixed - .. include:: /includes/extracts/common-option-comment.rst - The comment can be any valid BSON type for server versions 4.4 and above. - Earlier server versions only support string values. + .. include:: /includes/extracts/common-option-comment-string-before-4.4.rst * - cursorType - integer @@ -175,10 +174,7 @@ Parameters - :php:`MongoDB\\Driver\\ReadConcern ` - .. include:: /includes/extracts/bucket-option-readConcern.rst - It is not possible to specify a :manual:`read concern - ` for individual operations as part of a - transaction. Instead, set the ``readConcern`` option when starting the - transaction with :php:`startTransaction `. + .. include:: /includes/extracts/common-option-readConcern-transaction.rst * - readPreference - :php:`MongoDB\\Driver\\ReadPreference ` diff --git a/docs/reference/method/MongoDBGridFSBucket-findOne.txt b/docs/reference/method/MongoDBGridFSBucket-findOne.txt index df6ecdbd6..1ff9f2588 100644 --- a/docs/reference/method/MongoDBGridFSBucket-findOne.txt +++ b/docs/reference/method/MongoDBGridFSBucket-findOne.txt @@ -61,8 +61,7 @@ Parameters - mixed - .. include:: /includes/extracts/common-option-comment.rst - The comment can be any valid BSON type for server versions 4.4 and above. - Earlier server versions only support string values. + .. include:: /includes/extracts/common-option-comment-string-before-4.4.rst * - hint - string|array|object @@ -133,10 +132,7 @@ Parameters - :php:`MongoDB\\Driver\\ReadConcern ` - .. include:: /includes/extracts/bucket-option-readConcern.rst - It is not possible to specify a :manual:`read concern - ` for individual operations as part of a - transaction. Instead, set the ``readConcern`` option when starting the - transaction with :php:`startTransaction `. + .. include:: /includes/extracts/common-option-readConcern-transaction.rst * - readPreference - :php:`MongoDB\\Driver\\ReadPreference ` From 607a9f436d17b143eb6c690b83be54b73e2ea0c8 Mon Sep 17 00:00:00 2001 From: Jeremy Mikola Date: Tue, 12 Dec 2023 13:25:50 -0500 Subject: [PATCH 18/18] Move Atlas Search requirement note to Definition section --- .../method/MongoDBCollection-createSearchIndex.txt | 2 -- .../method/MongoDBCollection-createSearchIndexes.txt | 3 ++- .../reference/method/MongoDBCollection-dropSearchIndex.txt | 7 ++----- .../method/MongoDBCollection-listSearchIndexes.txt | 7 ++----- .../method/MongoDBCollection-updateSearchIndex.txt | 3 ++- 5 files changed, 8 insertions(+), 14 deletions(-) diff --git a/docs/reference/method/MongoDBCollection-createSearchIndex.txt b/docs/reference/method/MongoDBCollection-createSearchIndex.txt index 53590de9c..df9474635 100644 --- a/docs/reference/method/MongoDBCollection-createSearchIndex.txt +++ b/docs/reference/method/MongoDBCollection-createSearchIndex.txt @@ -27,7 +27,6 @@ Definition ): string .. include:: /includes/extracts/note-atlas-search-requirement.rst - .. include:: /includes/extracts/note-atlas-search-async.rst Parameters ---------- @@ -73,7 +72,6 @@ Errors/Exceptions Behavior -------- -.. include:: /includes/extracts/note-atlas-search-requirement.rst .. include:: /includes/extracts/note-atlas-search-async.rst Examples diff --git a/docs/reference/method/MongoDBCollection-createSearchIndexes.txt b/docs/reference/method/MongoDBCollection-createSearchIndexes.txt index 9abc68295..584d94b38 100644 --- a/docs/reference/method/MongoDBCollection-createSearchIndexes.txt +++ b/docs/reference/method/MongoDBCollection-createSearchIndexes.txt @@ -26,6 +26,8 @@ Definition array $options = [] ): string + .. include:: /includes/extracts/note-atlas-search-requirement.rst + Parameters ---------- @@ -70,7 +72,6 @@ Errors/Exceptions Behavior -------- -.. include:: /includes/extracts/note-atlas-search-requirement.rst .. include:: /includes/extracts/note-atlas-search-async.rst Examples diff --git a/docs/reference/method/MongoDBCollection-dropSearchIndex.txt b/docs/reference/method/MongoDBCollection-dropSearchIndex.txt index b0ff46afd..f34992739 100644 --- a/docs/reference/method/MongoDBCollection-dropSearchIndex.txt +++ b/docs/reference/method/MongoDBCollection-dropSearchIndex.txt @@ -23,6 +23,8 @@ Definition function dropSearchIndex(string $name, array $options = []): void + .. include:: /includes/extracts/note-atlas-search-requirement.rst + Parameters ---------- @@ -51,11 +53,6 @@ Errors/Exceptions .. include:: /includes/extracts/error-invalidargumentexception.rst .. include:: /includes/extracts/error-driver-runtimeexception.rst -Behavior --------- - -.. include:: /includes/extracts/note-atlas-search-requirement.rst - See Also -------- diff --git a/docs/reference/method/MongoDBCollection-listSearchIndexes.txt b/docs/reference/method/MongoDBCollection-listSearchIndexes.txt index 414848a0c..e8db9521c 100644 --- a/docs/reference/method/MongoDBCollection-listSearchIndexes.txt +++ b/docs/reference/method/MongoDBCollection-listSearchIndexes.txt @@ -23,6 +23,8 @@ Definition function listSearchIndexes(array $options = []): Countable&Iterator + .. include:: /includes/extracts/note-atlas-search-requirement.rst + Parameters ---------- @@ -102,11 +104,6 @@ Errors/Exceptions .. include:: /includes/extracts/error-invalidargumentexception.rst .. include:: /includes/extracts/error-driver-runtimeexception.rst -Behavior --------- - -.. include:: /includes/extracts/note-atlas-search-requirement.rst - See Also -------- diff --git a/docs/reference/method/MongoDBCollection-updateSearchIndex.txt b/docs/reference/method/MongoDBCollection-updateSearchIndex.txt index e50530759..bf1659107 100644 --- a/docs/reference/method/MongoDBCollection-updateSearchIndex.txt +++ b/docs/reference/method/MongoDBCollection-updateSearchIndex.txt @@ -27,6 +27,8 @@ Definition array $options = [] ): void + .. include:: /includes/extracts/note-atlas-search-requirement.rst + Parameters ---------- @@ -64,7 +66,6 @@ Errors/Exceptions Behavior -------- -.. include:: /includes/extracts/note-atlas-search-requirement.rst .. include:: /includes/extracts/note-atlas-search-async.rst See Also