Skip to content

Commit 1c75951

Browse files
schmallisojmikola
authored andcommitted
Port docs to RST and split the API reference
1 parent 14c8439 commit 1c75951

File tree

133 files changed

+7609
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

133 files changed

+7609
-0
lines changed

source/.static/.mongodb

Whitespace-only changes.
File renamed without changes.
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
arg_name: param
2+
name: $uri
3+
type: string
4+
description: |
5+
The URI of the standalone, replica set, or sharded cluster to which to connect. Refer
6+
to the :manual:`MongoDB connection string reference </reference/connection-string>`
7+
for formatting.
8+
9+
Defaults to ``mongodb://localhost:27017`` if unspecified.
10+
interface: phpmethod
11+
operation: MongoDB\\Client::__construct
12+
optional: true
13+
position: 1
14+
---
15+
arg_name: param
16+
name: $uriOptions
17+
type: array
18+
description: |
19+
Specifies additional URI options, such as authentication credentials
20+
or query string parameters. The options specified in ``$uriOptions``
21+
take precedence over any analogous options present in the
22+
``$uri`` string.
23+
post: |
24+
Refer to the :php:`MongoDB\\Driver\\Manager::__construct()
25+
<mongodb-driver-manager.construct>` extension reference and
26+
:manual:`MongoDB connection string </reference/connection-string>`
27+
documentation for valid options.
28+
interface: phpmethod
29+
operation: MongoDB\\Client::__construct
30+
optional: true
31+
position: 2
32+
---
33+
arg_name: param
34+
name: $driverOptions
35+
type: array
36+
description: |
37+
Specify driver-specific options. In addition to any
38+
options supported by the :php:`extension <mongodb-driver-manager>`,
39+
the |php-library| allows you to specify a default ``typeMap`` to
40+
apply to the cursors it creates. Refer to the driver's
41+
:php:`Persistence documentation <mongodb-persistence>` for more
42+
about type maps.
43+
interface: phpmethod
44+
operation: MongoDB\\Client::__construct
45+
optional: true
46+
position: 3
47+
...
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
arg_name: option
2+
interface: phpmethod
3+
operation: MongoDB\\Client::dropDatabase
4+
source:
5+
file: apiargs-common-option.yaml
6+
ref: typeMap
7+
position: 1
8+
...
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
source:
2+
ref: $databaseName
3+
file: apiargs-common-param.yaml
4+
arg_name: param
5+
interface: phpmethod
6+
operation: MongoDB\\Client::dropDatabase
7+
---
8+
source:
9+
ref: $options
10+
file: apiargs-common-param.yaml
11+
arg_name: param
12+
interface: phpmethod
13+
operation: MongoDB\\Client::dropDatabase
14+
position: 2
15+
...
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
source:
2+
ref: $databaseName
3+
file: apiargs-common-param.yaml
4+
arg_name: param
5+
interface: phpmethod
6+
operation: MongoDB\\Client::__get
7+
...
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
source:
2+
file: apiargs-common-option.yaml
3+
ref: maxTimeMS
4+
position: 1
5+
...
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
source:
2+
ref: $options
3+
file: apiargs-common-param.yaml
4+
arg_name: param
5+
interface: phpmethod
6+
operation: MongoDB\\Client::listDatabases
7+
position: 1
8+
...
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
source:
2+
ref: readConcern
3+
file: apiargs-common-option.yaml
4+
operation: MongoDB\\Client::selectDatabase
5+
replacement:
6+
resource: "database"
7+
---
8+
source:
9+
ref: readPreference
10+
file: apiargs-common-option.yaml
11+
operation: MongoDB\\Client::selectDatabase
12+
replacement:
13+
resource: "database"
14+
---
15+
source:
16+
ref: typeMap
17+
file: apiargs-common-option.yaml
18+
operation: MongoDB\\Client::selectDatabase
19+
---
20+
source:
21+
ref: writeConcern
22+
file: apiargs-common-option.yaml
23+
operation: MongoDB\\Client::selectDatabase
24+
replacement:
25+
resource: "database"
26+
...
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
source:
2+
ref: $databaseName
3+
file: apiargs-common-param.yaml
4+
operation: MongoDB\\Client::selectDatabase
5+
position: 1
6+
---
7+
source:
8+
ref: $options
9+
file: apiargs-common-param.yaml
10+
operation: MongoDB\\Client::selectDatabase
11+
position: 2
12+
...
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
arg_name: option
2+
name: allowDiskUse
3+
type: boolean
4+
description: |
5+
Enables writing to temporary files. When set to true, aggregation
6+
stages can write data to the ``_tmp`` sub-directory in the dbPath
7+
directory. The default is ``false``.
8+
interface: phpmethod
9+
operation: MongoDB\\Collection::aggregate
10+
optional: true
11+
position: 1
12+
---
13+
arg_name: option
14+
name: batchSize
15+
type: integer
16+
description: |
17+
The number of documents to return per batch
18+
interface: phpmethod
19+
operation: MongoDB\\Collection::aggregate
20+
optional: true
21+
position: 2
22+
---
23+
source:
24+
ref: bypassDocumentValidation
25+
file: apiargs-common-option.yaml
26+
operation: MongoDB\\Collection::aggregate
27+
position: 5
28+
---
29+
source:
30+
ref: maxTimeMS
31+
file: apiargs-common-option.yaml
32+
operation: MongoDB\\Collection::aggregate
33+
position: 4
34+
---
35+
source:
36+
ref: readConcern
37+
file: apiargs-common-option.yaml
38+
operation: MongoDB\\Collection::selectDatabase
39+
replacement:
40+
resource: "aggregation"
41+
position: 5
42+
---
43+
source:
44+
ref: readPreference
45+
file: apiargs-common-option.yaml
46+
operation: MongoDB\\Collection::selectDatabase
47+
replacement:
48+
resource: "aggregation"
49+
position: 6
50+
---
51+
source:
52+
ref: typeMap
53+
file: apiargs-common-option.yaml
54+
operation: MongoDB\\Collection::selectDatabase
55+
position: 7
56+
---
57+
arg_name: param
58+
name: useCursor
59+
type: boolean
60+
description: |
61+
Indicates whether the command will request that the server provide
62+
results using a cursor. The default is ``true``.
63+
64+
For MongoDB version 2.6 or later, ``useCursor`` allows users to turn
65+
off cursors if necessary to aid in mongod/mongos upgrades.
66+
67+
``useCursor`` is ignored for MongoDB versions prior to 2.6 as
68+
aggregation cursors are not available pre-2.6.
69+
interface: phpmethod
70+
operation: MongoDB\\Collection::aggregate
71+
optional: true
72+
position: 8
73+
...
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
arg_name: param
2+
name: $pipeline
3+
type: array
4+
description: |
5+
Specifies an :manual:`aggregation pipeline </core/aggregation-pipeline>` operation.
6+
interface: phpmethod
7+
operation: MongoDB\\Collection::aggregate
8+
optional: true
9+
position: 1
10+
---
11+
source:
12+
ref: $options
13+
file: apiargs-common-param.yaml
14+
operation: MongoDB\\Collection::aggregate
15+
position: 2
16+
...
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
source:
2+
ref: bypassDocumentValidation
3+
file: apiargs-common-option.yaml
4+
operation: MongoDB\\Collection::bulkWrite
5+
position: 1
6+
---
7+
arg_name: option
8+
name: ordered
9+
type: boolean
10+
description: |
11+
If ``true``: when an insert fails, the operation returns without performing the
12+
remaining writes.
13+
14+
If ``false``: when a write fails, the operation will continue with the
15+
remaining writes, if any.
16+
17+
The default is ``true``.
18+
optional: true
19+
interface: phpmethod
20+
operation: MongoDB\\Collection::bulkWrite
21+
position: 2
22+
---
23+
source:
24+
ref: writeConcern
25+
file: apiargs-common-option.yaml
26+
operation: MongoDB\\Collection::bulkWrite
27+
replacement:
28+
resource: "write"
29+
position: 3
30+
...
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
arg_name: param
2+
name: $operations
3+
type: array
4+
description: |
5+
An array containing the write operations to perform. {{role}}
6+
supports :phpmethod:`deleteMany <MongoDB\\Collection::deleteMany>`,
7+
:phpmethod:`deleteOne <MongoDB\\Collection::deleteOne>`, :phpmethod:`insertOne
8+
<MongoDB\\Collection::insertOne>`, :phpmethod:`replaceOne
9+
<MongoDB\\Collection::replaceOne>`, :phpmethod:`updateMany
10+
<MongoDB\\Collection::updateMany>`, and :phpmethod:`updateOne
11+
<MongoDB\\Collection::updateOne>` operations in the following array
12+
structure:
13+
14+
.. code-block:: php
15+
16+
[
17+
[ 'deleteMany' => [ $filter ] ],
18+
[ 'deleteOne' => [ $filter ] ],
19+
[ 'insertOne' => [ $document ] ],
20+
[ 'replaceOne' => [ $filter, $replacement, $options ] ],
21+
[ 'updateMany' => [ $filter, $update, $options ] ],
22+
[ 'updateOne' => [ $filter, $update, $options ] ],
23+
]
24+
post: |
25+
Arguments correspond to the respective operation methods. However,
26+
the ``writeConcern`` option is specified for the top-level bulk write
27+
operation instead of each individual operation.
28+
interface: phpmethod
29+
operation: MongoDB\\Collection::bulkWrite
30+
optional: true
31+
position: 1
32+
---
33+
source:
34+
ref: $options
35+
file: apiargs-common-param.yaml
36+
operation: MongoDB\\Collection::bulkWrite
37+
interface: phpmethod
38+
position: 2
39+
...
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
arg_name: param
2+
name: $manager
3+
type: :php:`MongoDB\\Driver\\Manager <class.mongodb-driver-manager>`
4+
description: |
5+
The :php:`Manager <mongodb-driver-manager>` instance from the driver.
6+
The manager maintains connections between the driver and your MongoDB
7+
instances.
8+
interface: phpmethod
9+
operation: MongoDB\\Collection::__construct
10+
optional: false
11+
position: 1
12+
---
13+
source:
14+
ref: $databaseName
15+
file: apiargs-common-param.yaml
16+
operation: MongoDB\\Collection::__construct
17+
replacement:
18+
select: ""
19+
position: 2
20+
---
21+
source:
22+
ref: $collectionName
23+
file: apiargs-common-param.yaml
24+
operation: MongoDB\\Collection::__construct
25+
replacement:
26+
select: ""
27+
position: 3
28+
---
29+
source:
30+
ref: $options
31+
file: apiargs-common-param.yaml
32+
operation: MongoDB\\Collection::__construct
33+
position: 4
34+
...
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
arg_name: option
2+
name: hint
3+
type: string or array|object
4+
description: |
5+
The index to use. If you specify a document, it is interpreted as
6+
an index specification and a name will be generated.
7+
optional: true
8+
interface: phpmethod
9+
operation: MongoDB\\Collection::count
10+
position: 1
11+
---
12+
arg_name: option
13+
name: limit
14+
type: integer
15+
description: |
16+
The maximum number of documents to return.
17+
optional: true
18+
interface: phpmethod
19+
operation: MongoDB\\Collection::count
20+
position: 2
21+
---
22+
source:
23+
ref: maxTimeMS
24+
file: apiargs-common-option.yaml
25+
operation: MongoDB\\Collection::count
26+
position: 3
27+
---
28+
source:
29+
ref: readConcern
30+
file: apiargs-common-option.yaml
31+
operation: MongoDB\\Collection::count
32+
replacement:
33+
resource: "count"
34+
position: 4
35+
---
36+
source:
37+
ref: readPreference
38+
file: apiargs-common-option.yaml
39+
replacement:
40+
resource: "count"
41+
position: 5
42+
---
43+
arg_name: option
44+
name: skip
45+
type: integer
46+
description: |
47+
The number of documents to skip before returning the documents.
48+
optional: true
49+
interface: phpmethod
50+
operation: MongoDB\\Collection::count
51+
position: 6
52+
...

0 commit comments

Comments
 (0)