first commit -> move some files from one-api

This commit is contained in:
2026-05-06 13:37:10 +07:00
parent a3144382c5
commit 55c6ed9779
7940 changed files with 628870 additions and 0 deletions

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

View File

@@ -0,0 +1,115 @@
arg_name: option
name: typeMap
type: array
description: |
Default :php:`type map
<manual/en/mongodb.persistence.deserialization.php#mongodb.persistence.typemaps>`
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 <https://en.wikipedia.org/wiki/Man-in-the-middle_attack>`_.
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.
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.
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.
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.
interface: phpmethod
operation: ~
optional: true
---
arg_name: option
name: context
type: resource
description: |
:php:`SSL context options <manual/en/context.ssl.php>` 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
...

View File

@@ -0,0 +1,51 @@
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
</reference/connection-string>` 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 <http://www.faqs.org/rfcs/rfc3986.html>`_. 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() <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 <http://www.faqs.org/rfcs/rfc3986.html>`_.
Refer to the :php:`MongoDB\\Driver\\Manager::__construct()
<mongodb-driver-manager.construct>` extension reference and :manual:`MongoDB
connection string </reference/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 <mongodb-driver-manager>`, the
|php-library| allows you to specify a default :php:`type map
<manual/en/mongodb.persistence.deserialization.php#mongodb.persistence.typemaps>`
to apply to the cursors it creates.
interface: phpmethod
operation: ~
optional: true
...

View File

@@ -0,0 +1,19 @@
source:
file: apiargs-common-option.yaml
ref: typeMap
post: |
This will be used for the returned command result document.
---
arg_name: option
name: writeConcern
type: :php:`MongoDB\\Driver\\WriteConcern <class.mongodb-driver-writeconcern>`
description: |
:manual:`Write concern </reference/write-concern>` to use for the operation.
Defaults to the client's write concern.
This is not supported for server versions prior to 3.4 and will result in an
exception at execution time if used.
interface: phpmethod
operation: ~
optional: true
...

View File

@@ -0,0 +1,10 @@
source:
file: apiargs-common-param.yaml
ref: $databaseName
replacement:
action: " to drop"
---
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,6 @@
source:
file: apiargs-common-param.yaml
ref: $databaseName
replacement:
action: " to select"
...

View File

@@ -0,0 +1,4 @@
source:
file: apiargs-common-option.yaml
ref: maxTimeMS
...

View File

@@ -0,0 +1,4 @@
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,27 @@
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"
...

View File

@@ -0,0 +1,16 @@
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
...

View File

@@ -0,0 +1,27 @@
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"
...

View File

@@ -0,0 +1,10 @@
source:
file: apiargs-common-param.yaml
ref: $databaseName
replacement:
action: " to select"
---
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,85 @@
arg_name: option
name: bypassDocumentValidation
type: boolean
description: |
If ``true``, allows the write operation to circumvent document level
validation. Defaults to ``false``.
This option is available in MongoDB 3.2+ and is ignored for older server
versions, which do not support document level validation.
interface: phpmethod
operation: ~
optional: true
---
arg_name: option
name: collation
type: array|object
description: |
:manual:`Collation </reference/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
</reference/collation/#collation-document>`.
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.
This option is available in MongoDB 3.4+ and will result in an exception at
execution time if specified for an older server version.
interface: phpmethod
operation: ~
optional: true
---
arg_name: option
name: readConcern
type: :php:`MongoDB\\Driver\\ReadConcern <class.mongodb-driver-readconcern>`
description: |
:manual:`Read concern </reference/read-concern>` to use for the operation.
Defaults to the collection's read concern.
This is not supported for server versions prior to 3.2 and will result in an
exception at execution time if used.
interface: phpmethod
operation: ~
optional: true
---
arg_name: option
name: readPreference
type: :php:`MongoDB\\Driver\\ReadPreference <class.mongodb-driver-readpreference>`
description: |
:manual:`Read preference </reference/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 <class.mongodb-driver-writeconcern>`
description: |
:manual:`Write concern </reference/write-concern>` to use for the operation.
Defaults to the collection's write concern.
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
...

View File

