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