Description Usage Arguments Details Value See Also Examples
Rename a collection on a MongoDB server.
1 | mongo.rename(mongo, from.ns, to.ns)
|
mongo |
(mongo) A mongo connection object. |
from.ns |
(string) The namespace of the collection to rename. |
to.ns |
(string) The new namespace of the collection. |
Note that this may also be used to move a collection from one database to another.
TRUE if successful; otherwise, FALSE.
mongo.drop.database
,
mongo.drop
,
mongo.command
,
mongo.count
,
mongo.
1 2 3 4 5 6 | mongo <- mongo.create()
if (mongo.is.connected(mongo)) {
print(mongo.rename(mongo, "test.people", "test.humans"))
mongo.destroy(mongo)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.