gets ids of items in the specified range
If called without parameters the method returns all items from the datastore.