mogno export+import uses EJSON

This commit is contained in:
Jan Prochazka
2024-08-26 15:09:44 +02:00
parent 62de736bce
commit d54b47f713
2 changed files with 18 additions and 2 deletions

View File

@@ -1,5 +1,6 @@
const ObjectId = require('mongodb').ObjectId;
const { getLogger } = global.DBGATE_PACKAGES['dbgate-tools'];
const { EJSON } = require('bson');
const logger = getLogger('mongoBulkInsert');
@@ -26,7 +27,7 @@ function createBulkInsertStream(driver, stream, pool, name, options) {
...row,
};
}
writable.buffer.push(row);
writable.buffer.push(EJSON.deserialize(row));
};
writable.checkStructure = async () => {