Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-5391

Add Criteria#pluck_each method

    • Type: Icon: Improvement Improvement
    • Resolution: Duplicate
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • None

      Currently, the #pluck method returns all results at once as an array. This is problematic when working with large result sets.

      I'd like to have something like Criteria#each, where pluck results are progressively yielded as they are fetched from the database (using an Enumerator). I propose to call this method #pluck_each.

      I've started a draft PR here: https://github.com/mongodb/mongoid/pull/5332

            Assignee:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Reporter:
            shields@tablecheck.com Johnny Shields
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: