mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-28 17:36:00 +00:00
mongoid fix
This commit is contained in:
@@ -9,7 +9,7 @@ const Cursor = require('mongodb').Cursor;
|
|||||||
const createBulkInsertStream = require('./createBulkInsertStream');
|
const createBulkInsertStream = require('./createBulkInsertStream');
|
||||||
|
|
||||||
function transformMongoData(row) {
|
function transformMongoData(row) {
|
||||||
return _.mapValues(row, (v) => (v && v.constructor && v.constructor.name == 'ObjectID' ? { $oid: v.toString() } : v));
|
return _.mapValues(row, (v) => (v && v.constructor == ObjectId ? { $oid: v.toString() } : v));
|
||||||
}
|
}
|
||||||
|
|
||||||
function readCursor(cursor, options) {
|
function readCursor(cursor, options) {
|
||||||
|
|||||||
Reference in New Issue
Block a user