Skip to content

Commit fd3186d

Browse files
committed
fixes
1 parent 892c056 commit fd3186d

File tree

2 files changed

+12
-6
lines changed

2 files changed

+12
-6
lines changed

snooty.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,5 @@ php-library = "MongoDB PHP Library"
2424

2525
[constants]
2626
php-library = "MongoDB PHP Library"
27+
mdb-server = "MongoDB Server"
2728
api = "https://www.mongodb.com/docs/php-library/current/reference"

source/read/project.txt

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,16 @@ It then calls the ``find()`` method to find all restaurants in which the ``name`
7070
value is ``'Emerald Pub'``, passing the options array as a parameter to ``find()``:
7171

7272
.. io-code-block::
73-
73+
:copyable:
74+
7475
.. input:: /includes/read/project.php
7576
:start-after: start-project-include
7677
:end-before: end-project-include
7778
:language: php
7879
:dedent:
7980

8081
.. output::
82+
:visible: false
8183

8284
{ "_id" : { "$oid" : "..." }, "borough" : "Manhattan", "cuisine" : "American", "name" : "Emerald Pub" }
8385
{ "_id" : { "$oid" : "..." }, "borough" : "Queens", "cuisine" : "American", "name" : "Emerald Pub" }
@@ -99,23 +101,24 @@ The following example performs the same query as the preceding example but
99101
excludes the ``_id`` field from the projection:
100102

101103
.. io-code-block::
102-
104+
:copyable:
105+
103106
.. input:: /includes/read/project.php
104107
:start-after: start-project-include-without-id
105108
:end-before: end-project-include-without-id
106109
:language: php
107110
:dedent:
108-
:emphasize-lines: 3
109111

110112
.. output::
113+
:visible: false
111114

112115
{ "borough" : "Manhattan", "cuisine" : "American", "name" : "Emerald Pub" }
113116
{ "borough" : "Queens", "cuisine" : "American", "name" : "Emerald Pub" }
114117

115118
Specify Fields to Exclude
116119
~~~~~~~~~~~~~~~~~~~~~~~~~
117120

118-
To specify the fields to include in the result, pass an options array to the
121+
To specify the fields to exclude from the result, pass an options array to the
119122
``MongoDB\Collection::findOne()`` or ``MongoDB\Collection::find()`` method that
120123
sets the ``projection`` option. To set this option, use the following syntax:
121124

@@ -130,18 +133,20 @@ sets the ``projection`` option. To set this option, use the following syntax:
130133
The following example creates an options array and sets the ``projection`` option
131134
to exclude the ``grades`` and ``address`` fields of matching documents.
132135
It then calls the ``find()`` method to find all restaurants in which the ``name``
133-
field value is ``"Emerald Pub"``, passing the options array as a parameter to
136+
field value is ``'Emerald Pub'``, passing the options array as a parameter to
134137
``find()``:
135138

136139
.. io-code-block::
137-
140+
:copyable:
141+
138142
.. input:: /includes/read/project.php
139143
:start-after: start-project-exclude
140144
:end-before: end-project-exclude
141145
:language: php
142146
:dedent:
143147

144148
.. output::
149+
:visible: false
145150

146151
{ "_id" : { "$oid" : "..." }, "borough" : "Manhattan", "cuisine" : "American", "name" : "Emerald Pub", "restaurant_id" : "40367329" }
147152
{ "_id" : { "$oid" : "..." }, "borough" : "Queens", "cuisine" : "American", "name" : "Emerald Pub", "restaurant_id" : "40668598" }

0 commit comments

Comments
 (0)