docs icon indicating copy to clipboard operation
docs copied to clipboard

docs unclear about `cursor.toArray()` behavior with large datasets

Open benjaminsteward opened this issue 7 years ago • 1 comments

This line in the description is a little misleading: 'Retrieve all results and pass them as an array to the given callback.'

https://rethinkdb.com/api/javascript/to_array/

I offer this up, because in the case of large datasets (it happened for me at 650+ rows), the callback will be called multiple times, until the data is finished processing. Perhaps the docs can reflect this nuance by adding the following line:

"In the case of large datasets, .toArray() callback may potentially be called multiple times as data is received from the cursor, which may cause errors."

benjaminsteward avatar May 24 '18 15:05 benjaminsteward

I'm pretty sure you're describing a bug. Are you positive you're seeing this?

srh avatar May 25 '18 04:05 srh