mapkyca@kylewm Just trying to debug export. It seems because getRecords() now returns a MappingIterator, it's not possible to simply test $results to see if it's finished (at least on mongo). Is there any reliable way to tell whether getRecords has finished?
kylewmmapkyca: where is it having trouble telling whether getRecords is finished? the mappingiterator is supposed to terminate when the cursor from Mongo terminates
kylewmI don't think it was strictly necessary to add MappingIterator. iirc, the result cursor is always realized into an array right away by the caller. but I added it because I didn't want to enforce that behavior in case someone in the future wants to grab only the first few results
mapkycayeah, I found the problem - patch sent. Basically mongo always returns a MongoCursor, so it wasn't possible to safely do a while ($results = ...->getRecords())