Is row_count ~= limit? Looking at the implementation, that's what it seems like.
What I don't see is a way to remove the limit. Given get_range_by_token returns an Iterator that pages through the results using buffer, having a row_count/limit doesn't seem required.
It seems like passing in NULL is somewhat handled (line 79 does === to distinguish null vs 0 for example). But, I think lines 119 and 189 need to be:
$this->row_count !== null && ($this->rows_seen > $this->row_count)
to prevent null => 0 => the test will always pass, terminating the iterator.
Otherwise, the client is forced to pass in a randomly large int to get "all rows", which seems wonky to me.
will