With the below test(add to mongo_cursor_test) you can see that when you don't specify a batch count, or the batch count is specified as zero, then it only returns the first 101 items in the find query
test "Correct count is returned if more than 100 items are queried with no batch size specified or batchSize zero", ctx do
anycoll = ctx[:anycoll]
Mongo.Collection.drop anycoll
items = 1..110 |> Enum.map fn r -> %{a: r, value: r} end
Mongo.Collection.insert(items, anycoll)
assert ctx[:anycoll] |> Mongo.Collection.find |> Enum.to_list |> Enum.count == 110
assert ctx[:anycoll] |> Mongo.Collection.find |> Map.put(:batchSize, 0) |> Enum.to_list |> Enum.count == 110
end
With the below test(add to mongo_cursor_test) you can see that when you don't specify a batch count, or the batch count is specified as zero, then it only returns the first 101 items in the find query