mongodb-erlang icon indicating copy to clipboard operation
mongodb-erlang copied to clipboard

Wrong type for `mc_cursor:next`?

Open larshesel opened this issue 5 years ago • 1 comments

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

larshesel avatar Oct 25 '18 08:10 larshesel

Thanks, I'll check it out.

comtihon avatar Oct 26 '18 13:10 comtihon