x = my_objects[534]
Right now, that wouldn't work properly, it would only work if you iterated to 534 using, for instance (case 2):
x = nil
i = 0
my_objects.each do |y|
x = y
break if i == 534
i += 1
end
That would correctly give you the 534th object in the results and this is also how we'd have to handle case 1 internally since SimpleDB doesn't have any support for starting the results at a certain point. And this would obviously apply to paging, for instance (case 3):
my_page = my_objects.paginate(6, 100) # that's page 6, 100 per page
my_page would then be an array of results indexed at 500 - 599.
Internally, it would be something similar to case 2, iterating/materializing the objects up to 600, then returning the subset of 500-599.
Travis