2
これらのクエリに違いはありますか?私はmongoがマップメソッドに渡されたjavascriptコードを、クエリが解決したときのマッピングとどう解釈するのか不思議です。cursor.map()。toArray()とcursor.toArray()。then(array => array.map())
db.collection('myCollection').find()
.map(document => document.value + 3)
.toArray();
対
db.collection('myCollection').find()
.toArray()
.then(array => array.map(document => document.value + 3));