MongoDB: db.getMongo() method
db.getMongo
The db.getMongo() method is used to return the Mongo() connection object for the current connection.
Syntax:
db.getMongo()
Returns: The current database connection.
Example: MongoDB: db.getMongo() method
The following statement returns the connection object for the current connection.
Output:
> db.getMongo(); connection to 127.0.0.1
Retrieve the restaurants data from here
Previous:
db.getLastErrorObj() method
Next:
db.getName() method
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics