Implement Collection::find()

XMLWordPrintableJSON

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

      Although the filter argument is listed explicitly in the signature, it is still optional. It was not included in the options array to allow for BC, since most drivers currently take it as the first parameter.

      Usage example:

      $collection->find(
          // Optional criteria param, which we allow as the first positional argument for BC
          ['x' => 1],
          // Optional named params in an associative array (BC break, projection in 1.x)
          ['limit' => 10]
      );
      
      $collection->find(
          // Optional criteria param, which we allow as the first positional argument for BC
          [],
          // Optional named params in an associative array (BC break, projection in 1.x)
          [
              'skip' => 20,
              'sort' => array("firstName" => 1),
              'modifiers' => array('$showDiskLoc' => true),
          ]
      );
      

              Assignee:
              Hannes Magnusson (Inactive)
              Reporter:
              Jeremy Mikola
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: