@@ -9,14 +9,13 @@ Retrieve Distinct Values of a Field
9
9
.. note::
10
10
If you specify a callback method, ``distinct()`` returns nothing. If you do
11
11
not specify one, this method returns a ``Promise`` that resolves to the
12
- result object when it completes. See our guide on :doc :`Promises and
13
- Callbacks </fundamentals/promises>` for more information, or the
12
+ result object when it completes. See our guide on :ref :`Promises and Callbacks <node-promises-and-callbacks>`
13
+ for more information, or the
14
14
`API documentation <{+api+}/classes/Collection.html#~resultcallback>`__ for
15
15
information on the result object.
16
16
17
- You can retrieve a list of :doc:`distinct values </fundamentals/crud/read-operations/distinct>`
18
- for a field across a collection by using the
19
- `collection.distinct() <{+api+}/classes/Collection.html#distinct>`__
17
+ You can retrieve a list of distinct values for a field across a collection by using
18
+ the `collection.distinct() <{+api+}/classes/Collection.html#distinct>`__
20
19
method. Call the ``distinct()`` method on a ``Collection`` object with a document
21
20
field name parameter as a ``String`` to produce a list that contains one of each
22
21
of the different values found in the specified document field as shown below:
@@ -49,6 +48,9 @@ message that resembles the following:
49
48
50
49
"key" had the wrong type. Expected string, found <non-string type>
51
50
51
+ Visit :ref:`node-fundamentals-distinct` for more information about the `distinct()`
52
+ method.
53
+
52
54
Example
53
55
-------
54
56
0 commit comments