MongoX v0.2.0 Mongo.Connection
A connection process to a MongoDB server.
Summary
Functions
Callback implementation for c:Connection.code_change/3
Executes a find query you can pass opts[:timeout] when it’s not set it will default to 5000 milliseconds
Starts the connection process
Stops the connection process
Callback implementation for c:Connection.terminate/2
Functions
Executes a find query you can pass opts[:timeout] when it’s not set it will default to 5000 milliseconds
Specs
start_link(Keyword.t) :: GenServer.on_start
Starts the connection process.
Options
:hostname- Server hostname (Default: “localhost”):port- Server port (Default: 27017):database- Database (required);:username- Username:password- User password:backoff- Backoff time for reconnects, the first reconnect is instantaneous (Default: 1000):timeout- TCP connect and receive timeouts (Default: 5000):w- The number of servers to replicate to before returning from write operators, a 0 value will return immediately, :majority will wait until the operation propagates to a majority of members in the replica set (Default: 1):jIf true, the write operation will only return after it has been committed to journal - (Default: false):wtimeout- If the write concern is not satisfied in the specified interval, the operation returns an error