@@ -0,0 +1,31 @@
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
</reference/operator/update>`.
interface: phpmethod
operation: ~
optional: false
...

View File

@@ -0,0 +1,77 @@
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. The
default is ``false``.
interface: phpmethod
operation: ~
optional: true
---
arg_name: option
name: batchSize
type: integer
description: |
Specifies the initial batch size for the cursor. A batchSize of ``0`` means an
empty first batch and is useful for quickly returning a cursor or failure
message without doing significant server-side work.
.. note::
This is not supported for inline aggregation results (i.e. ``useCursor``
option is ``false`` or the server version is < 2.6).
interface: phpmethod
operation: ~
optional: true
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: bypassDocumentValidation
post: |
This only applies when using the :ref:`$out <agg-out>` stage.
Document validation requires MongoDB 3.2 or later: if you are using an earlier
version of MongoDB, this option will be ignored.
---
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-MongoDBCollection-common-option.yaml
ref: typeMap
---
arg_name: option
name: useCursor
type: boolean
description: |
Indicates whether the command will request that the server provide results
using a cursor. The default is ``true``.
For MongoDB version 2.6 or later, ``useCursor`` allows users to turn off
cursors if necessary to aid in replica set or shard cluster upgrades.
``useCursor`` is ignored for MongoDB versions prior to 2.6 as aggregation
cursors are not available.
interface: phpmethod
operation: ~
optional: true
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: writeConcern
post: |
This only applies when the :ref:`$out <agg-out>` stage is specified.
This is not supported for server versions prior to 3.4 and will result in an
exception at execution time if used.
...

View File

@@ -0,0 +1,14 @@
arg_name: param
name: $pipeline
type: array
description: |
Specifies an :manual:`aggregation pipeline </core/aggregation-pipeline>`
operation.
interface: phpmethod
operation: ~
optional: false
---
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,23 @@
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: bypassDocumentValidation
---
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-MongoDBCollection-common-option.yaml
ref: writeConcern
...

View File

@@ -0,0 +1,37 @@
arg_name: param
name: $operations
type: array
description: |
An array containing the write operations to perform.
:phpmethod:`MongoDB\\Collection::bulkWrite()` supports
:phpmethod:`deleteMany() <MongoDB\\Collection::deleteMany>`,
:phpmethod:`deleteOne() <MongoDB\\Collection::deleteOne>`,
:phpmethod:`insertOne() <MongoDB\\Collection::insertOne>`,
:phpmethod:`replaceOne() <MongoDB\\Collection::replaceOne>`,
:phpmethod:`updateMany() <MongoDB\\Collection::updateMany>`, and
:phpmethod:`updateOne() <MongoDB\\Collection::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
...

View File

@@ -0,0 +1,25 @@
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"
...

View File

@@ -0,0 +1,16 @@
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
...

View File

@@ -0,0 +1,49 @@
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: collation
---
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
---
arg_name: option
name: skip
type: integer
description: |
The number of matching documents to skip before returning results.
interface: phpmethod
operation: ~
optional: true
...

View File

