Skip to content

Commit 6d4a1d3

Browse files
committed
Update MongoDB\Database documentation
1 parent cbb7f43 commit 6d4a1d3

29 files changed

+548
-506
lines changed

docs/includes/apiargs-MongoDBDatabase-method-command-option.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,18 @@ source:
33
ref: readPreference
44
operation: MongoDB\\Database::command
55
position: 1
6+
description: |
7+
The read preference to use when executing the command. This may be used when
8+
issuing the command to a replica set or shard cluster to ensure that the
9+
driver sets the wire protocol accordingly or adds the read preference to the
10+
command document, respectively. Defaults to the Database's read preference.
611
---
712
source:
813
file: apiargs-common-option.yaml
914
ref: typeMap
1015
operation: MongoDB\\Database::command
1116
position: 2
17+
description: |
18+
Type map for BSON deserialization. This will be applied to the returned
19+
cursor. Defaults to the database's type map.
1220
...

docs/includes/apiargs-MongoDBDatabase-method-command-param.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
arg_name: param
22
name: $command
3-
type: string
3+
type: array|object
44
description: |
5-
The name of the :manual:`database command </reference/command>`
6-
to execute.
5+
The :manual:`database command </reference/command>` document.
76
interface: phpmethod
87
operation: MongoDB\\Database::command
98
optional: false

docs/includes/apiargs-MongoDBDatabase-method-construct-option.yaml

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,47 @@ source:
33
ref: readConcern
44
operation: MongoDB\\Database::__construct
55
position: 1
6+
replacement:
7+
resource: "database"
8+
parent: "manager"
69
---
710
source:
811
file: apiargs-common-option.yaml
912
ref: readPreference
1013
operation: MongoDB\\Database::__construct
1114
position: 2
15+
replacement:
16+
resource: "database"
17+
parent: "manager"
1218
---
13-
source:
14-
file: apiargs-common-option.yaml
15-
ref: typeMap
19+
arg_name: option
20+
name: typeMap
21+
type: array
22+
description: |
23+
Default :php:`type map
24+
<manual/en/mongodb.persistence.deserialization.php#mongodb.persistence.typemaps>`
25+
to apply to cursors. The type map determines how BSON documents are converted
26+
to PHP values which determines. The |php-library| uses the following type map
27+
by default:
28+
29+
.. code-block:: php
30+
31+
[
32+
'array' => 'MongoDB\Model\BSONArray',
33+
'document' => 'MongoDB\Model\BSONDocument',
34+
'root' => 'MongoDB\Model\BSONDocument',
35+
]
36+
interface: phpmethod
1637
operation: MongoDB\\Database::__construct
38+
optional: true
1739
position: 3
1840
---
1941
source:
2042
file: apiargs-common-option.yaml
2143
ref: writeConcern
2244
operation: MongoDB\\Database::__construct
2345
position: 4
24-
...
46+
replacement:
47+
resource: "database"
48+
parent: "manager"
49+
...

docs/includes/apiargs-MongoDBDatabase-method-construct-param.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ operation: MongoDB\\Database::__construct
55
position: 1
66
---
77
source:
8-
ref: $databaseName
98
file: apiargs-common-param.yaml
9+
ref: $databaseName
1010
operation: MongoDB\\Database::__construct
1111
position: 2
1212
---
1313
source:
1414
ref: $options
1515
file: apiargs-common-param.yaml
1616
operation: MongoDB\\Database::__construct
17-
position: 2
18-
...
17+
position: 3
18+
...

0 commit comments

Comments
 (0)