Module mc_connection_man

mongo client connection manager processes request and response to|from database.

Copyright © (C) 2014, <COMPANY>

Authors: tihon.

Description

mongo client connection manager processes request and response to|from database

Data Types

colldb()

colldb() = collection() | {database(), collection()}

collection()

collection() = binary() | atom()

cursor()

cursor() = pid()

database()

database() = binary() | atom()

query()

query() = #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()}

selector()

selector() = map() | bson:document()

Function Index

read/2
read/3
read_one/2
command/2
command/3
database_command/3
database_command/4
request_worker/2

Function Details

read/2

read(Connection::pid() | atom(), Request::query()) -> [] | {ok, pid()}

read/3

read(Connection::pid() | atom(), Request::query(), CmdBatchSize::undefined | mc_worker_api:batchsize()) -> [] | {ok, pid()}

read_one/2

read_one(Connection::pid() | atom(), Request::query()) -> undefined | map()

command/2

command(Connection, Query) -> any()

command/3

command(Connection, Command, IsSlaveOk) -> any()

database_command/3

database_command(Connection::pid(), Database::database(), Command::selector()) -> {boolean(), map()} | {ok, cursor()}

database_command/4

database_command(Connection::pid(), Database::database(), Command::selector(), IsSlaveOk::boolean()) -> {boolean(), map()} | {ok, cursor()}

request_worker/2

request_worker(Connection::pid(), Request::mongo_protocol:message()) -> ok | {non_neg_integer(), [map()]}


Generated by EDoc