@@ -0,0 +1,11 @@
source:
file: apiargs-MongoDBCollection-common-param.yaml
ref: $filter
optional: true
replacement:
action: " to count"
---
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,84 @@
arg_name: option
name: unique
type: boolean
description: |
Creates a :manual:`unique </core/index-unique>` index.
interface: phpmethod
operation: ~
optional: true
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: collation
pre: |
Specifies the :manual:`collation
</reference/bson-type-comparison-order/#collation>` for the index.
---
arg_name: option
name: partialFilterExpression
type: array|object
description: |
Creates a :manual:`partial </core/index-partial>` index.
interface: phpmethod
operation: ~
optional: true
---
arg_name: option
name: sparse
type: boolean
description: |
Creates a :manual:`sparse </core/index-sparse>` index.
interface: phpmethod
operation: ~
optional: true
---
arg_name: option
name: expireAfterSeconds
type: integer
description: |
Creates a :manual:`TTL </core/index-ttl>` index.
interface: phpmethod
operation: ~
optional: true
---
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
</core/index-creation>` process.
interface: phpmethod
operation: ~
optional: true
---
arg_name: option
name: 2dsphereIndexVersion
type: integer
description: |
Specifies the :manual:`version of a 2dsphere </core/2dsphere>` index to
create.
MongoDB 2.6 introduced version 2 of 2dsphere indexes. Version 2 is the default
version of 2dsphere indexes created in MongoDB 2.6 and later versions.
``2dsphereIndexVersion`` enables you to override the default version 2.
interface: phpmethod
operation: ~
optional: true
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: writeConcern
post: |
This is not supported for server versions prior to 3.4 and will result in an
exception at execution time if used.
...

View File

@@ -0,0 +1,20 @@
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
...

View File

@@ -0,0 +1,7 @@
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: writeConcern
post: |
This is not supported for server versions prior to 3.4 and will result in an
exception at execution time if used.
...

View File

@@ -0,0 +1,23 @@
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
...

View File

@@ -0,0 +1,8 @@
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: collation
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: writeConcern
...

View File

@@ -0,0 +1,11 @@
source:
file: apiargs-MongoDBCollection-common-param.yaml
ref: $filter
optional: false
replacement:
action: " to delete"
---
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,8 @@
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: collation
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: writeConcern
...

View File

@@ -0,0 +1,11 @@
source:
file: apiargs-MongoDBCollection-common-param.yaml
ref: $filter
optional: false
replacement:
action: " to delete"
---
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,16 @@
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: collation
---
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
...

View File

@@ -0,0 +1,20 @@
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
...

View File

@@ -0,0 +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-MongoDBCollection-common-option.yaml
ref: writeConcern
post: |
This is not supported for server versions prior to 3.4 and will result in an
exception at execution time if used.
...

View File

@@ -0,0 +1,4 @@
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +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-MongoDBCollection-common-option.yaml
ref: writeConcern
post: |
This is not supported for server versions prior to 3.4 and will result in an
exception at execution time if used.
...

View File

@@ -0,0 +1,15 @@
arg_name: param
name: $indexName
type: string
description: |
The name of the index to drop. View the existing indexes on the collection
using the :phpmethod:`listIndexes() <MongoDB\\Collection::listIndexes>`
method.
interface: phpmethod
operation: ~
optional: false
---
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +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-MongoDBCollection-common-option.yaml
ref: writeConcern
post: |
This is not supported for server versions prior to 3.4 and will result in an
exception at execution time if used.
...

View File

@@ -0,0 +1,4 @@
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,247 @@
arg_name: option
name: projection
type: array|object
description: |
The :ref:`projection specification <projections>` to determine which fields to
include in the returned documents. See :manual:`Project Fields to Return from
Query </tutorial/project-fields-from-query-results>` and
:manual:`Projection Operators </reference/operator/projection>` 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: 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
---
arg_name: option
name: comment
type: string
description: |
A comment to attach to the query to help interpret and trace query
:dbcommand:`profile` data.
interface: phpmethod
operation: ~
optional: true
---
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
---
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.
.. versionadded:: 1.2
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. 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
---
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.
.. 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: <timestamp> } }
The :php:`MongoDB\\BSON\\Timestamp <class.mongodb-bson-timestamp>` class
reference describes how to represent MongoDB's BSON timestamp type with PHP.
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.
.. 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 </reference/operator/query-modifier>` 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
...

View File

@@ -0,0 +1,11 @@
source:
file: apiargs-MongoDBCollection-common-param.yaml
ref: $filter
optional: true
replacement:
action: " to query"
---
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,66 @@
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-common-option.yaml
ref: collation
---
source:
file: apiargs-MongoDBCollection-method-find-option.yaml
ref: comment
---
source:
file: apiargs-MongoDBCollection-method-find-option.yaml
ref: hint
---
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-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
...

View File

@@ -0,0 +1,11 @@
source:
file: apiargs-MongoDBCollection-common-param.yaml
ref: $filter
optional: true
replacement:
action: " to query"
---
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,29 @@
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: maxTimeMS
---
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
post: |
This is not supported for server versions prior to 3.2 and will result in an
exception at execution time if used.
...

View File

@@ -0,0 +1,11 @@
source:
file: apiargs-MongoDBCollection-common-param.yaml
ref: $filter
optional: false
replacement:
action: " to delete"
---
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,50 @@
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: maxTimeMS
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: bypassDocumentValidation
---
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-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
post: |
This is not supported for server versions prior to 3.2 and will result in an
exception at execution time if used.
...

View File

@@ -0,0 +1,15 @@
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
...

View File

@@ -0,0 +1,50 @@
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: maxTimeMS
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: bypassDocumentValidation
---
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-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
post: |
This is not supported for server versions prior to 3.2 and will result in an
exception at execution time if used.
...

