Make a constructor similar to MongoDB's cursor