Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions source/crud/insert.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
.. _golang-insert-guide:

=================
Insert a Document
=================
================
Insert Documents
================

.. facet::
:name: genre
Expand Down
75 changes: 32 additions & 43 deletions source/reference/quick-reference.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,24 @@ Quick Reference
===============

.. meta::
:description: Explore with the MongoDB Go Driver syntax for various commands, including find, insert, update, delete, and more, with links to API documentation and usage examples.
:keywords: code example, summary, copyable
:description: See simple code examples for how to perform a variety of operations in the Go driver.

.. default-domain:: mongodb

This page shows the driver syntax for several MongoDB commands and links to
their related reference and API documentation.
This page shows the driver syntax for several MongoDB operations in the
{+driver-short+} and provides links to related reference and API
documentation.

.. list-table::
:header-rows: 1
:widths: 25 75

* - Command
* - Operation
- Syntax

* - | **Find a Document**
|
| `API Documentation <{+api+}/mongo#Collection.FindOne>`__
| :ref:`Usage Example <golang-find-one>`
| :ref:`Fundamentals <golang-retrieve>`
| :ref:`Find Documents Guide <golang-retrieve>`

- .. io-code-block::
:copyable: true
Expand All @@ -42,8 +41,7 @@ their related reference and API documentation.
* - | **Find Multiple Documents**
|
| `API Documentation <{+api+}/mongo#Collection.Find>`__
| :ref:`Usage Example <golang-find-multiple>`
| :ref:`Fundamentals <golang-retrieve>`
| :ref:`Find Documents Guide <golang-retrieve>`

- .. io-code-block::
:copyable: true
Expand All @@ -63,8 +61,7 @@ their related reference and API documentation.
* - | **Insert a Document**
|
| `API Documentation <{+api+}/mongo#Collection.InsertOne>`__
| :ref:`Usage Example <golang-insert-one>`
| :ref:`Fundamentals <golang-insert-guide>`
| :ref:`Insert Documents Guide <golang-insert-guide>`

- .. code-block:: go
:copyable: true
Expand All @@ -80,8 +77,7 @@ their related reference and API documentation.
* - | **Insert Multiple Documents**
|
| `API Documentation <{+api+}/mongo#Collection.InsertMany>`__
| :ref:`Usage Example <golang-insert-many>`
| :ref:`Fundamentals <golang-insert-guide>`
| :ref:`Insert Documents Guide <golang-insert-guide>`

- .. code-block:: go
:copyable: true
Expand All @@ -98,8 +94,7 @@ their related reference and API documentation.
* - | **Update a Document**
|
| `API Documentation <{+api+}/mongo#Collection.UpdateOne>`__
| :ref:`Usage Example <golang-update-one>`
| :ref:`Fundamentals <golang-update-documents>`
| :ref:`Update Documents Guide <golang-update-documents>`

- .. io-code-block::
:copyable: true
Expand All @@ -123,8 +118,7 @@ their related reference and API documentation.
* - | **Update Multiple Documents**
|
| `API Documentation <{+api+}/mongo#Collection.UpdateMany>`__
| :ref:`Usage Example <golang-update-many>`
| :ref:`Fundamentals <golang-update-documents>`
| :ref:`Update Documents Guide <golang-update-documents>`

- .. io-code-block::
:copyable: true
Expand All @@ -148,7 +142,7 @@ their related reference and API documentation.
* - | **Update Arrays in Documents**
|
| `API Documentation <{+api+}/mongo#Collection.UpdateMany>`__
| :ref:`Fundamentals <golang-update-arrays>`
| :ref:`Update Arrays Guide <golang-update-arrays>`

- .. io-code-block::
:copyable: true
Expand All @@ -173,8 +167,7 @@ their related reference and API documentation.
* - | **Replace a Document**
|
| `API Documentation <{+api+}/mongo#Collection.ReplaceOne>`__
| :ref:`Usage Example <golang-replace>`
| :ref:`Fundamentals <golang-replacement-document>`
| :ref:`Replace Documents Guide <golang-replacement-document>`

- .. io-code-block::
:copyable: true
Expand All @@ -197,8 +190,7 @@ their related reference and API documentation.
* - | **Delete a Document**
|
| `API Documentation <{+api+}/mongo#Collection.DeleteOne>`__
| :ref:`Usage Example <golang-delete-one>`
| :ref:`Fundamentals <golang-delete-guide>`
| :ref:`Delete Documents Guide <golang-delete-guide>`

- .. code-block:: go
:copyable: true
Expand All @@ -211,8 +203,7 @@ their related reference and API documentation.
* - | **Delete Multiple Documents**
|
| `API Documentation <{+api+}/mongo#Collection.DeleteMany>`__
| :ref:`Usage Example <golang-delete-many>`
| :ref:`Fundamentals <golang-delete-guide>`
| :ref:`Delete Documents Guide <golang-delete-guide>`

- .. code-block:: go
:copyable: true
Expand All @@ -225,8 +216,7 @@ their related reference and API documentation.
* - | **Bulk Write**
|
| `API Documentation <{+api+}/mongo#Collection.BulkWrite>`__
| :ref:`Usage Example <golang-bulk-ops-usage-example>`
| :ref:`Fundamentals <golang-bulk>`
| :ref:`Bulk Operations Guide <golang-bulk>`

