Skip to content

Commit 3f6ce11

Browse files
committed
file
1 parent 7e3fdf8 commit 3f6ce11

File tree

3 files changed

+18
-18
lines changed

3 files changed

+18
-18
lines changed

source/databases-collection.txt

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ database name.
4242

4343
The following example accesses a database named ``test_database``:
4444

45-
.. literalinclude:: /read/databases-collection.rb
45+
.. literalinclude:: /includes/usage-examples/databases-collection.rb
4646
:language: ruby
4747
:dedent:
4848
:start-after: start-access-db
@@ -57,7 +57,7 @@ of your database.
5757

5858
The following example accesses a collection named ``test_collection``:
5959

60-
.. literalinclude:: /read/databases-collection.rb
60+
.. literalinclude:: /includes/usage-examples/databases-collection.rb
6161
:language: ruby
6262
:dedent:
6363
:emphasize-lines: 2
@@ -80,7 +80,7 @@ create a collection with specific options.
8080
The following example creates a collection called example_collection with
8181
specific options:
8282

83-
.. literalinclude:: /read/databases-collection.rb
83+
.. literalinclude:: /includes/usage-examples/databases-collection.rb
8484
:language: ruby
8585
:dedent:
8686
:emphasize-lines: 2
@@ -101,7 +101,7 @@ method. This method returns an array of collection objects in the database.
101101
The following example calls the ``collections`` method and iterates over the array
102102
to print the results:
103103

104-
.. literalinclude:: /read/databases-collection.rb
104+
.. literalinclude:: /includes/usage-examples/databases-collection.rb
105105
:language: ruby
106106
:dedent:
107107
:start-after: start-get-list
@@ -110,7 +110,7 @@ to print the results:
110110
To query for only the names of the collections in the database, call the
111111
``collection_names`` method as follows:
112112

113-
.. literalinclude:: /read/databases-collection.rb
113+
.. literalinclude:: ncludes/usage-examples/databases-collection.rb
114114
:language: ruby
115115
:dedent:
116116
:start-after: start-get-list-names
@@ -131,7 +131,7 @@ You can delete a collection from the database by using the ``drop`` method.
131131

132132
The following example deletes the ``test_collection`` collection:
133133

134-
.. literalinclude:: /read/databases-collection.rb
134+
.. literalinclude:: /includes/usage-examples/databases-collection.rb
135135
:language: ruby
136136
:dedent:
137137
:start-after: start-delete
@@ -170,7 +170,7 @@ The following example shows how to change the read preference, read concern, and
170170
write preference of a database called ``test-database`` with the ``database.with``
171171
method:
172172

173-
.. literalinclude:: /read/databases-collection.rb
173+
.. literalinclude:: /includes/usage-examples/databases-collection.rb
174174
:language: ruby
175175
:dedent:
176176
:start-after: start-with-database
@@ -179,7 +179,7 @@ method:
179179
The following example shows how to change the read preference, read concern, and
180180
write concern of a collection:
181181

182-
.. literalinclude:: /read/databases-collection.rb
182+
.. literalinclude:: ncludes/usage-examples/databases-collection.rb
183183
:language: ruby
184184
:dedent:
185185
:start-after: start-with-collection
@@ -207,7 +207,7 @@ In the following code example, the tag set passed to the ``:read`` parameter
207207
instructs the {+driver-short+} to prefer reads from the New York data center
208208
(``'dc':'ny'``) and to fall back to the San Francisco data center (``'dc':'sf'``):
209209

210-
.. literalinclude:: /read/databases-collection.rb
210+
.. literalinclude:: includes/usage-examples/databases-collection.rb
211211
:language: ruby
212212
:dedent:
213213
:start-after: start-tag-sets
@@ -229,7 +229,7 @@ higher latencies, pass the ``local_threshold`` option to the ``Mongo::Client`` c
229229

230230
The following example specifies a local threshold of 35 milliseconds:
231231

232-
.. literalinclude:: /read/databases-collection.rb
232+
.. literalinclude:: /includes/usage-examples/databases-collection.rb
233233
:language: ruby
234234
:dedent:
235235
:start-after: start-local-threshold-example
@@ -249,17 +249,17 @@ within 35 milliseconds of the closest member's ping time.
249249
Troubleshooting
250250
---------------
251251

252-
.. include:: /includes/troubleshooting/read-write-options.rst
252+
.. include:: /includes/usage-examples/databases-collection.rb
253253

254254
API Documentation
255255
-----------------
256256

257257
To learn more about any of the methods or types discussed in this
258258
guide, see the following API documentation:
259259

260-
- `collections <https://www.mongodb.com/docs/ruby-driver/current/api/Mongo/Database.html#collections-instance_method>`__
261-
- `collection_names <https://www.mongodb.com/docs/ruby-driver/current/api/Mongo/Database.html#collection_names-instance_method>`__
262-
- `command <{+api+}/api/Mongo/Monitoring/Event/CommandStarted.html#command-instance_method>`__
263-
- `drop database <{+api+}/current/api/Mongo/Database.html#drop-instance_method>`__
264-
- `drop collection <{+api+}/ruby-driver/current/api/Mongo/Collection.html#drop-instance_method>`__
265-
- `with <{+api+}/Mongo/Collection.html#with-instance_method>`__
260+
- `collections <{+api-root+}/Mongo/Database.html#collections-instance_method>`__
261+
- `collection_names <{+api-root+}/Mongo/Database.html#collection_names-instance_method>`__
262+
- `command <{+api-root+}/Mongo/Monitoring/Event/CommandStarted.html#command-instance_method>`__
263+
- `drop database <{+api-root+}/Mongo/Database.html#drop-instance_method>`__
264+
- `drop collection <{+api-root+}/Mongo/Collection.html#drop-instance_method>`__
265+
- `with <{+api-root+}/Mongo/Collection.html#with-instance_method>`__
File renamed without changes.

source/index.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
API Documentation <{+api-root+}>
2222
What's New </whats-new>
2323
Compatibility </compatibility>
24+
Databases & Collections </databases-collections>
2425

2526
.. TODO:
26-
Databases & Collections </databases-collections>
2727
Write Data </write>
2828
Operations on Replica Sets </read-write-pref>
2929
Monitor Your Application </monitoring>

0 commit comments

Comments
 (0)