Inline aggregation result documents should be lazily cast to arrays

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Won't Fix
    • Priority: Major - P3
    • None
    • Affects Version/s: 0.2.0
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Currently, aggregate() does the following:

      return new \ArrayIterator(array_map(
          function (\stdClass $document) { return (array) $document; },
          $doc["result"]
      ));
      

      Ideally, we should have a common synthetic Cursor object, which lazily casts stdClass instances into arrays for consistency with the driver's Cursor object. We can later investigate if support type maps (albeit in userland) would be possible.

            Assignee:
            Jeremy Mikola
            Reporter:
            Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: