create cursor instanciator to avoid loading big dataset in memory
only StopIteration is not catch to keep iterator behavior