Merge branch 'master' into develop

This commit is contained in:
Jan Prochazka
2022-10-13 11:02:40 +02:00
15 changed files with 134 additions and 34 deletions

View File

@@ -9,7 +9,9 @@ const AbstractCursor = require('mongodb').AbstractCursor;
const createBulkInsertStream = require('./createBulkInsertStream');
function transformMongoData(row) {
return _.mapValues(row, (v) => (v && v.constructor == ObjectId ? { $oid: v.toString() } : v));
return _.cloneDeepWith(row, (x) => {
if (x && x.constructor == ObjectId) return { $oid: x.toString() };
});
}
async function readCursor(cursor, options) {