mongo v0.5.4 Mongo.Request

Defines, encodes and sends MongoDB operations to the server

Summary

Functions

Builds a database command message composed of the command tag and its arguments

Builds a delete command message

Builds a get_more command message

Builds an insert command message

Builds a kill_cursor command message

Builds a query message

Builds an update command message

Functions

cmd(dbname, cmd, cmd_args \\ %{})

Builds a database command message composed of the command tag and its arguments.

delete(collection, selector, justOne)

Builds a delete command message

get_more(collection, batchsize, cursorid)

Builds a get_more command message

insert(collection, docs)

Builds an insert command message

kill_cursor(cursorid)

Builds a kill_cursor command message

query(find)

Builds a query message

  • collection: collection
  • selector: selection criteria (Map or nil)
  • projector: fields (Map or nil)
update(collection, selector, update, upsert, multi)

Builds an update command message