Uploaded image for project: 'PHP Driver: Library'
  1. PHP Driver: Library
  2. PHPLIB-6

Implement Collection::distinct()

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 0.1.0
    • Affects Version/s: None
    • Component/s: None
    • None

      The spec states that this should return an iterable. If we have no plans of distinct changing in the future (e.g. returning a cursor), then we can stick to an array return type (as with the current driver).

      Usage example:

      $collection->distinct(
          // Required field param
          'y',
          // Optional named params in an associative array (BC break, criteria in 1.x)
          [
              'criteria' => ['x' => 1],
              'maxTimeMS' => 2000,
          ]
      );
      

            Assignee:
            bjori Hannes Magnusson
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: