colldb() = collection() | {database(), collection()}
collection() = binary() | atom()
database() = binary() | atom()
message() = notice() | request()
notice() = #insert{collection = colldb(), documents = [map() | bson:document()]} | #update{collection = colldb(), upsert = boolean(), multiupdate = boolean(), selector = mc_worker_api:selector(), updater = bson:document() | mc_worker_api:modifier()} | #delete{collection = colldb(), singleremove = boolean(), selector = mc_worker_api:selector()} | #killcursor{cursorids = [mc_worker_api:cursorid()]} | #ensure_index{database = database(), collection = colldb(), index_spec = any()}
A request is a syncronous message sent to the server (reply expected)
reply() = #reply{cursornotfound = boolean(), queryerror = boolean(), awaitcapable = boolean(), cursorid = mc_worker_api:cursorid(), startingfrom = integer(), documents = [map()]}
message id
request() = #query{database = database(), collection = colldb(), tailablecursor = boolean(), slaveok = boolean(), sok_overriden = boolean(), nocursortimeout = boolean(), awaitdata = boolean(), skip = mc_worker_api:skip(), batchsize = mc_worker_api:batchsize(), selector = mc_worker_api:selector(), projector = mc_worker_api:projector()} | #getmore{collection = colldb(), batchsize = mc_worker_api:batchsize(), cursorid = mc_worker_api:cursorid()}
A reply to a request
requestid() = integer()
dbcoll/2 | Concat db and collection name with period (.) in between. |
put_message/3 | |
get_reply/1 |
dbcoll(Db::database(), Coll::colldb()) -> bson:utf8()
Concat db and collection name with period (.) in between
put_message(Db::mc_worker_api:database(), Insert::message(), RequestId::requestid()) -> binary()
get_reply(Message::binary()) -> {requestid(), reply(), binary()}
Generated by EDoc