(Quick Reference)

Purpose

Provides access to the native MongoClient instance.

Examples

class FooController {

    MongoClient mongo

    def myAction() {
        MongoDatabase db = mongo.getDatabase("mongo")
        db.languages.insert([name: 'Groovy'])
    }
}

Description

See the API for the Mongo Java Driver for API usage info.