mongo v0.5.4 Mongo.Db
Module holding operations that can be performed on MongoDB databases
Summary
Functions
Authenticates a user to a database
See auth/3
Check authentication
Executes a db command
See cmd/2
Executes a db command requesting imediate response
Gets collection default options
Returns a collection struct
Returns the error status of the preceding operation
See getLastError/1
Returns the previous error status of the preceding operation(s)
See getPrevError/1
Kill a cursor of the db
Creates %Mongo.Db{} with default options
Adds options to the database overwriting mongo server connection options
Resets error
See resetError/1
Functions
Authenticates a user to a database
Expects a DB struct, a user and a password returns {:ok, db} or %Mongo.Error{}
Executes a db command
Before using this check Mongo.Collection, Mongo.Db or Mongo.Server
for commands already implemented by these modules
Adds options to the database overwriting mongo server connection options
new_opts must be a map with zero or more of the following keys:
- read:
:awaitdata,:nocursortimeout,:slaveok,:tailablecursor - write concern:
:wc - socket:
:mode,:timeout