Skip to content

Commit c7b3487

Browse files
author
bazile-clyde
committed
CDRIVER-2888 remove deprecated cloneCollection command and refs
1 parent 5f5e804 commit c7b3487

File tree

4 files changed

+4
-59
lines changed

4 files changed

+4
-59
lines changed

src/libmongoc/doc/mongoc-common-task-examples.rst

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Common Tasks
55

66
Drivers for some other languages provide helper functions to perform certain common tasks. In the C Driver we must explicitly build commands to send to the server.
77

8-
This snippet contains example code for the ``explain``, ``copydb`` and ``cloneCollection`` commands.
8+
This snippet contains example code for the ``explain`` and ``copydb`` commands.
99

1010
Setup
1111
-----
@@ -38,19 +38,6 @@ Here's how to use the ``copydb`` command to copy a database from another instanc
3838
:language: c
3939
:caption: copydb.c
4040

41-
.. _mongoc-common-task-examples_clone_collection:
42-
43-
"cloneCollection" Command
44-
-------------------------
45-
46-
This example requires two instances of mongo to be running.
47-
48-
Here's an example of the ``cloneCollection`` command to clone a collection from another instance of MongoDB:
49-
50-
.. literalinclude:: ../examples/common_operations/clone-collection.c
51-
:language: c
52-
:caption: clone-collection.c
53-
5441
Running the Examples
5542
--------------------
5643

@@ -66,7 +53,8 @@ First launch two separate instances of mongod (must be done from separate shells
6653
6754
.. code-block:: none
6855
69-
$ mkdir /tmp/db2$ mongod --dbpath /tmp/db2 --port 27018 # second instance
56+
$ mkdir /tmp/db2
57+
$ mongod --dbpath /tmp/db2 --port 27018 # second instance
7058
7159
Now compile and run the example program:
7260

@@ -134,6 +122,4 @@ Now compile and run the example program:
134122
}
135123
copydb
136124
{ "ok" : 1 }
137-
clone collection
138-
{ "ok" : 1 }
139125

src/libmongoc/doc/mongoc_collection_copy.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Description
2121

2222
Performs a deep copy of the ``collection`` struct and its configuration. Useful if you intend to call :symbol:`mongoc_collection_set_write_concern`, :symbol:`mongoc_collection_set_read_prefs`, or :symbol:`mongoc_collection_set_read_concern`, and want to preserve an unaltered copy of the struct.
2323

24-
This function does *not* copy the contents of the collection on the MongoDB server; use the :ref:`cloneCollection command <mongoc-common-task-examples_clone_collection>` for that purpose.
24+
This function does *not* copy the contents of the collection on the MongoDB server.
2525

2626
Returns
2727
-------

src/libmongoc/examples/common_operations/clone-collection.c

Lines changed: 0 additions & 34 deletions
This file was deleted.

src/libmongoc/examples/common_operations/common-operations.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ const char *COLLECTION_NAME = "things";
2424
#include "../doc-common-insert.c"
2525
#include "explain.c"
2626
#include "copydb.c"
27-
#include "clone-collection.c"
2827

2928

3029
int
@@ -104,12 +103,6 @@ main (int argc, char *argv[])
104103
res = EXIT_FAILURE;
105104
goto cleanup;
106105
}
107-
108-
printf ("clone collection\n");
109-
if (!clone_collection (database, other_host_and_port)) {
110-
res = EXIT_FAILURE;
111-
goto cleanup;
112-
}
113106
}
114107

115108
cleanup:

0 commit comments

Comments
 (0)