国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

php - mongodb的命令 show collections
PHPz
PHPz 2017-04-11 10:25:17
0
3
332

mongodb的命令 show collections能不能像mysql一樣 show tables like '%xxx%'這樣使用?我試了,怎么都不行

PHPz
PHPz

學(xué)習(xí)是最好的投資!

reply all(3)
迷茫

除了以上方法外,還可以用db.getCollectionInfos()方法,它直接接受一個(gè)filter:

db.getCollectionInfos({name: /test/})
迷茫

show collections好像不能用這樣。但是你可以通過(guò) db.getCollectionNames獲得個(gè)數(shù)組,以后用javascript的filter選擇collections:

db.getCollectionNames().filter(function(el) {return el.indexOf('xxx') !== -1})
小葫蘆

db.getCollectionInfos({name:{$regex:'test'}})
與已采納的答案其實(shí)是一樣的

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template