View File

@@ -0,0 +1,15 @@
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
...

View File

@@ -0,0 +1,12 @@
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: bypassDocumentValidation
---
source:
file: apiargs-MongoDBCollection-method-bulkWrite-option.yaml
ref: ordered
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: writeConcern
...

View File

@@ -0,0 +1,13 @@
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
...

View File

@@ -0,0 +1,8 @@
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: bypassDocumentValidation
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: writeConcern
...

View File

@@ -0,0 +1,13 @@
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
...

View File

@@ -0,0 +1,4 @@
source:
file: apiargs-common-option.yaml
ref: maxTimeMS
...

View File

@@ -0,0 +1,4 @@
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,90 @@
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: bypassDocumentValidation
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: collation
---
arg_name: option
name: finalize
type: :php:`MongoDB\\BSON\\Javascript <class.mongodb-bson-javascript>`
description: |
Follows the reduce method and modifies the output.
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. The default is ``false``.
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: document
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
---
arg_name: option
name: scope
type: document
description: |
Specifies global variables that are accessible in the map, reduce, and finalize
functions.
interface: phpmethod
operation: ~
optional: true
---
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.
The default is ``true``.
interface: phpmethod
operation: ~
optional: true
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: writeConcern
...

View File

@@ -0,0 +1,36 @@
arg_name: param
name: $map
type: :php:`MongoDB\\BSON\\Javascript <mongodb-bson-javascript>`
description: |
A JavaScript function that associates or "maps" a value with a key and emits
the key and value pair.
interface: phpmethod
operation: ~
optional: false
---
arg_name: param
name: $reduce
type: :php:`MongoDB\\BSON\\Javascript <class.mongodb-bson-javascript>`
description: |
A JavaScript function that "reduces" to a single object all the values
associated with a particular key.
interface: phpmethod
operation: ~
optional: false
---
arg_name: param
name: $out
type: string|document
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
...

View File

@@ -0,0 +1,16 @@
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-MongoDBCollection-common-option.yaml
ref: writeConcern
...

View File

@@ -0,0 +1,15 @@
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
...

View File

@@ -0,0 +1,16 @@
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-MongoDBCollection-common-option.yaml
ref: writeConcern
...

View File

@@ -0,0 +1,15 @@
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
...

View File

@@ -0,0 +1,16 @@
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-MongoDBCollection-common-option.yaml
ref: writeConcern
...

View File

@@ -0,0 +1,15 @@
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
...

View File

@@ -0,0 +1,27 @@
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"
...

View File

@@ -0,0 +1,4 @@
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,16 @@
source:
file: apiargs-common-option.yaml
ref: typeMap
replacement:
parent: "database"
---
arg_name: option
name: writeConcern
type: :php:`MongoDB\\Driver\\WriteConcern <class.mongodb-driver-writeconcern>`
description: |
:manual:`Write concern </reference/write-concern>` to use for the operation.
Defaults to the database's write concern.
interface: phpmethod
operation: ~
optional: true
...

View File

@@ -0,0 +1,11 @@
source:
file: apiargs-common-option.yaml
ref: readPreference
description: |
:manual:`Read preference </reference/read-preference>` to use for the
operation. Defaults to the database's read preference.
---
source:
file: apiargs-MongoDBDatabase-common-option.yaml
ref: typeMap
...

View File

@@ -0,0 +1,13 @@
arg_name: param
name: $command
type: array|object
description: |
The :manual:`database command </reference/command>` document.
interface: phpmethod
operation: ~
optional: false
---
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,25 @@
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"
...

View File