- .. io-code-block::
:copyable: true
Expand All @@ -253,7 +243,7 @@ their related reference and API documentation.
* - | **Monitor Data Changes**
|
| `API Documentation <{+api+}/mongo#Collection.Watch>`__
| :ref:`Usage Example <golang-usageex-monitor-changes>`
| :ref:`Change Streams Guide <golang-watch-changes>`

- .. code-block:: go
:copyable: true
Expand All @@ -264,7 +254,7 @@ their related reference and API documentation.
* - | **Access Data from a Cursor Iteratively**
|
| `API Documentation <{+api+}/mongo#Cursor.Next>`__
| :ref:`Fundamentals <golang-individual-documents>`
| :ref:`Cursor Guide <golang-individual-documents>`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| :ref:`Cursor Guide <golang-individual-documents>`
| :ref:`Access Data from a Cursor Guide <golang-individual-documents>`

S: Use full page title.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

decided to change this to the specific section references as the anchors point to sections and not the whole page


- .. io-code-block::
:copyable: true
Expand Down Expand Up @@ -294,7 +284,7 @@ their related reference and API documentation.
* - | **Access Data from a Cursor as an Array**
|
| `API Documentation <{+api+}/mongo#Cursor.All>`__
| :ref:`Fundamentals <golang-all-documents>`
| :ref:`Cursor Guide <golang-all-documents>`

- .. io-code-block::
:copyable: true
Expand All @@ -321,8 +311,7 @@ their related reference and API documentation.
* - | **Count Documents**
|
| `API Documentation <{+api+}/mongo#Collection.CountDocuments>`__
| :ref:`Usage Example <golang-count-usage-example>`
| :ref:`Fundamentals <golang-count-documents>`
| :ref:`Count Documents Guide <golang-count-documents>`

- .. io-code-block::
:copyable: true
Expand All @@ -338,10 +327,10 @@ their related reference and API documentation.

6

* - | **List the Distinct Documents or Field Values**
* - | **List Distinct Field Values**
|
| `API Documentation <{+api+}/mongo#Collection.Distinct>`__
| :ref:`Usage Example <golang-distinct-usage-example>`
| :ref:`Fundamentals <golang-retrieve-distinct>`
| :ref:`Distinct Values Guide <golang-retrieve-distinct>`

- .. io-code-block::
:copyable: true
Expand All @@ -361,7 +350,7 @@ their related reference and API documentation.
* - | **Limit the Number of Documents Retrieved**
|
| `API Documentation <{+api+}/mongo/options#FindOptionsBuilder.SetLimit>`__
| :ref:`Fundamentals <golang-limit>`
| :ref:`Limit Documents Reference <golang-limit>`

- .. io-code-block::
:copyable: true
Expand All @@ -381,7 +370,7 @@ their related reference and API documentation.
* - | **Skip Retrieved Documents**
|
| `API Documentation <{+api+}/mongo/options#FindOptionsBuilder.SetSkip>`__
| :ref:`Fundamentals <golang-skip>`
| :ref:`Skip Documents Reference <golang-skip>`

- .. io-code-block::
:copyable: true
Expand All @@ -399,10 +388,10 @@ their related reference and API documentation.
[{item Pen} ... ]
[{item Chair} ...]

* - | **Sort the Documents When Retrieving Them**
* - | **Sort Retrieved Documents**
|
| `API Documentation <{+api+}/mongo/options#FindOptionsBuilder.SetSort>`__
| :ref:`Fundamentals <golang-sort-results>`
| :ref:`Sort Documents Reference <golang-sort-results>`

- .. io-code-block::
:copyable: true
Expand All @@ -420,10 +409,10 @@ their related reference and API documentation.
[{firstName Jose} {age 7} ... ]
[{firstName Om} {age 8} ... ]

* - | **Project Document Fields When Retrieving Them**
* - | **Project Document Fields in Results**
|
| `API Documentation <{+api+}/mongo/options#FindOptionsBuilder.SetProjection>`__
| :ref:`Fundamentals <golang-project>`
| :ref:`Projection Guide <golang-project>`

- .. io-code-block::
:copyable: true
Expand All @@ -450,7 +439,7 @@ their related reference and API documentation.
* - | **Create an Index**
|
| `API Documentation <{+api+}/mongo#IndexView.CreateOne>`__
| :ref:`Fundamentals <golang-indexes>`
| :ref:`Indexes Guide <golang-indexes>`

- .. code-block:: go
:copyable: true
Expand All @@ -461,7 +450,7 @@ their related reference and API documentation.
* - | **Search Text**
|
| `API Documentation <{+api+}/mongo#Collection.Find>`__
| :ref:`Fundamentals <golang-search-text>`
| :ref:`Search Text Guide <golang-search-text>`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I: This page is not included in the TOC yet. Can you please put it under the Query Documents section as 'Search Text'? Thanks!


- .. io-code-block::
:copyable: true
Expand Down
Loading