listAllCollections {TxRegInfra} | R Documentation |
list all collections in a database, using command-line interface
listAllCollections(url = "mongodb://127.0.0.1:27017", db = "test", lisproc = function(x) { ind = grep("MongoDB server", x)[1] x[-seq_len(ind)] })
url |
character(1) mongodb URL |
db |
character(1) mongodb database name |
lisproc |
a function that processes the reply to 'mongo ... –eval 'db.getCollectionNames()' to extract JSON, defaults to a function that removes all (header) records up to the one containing 'MongoDB server' |
vector of strings
if (verifyRunningMongodb()) listAllCollections()