@@ -0,0 +1,12 @@
source:
file: apiargs-common-param.yaml
ref: $manager
---
source:
file: apiargs-common-param.yaml
ref: $databaseName
---
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,230 @@
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:: 3.2. The ``autoIndexId`` option will be removed in MongoDB 3.4.
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
---
source:
file: apiargs-MongoDBCollection-common-option.yaml
ref: collation
pre: |
Specifies the :manual:`collation
</reference/bson-type-comparison-order/#collation>` for the collection.
---
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 <language.operators.bitwise>` 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 </reference/command/collMod>` and
:manual:`db.createCollection()
</reference/method/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::
{ <storage-engine-name>: <options> }
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: 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::
{ <storage-engine-name>: <options> }
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
---
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
description: |
Allows users to specify :manual:`validation rules or expressions
</core/document-validation>` for the collection. For more information, see
:manual:`Document Validation </core/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 </reference/operator/query>` 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
---
source:
file: apiargs-MongoDBDatabase-common-option.yaml
ref: writeConcern
post: |
This is not supported for server versions prior to 3.4 and will result in an
exception at execution time if used.
...

View File

@@ -0,0 +1,10 @@
source:
file: apiargs-common-param.yaml
ref: $collectionName
replacement:
action: " to create"
---
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,13 @@
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
post: |
This is not supported for server versions prior to 3.4 and will result in an
exception at execution time if used.
...

View File

@@ -0,0 +1,4 @@
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,13 @@
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
post: |
This is not supported for server versions prior to 3.4 and will result in an
exception at execution time if used.
...

View File

@@ -0,0 +1,10 @@
source:
file: apiargs-common-param.yaml
ref: $collectionName
replacement:
action: " to drop"
---
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,6 @@
source:
file: apiargs-common-param.yaml
ref: $collectionName
replacement:
action: " to select"
...

View File

@@ -0,0 +1,15 @@
arg_name: option
name: filter
type: array|object
description: |
A query expression to filter the list of collections.
You can specify a query expression on the collection ``name`` and ``options``.
interface: phpmethod
operation: ~
optional: true
---
source:
file: apiargs-common-option.yaml
ref: maxTimeMS
...

View File

@@ -0,0 +1,4 @@
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,27 @@
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"
...

View File

@@ -0,0 +1,10 @@
source:
file: apiargs-common-param.yaml
ref: $collectionName
replacement:
action: " to select"
---
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,46 @@
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-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"
...

View File

@@ -0,0 +1,4 @@
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,27 @@
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"
...

View File

@@ -0,0 +1,4 @@
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,50 @@
arg_name: option
name: _id
type: mixed
description: |
Value to use as the file document identifier. Defaults to a new
:php:`MongoDB\\BSON\\ObjectId <class.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: 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
...

View File

@@ -0,0 +1,39 @@
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
...

View File

@@ -0,0 +1,44 @@
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-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"
...

View File

@@ -0,0 +1,12 @@
source:
file: apiargs-common-param.yaml
ref: $manager
---
source:
file: apiargs-common-param.yaml
ref: $databaseName
---
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,6 @@
source:
file: apiargs-MongoDBGridFSBucket-common-param.yaml
ref: $id
replacement:
resource: " to delete"
...

View File

@@ -0,0 +1,10 @@
source:
file: apiargs-MongoDBGridFSBucket-common-param.yaml
ref: $id
replacement:
resource: " to download"
---
source:
file: apiargs-MongoDBGridFSBucket-common-param.yaml
ref: $destination
...

View File

@@ -0,0 +1,4 @@
source:
file: apiargs-MongoDBGridFSBucket-common-option.yaml
ref: revision
...

View File

@@ -0,0 +1,14 @@
source:
file: apiargs-MongoDBGridFSBucket-common-param.yaml
ref: $filename
replacement:
resource: " to download"
---
source:
file: apiargs-MongoDBGridFSBucket-common-param.yaml
ref: $destination
---
source:
file: apiargs-common-param.yaml
ref: $options
...

View File

@@ -0,0 +1,72 @@
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: 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 </reference/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 </reference/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
...

View File

@@ -0,0 +1,42 @@
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-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
...

View File

@@ -0,0 +1,4 @@
source:
file: apiargs-MongoDBGridFSBucket-common-param.yaml
ref: $stream
...

View File

@@ -0,0 +1,4 @@
source:
file: apiargs-MongoDBGridFSBucket-common-param.yaml
ref: $stream
...

View File

@@ -0,0 +1,6 @@
source:
file: apiargs-MongoDBGridFSBucket-common-param.yaml
ref: $id
replacement:
resource: " to download"
...

View File

@@ -0,0 +1,4 @@
source:
file: apiargs-MongoDBGridFSBucket-common-option.yaml
ref: revision
...

View File

@@ -0,0 +1,10 @@
source:
file: apiargs-MongoDBGridFSBucket-common-param.yaml
ref: $filename
replacement:
resource: " to download"
---
source:
file: apiargs-common-param.yaml
ref: $options
...

Some files were not shown because too many files have changed in this diff Show More