MongoClient.connect(uri).then(function (client) {
const db = client.db('local');
const coll = db.collection('oplog.rs');
const q = coll.find(query, {
tailable: true,
awaitData: true,
oplogReplay: true,
noCursorTimeout: true,
numberOfRetries: Number.MAX_VALUE
});
const changeStream = q.stream(); ///// the stream !
});
that q.stream() call should return one of these:
export class Cursor<T = Default> extends Readable {}
MY QUESTION IS:
that stream seems to send Objects to event handlers.
Is there a way to get raw string data, like JSON instead of JS objects?
Perhaps there is another option I can pass to the coll.find options?
e.g. {raw:true}