[Solved] How do I get the rawDatabase without a collection

I am currently using Collection.rawDatabase to get the raw database below Meteor (I am doing some aggregations, bulk operations, on the server).

    const MeteorCollection = new Mongo.Collection('my_collection')
    const rawDB = MeteorCollection.rawDatabase()

I was wondering how to get the rawDatabase directly without an existing Meteor Collection.

I dug around in the sourcecode and found it :slight_smile:
MongoInternals.defaultRemoteCollectionDriver().mongo.db

3 Likes