Copyright © (C) 2016, <COMPANY>
Authors: tihon.
collection() = binary() | atom()
cursor() = pid()
projector() = bson:document() | map()
selector() = map() | bson:document()
connect/4 | |
insert/3 | |
update/5 | |
delete/3 | |
find/4 | |
find/6 | |
find_one/4 | |
find_one/5 | |
count/4 | |
ensure_index/3 | Creates index on collection according to given spec. |
disconnect/1 |
connect(Type::atom(), Hosts::list(), TopologyOptions::proplists:proplist(), WorkerOptions::proplists:proplist()) -> {ok, pid()}
insert(Topology::atom() | pid(), Collection::collection(), Document::list() | map() | bson:document()) -> {{boolean(), map()}, list()}
update(Topology::atom() | pid(), Collection::collection(), Selector::selector(), Doc::map(), Opts::map()) -> {boolean(), map()}
delete(Topology::atom() | pid(), Collection::collection(), Selector::selector()) -> {boolean(), map()}
find(Topology::atom() | pid(), Collection::collection(), Selector::selector(), Projector::projector()) -> {ok, cursor()} | []
find(Topology::atom() | pid(), Collection::collection(), Selector::selector(), Projector::projector(), Skip::integer(), Batchsize::integer()) -> {ok, cursor()} | []
find_one(Topology::atom() | pid(), Collection::collection(), Selector::selector(), Projector::projector()) -> map() | undefined
find_one(Topology::atom() | pid(), Collection::collection(), Selector::selector(), Projector::projector(), Skip::integer()) -> map() | undefined
count(Topology::atom() | pid(), Collection::collection(), Selector::selector(), Limit::integer()) -> integer()
ensure_index(Topology::pid() | atom(), Coll::collection(), IndexSpec::bson:document()) -> ok | {error, any()}
Creates index on collection according to given spec. The key specification is a bson documents with the following fields: key :: bson document, for e.g. {field, 1, other, -1, location, 2d}, required
disconnect(Topology::atom() | pid()) -> ok
Generated by EDoc