mongodb - Find collection names in mongo -


there 20 different collections in mongodb, , count might increase more.

is there way find out list of collection name start lets "type_"? if not, there way execute query against collection name starts "type_" ?

to knowledge db.getcollectionnames() cannot used returns collections

i think work:

db.getcollectionnames().filter(function (c) { return c.indexof('type_') == 0; })  

it might possible in 3.0 without function, see here


Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -