mongodb-erlang
mongodb-erlang copied to clipboard
Wrong type for `mc_cursor:next`?
The spec for mc_cursor:next/1
looks like this(https://github.com/comtihon/mongodb-erlang/blob/master/src/connection/mc_cursor.erl#L40):
-spec next(pid()) -> error | {bson:document()}.
and the bson:document()
is a tuple. It seems like what the cursor really returns is actually {map()}
which is also supported by the test cases https://github.com/comtihon/mongodb-erlang/blob/master/test/mc_worker_api_SUITE.erl#L257
Thanks, I'll check it out.