Description Usage Arguments Details Value See Also Examples
Drop a collection from a database on MongoDB server. This removes the entire collection.
1 |
mongo |
(mongo) A mongo connection object. |
ns |
(string) The namespace of the collection to drop. |
Obviously, care should be taken when using this command.
(Logical) TRUE if successful; otherwise, FALSE
mongo.drop.database
,
mongo.command
,
mongo.rename
,
mongo.count
,
mongo.
1 2 3 4 5 6 | mongo <- mongo.create()
if (mongo.is.connected(mongo)) {
print(mongo.drop(mongo, "test.people"))
mongo.destroy(mongo)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.