-
Notifications
You must be signed in to change notification settings - Fork 26
DOCSP-27283: db coll page #204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice job on this! Just a few suggestions & typo fixes
Call the `GetDatabase() | ||
<{+new-api-root+}/MongoDB.Driver/MongoDB.Driver.IMongoClient.GetDatabase.html>`__ | ||
method on an `IMongoClient | ||
<{+new-api-root+}/MongoDB.Driver/MongoDB.Driver.IMongoClient.html>`__ | ||
instance to create an ``IMongoDatabase``, passing the database name as a | ||
parameter. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
S: Move the objective to the front
Call the `GetDatabase() | |
<{+new-api-root+}/MongoDB.Driver/MongoDB.Driver.IMongoClient.GetDatabase.html>`__ | |
method on an `IMongoClient | |
<{+new-api-root+}/MongoDB.Driver/MongoDB.Driver.IMongoClient.html>`__ | |
instance to create an ``IMongoDatabase``, passing the database name as a | |
parameter. | |
To create an ``IMongoDatabase``, call the `GetDatabase() | |
<{+new-api-root+}/MongoDB.Driver/MongoDB.Driver.IMongoClient.GetDatabase.html>`__ | |
method on an `IMongoClient | |
<{+new-api-root+}/MongoDB.Driver/MongoDB.Driver.IMongoClient.html>`__ | |
instance and pass the database name as a parameter. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed all
If you pass the name of a nonexistent database to the ``GetDatabase()`` | ||
method, the driver still returns an | ||
``IMongoDatabase`` instance. When you insert any data into a collection in this | ||
database, the server creates the collection at that time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
database, the server creates the collection at that time. | |
database, the server creates the database and collection at that time. |
This example uses the ``GetCollection()`` method to | ||
perform the following actions: | ||
|
||
- Access a collection called ``coll_xyz`` from a database referenced by | ||
the ``myDB`` variable | ||
- Set a write concern on the collection in the ``MongoCollectionSettings`` type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure this example needs to set the write concern. It would be more clear and focused on accessing a collection if it only gets the "coll_xyz" collection.
The following code shows how to create a collection called ``coll_abc`` | ||
within a database referenced by the ``myDB`` variable: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplicate sentence
method on your ``IMongoCollection`` instance. The following code shows | ||
how to drop a collection referenced by the ``myColl`` variable: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplicate sentence
method on your ``IMongoCollection`` instance. The following code shows | |
how to drop a collection referenced by the ``myColl`` variable: | |
method on your ``IMongoCollection`` instance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well-written! LGTM.
* DOCSP-27283: db coll page * JS PR fixes 1 (cherry picked from commit 5b5ca74)
* DOCSP-27283: db coll page * JS PR fixes 1 (cherry picked from commit 5b5ca74)
* DOCSP-27283: db coll page * JS PR fixes 1 (cherry picked from commit 5b5ca74)
* DOCSP-27283: db coll page * JS PR fixes 1 (cherry picked from commit 5b5ca74)
* DOCSP-27283: db coll page * JS PR fixes 1 (cherry picked from commit 5b5ca74)
* DOCSP-27283: db coll page * JS PR fixes 1 (cherry picked from commit 5b5ca74)
* DOCSP-27283: db coll page * JS PR fixes 1 (cherry picked from commit 5b5ca74)
* DOCSP-27283: db coll page * JS PR fixes 1
Pull Request Info
PR Reviewing Guidelines
JIRA - https://jira.mongodb.org/browse/DOCSP-27283
Staging - https://preview-mongodbrustagir.gatsbyjs.io/csharp/DOCSP-27283-class-overview/fundamentals/database-collection/
Self-Review Checklist