mongodb.md 逆引きmongodb バージョン3以降対象 環境系 認証 use <db_name> db.auth("<user name>", "<password") 参照系 コレクションの中身の一覧 db.<collection name>.find() インデックスの一覧 db.<collection name>.getIndexes() コレクションの一覧 db.getCollectionNames() ドキュメントの検索 db.foo.insert([{x:1}, {x:2}]) // {x:1}と{x:2}のドキュメントをfooに追加 db.foo.find({x:1}) // x == 1のドキュメントを検索 db.foo.insert({y:{z:1}}) // 内部ドキュメントのあるドキュメントを追加 db.foo.find({y: {z: 1}}) // y.
![逆引きmongodb](https://cdn-ak-scissors.b.st-hatena.com/image/square/1ef26f6cb4349557952890dbe3e567f7f98dc151/height=288;version=1;width=512/https%3A%2F%2Fgithub.githubassets.com%2Fassets%2Fgist-og-image-54fd7dc0713e.png)