Description Usage Arguments Value See Also Examples
Get a list of collections in a database on a MongoDB server.
1 |
mongo |
(mongo) A mongo connection object. |
db |
(string) Name of the database for which to get the list of collections. |
(string vector) List of collection namespaces in the given database.
Note this will not include the system collection db
.system.indexes
nor the indexes attached to the database. Use mongo.find(mongo,
"db.system.indexes", limit=0L)
for information on any indexes.
mongo.get.databases
,
mongo.drop.database
,
mongo.drop
,
mongo.command
,
mongo.rename
,
mongo.
1 2 3 4 5 6 | mongo <- mongo.create()
if (mongo.is.connected(mongo)) {
print(mongo.get.database.collections(mongo, "test"))
mongo.destroy(mongo)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.