From 8a49614c7ee8991d4737509358c25a61d19d2793 Mon Sep 17 00:00:00 2001 From: Tyler Brock Date: Mon, 14 May 2012 16:02:49 -0400 Subject: [PATCH] RUBY-437 Document batchSize better --- lib/mongo/collection.rb | 2 +- lib/mongo/cursor.rb | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/mongo/collection.rb b/lib/mongo/collection.rb index 1ad1bc7..5f0a01b 100644 --- a/lib/mongo/collection.rb +++ b/lib/mongo/collection.rb @@ -184,7 +184,7 @@ module Mongo # end of the query's execution. # For details see http://www.mongodb.org/display/DOCS/How+to+do+Snapshotting+in+the+Mongo+Database # @option opts [Boolean] :batch_size (100) the number of documents to returned by the database per - # GETMORE operation. A value of 0 will let the database server decide how many results to returns. + # GETMORE operation. A value of 0 will let the database server decide how many results to return. # This option can be ignored for most use cases. # @option opts [Boolean] :timeout (true) when +true+, the returned cursor will be subject to # the normal cursor timeout behavior of the mongod process. When +false+, the returned cursor will diff --git a/lib/mongo/cursor.rb b/lib/mongo/cursor.rb index 95af195..a1367a4 100644 --- a/lib/mongo/cursor.rb +++ b/lib/mongo/cursor.rb @@ -258,6 +258,9 @@ module Mongo # # Note that the batch size will take effect only on queries # where the number to be returned is greater than 100. + # + # This can not override MongoDB's limit on the amount of data it will + # return to the client. Depending on server version this can be 4-16mb. # # @param [Integer] size either 0 or some integer greater than 1. If 0, # the server will determine the batch size.