Skip to content

Optionally return cursor for table `results` value

Compare
Choose a tag to compare
@rsinger rsinger released this 07 Sep 16:51
· 35 commits to master since this release
8d8106d

This release introduces a couple of new options for \Tripod\Mongo\Composites\Tables->getTableRows():

  • returnCursor => true: will return a \MongoDB\Driver\Cursor as the value of the results property.
  • includeCount => false: will skip getting a total hit count - avoids a performance hit if returning all results via a cursor - the actual individual results returned are identical to returning them as an array
  • documentType => '{some BSONUnserializable class}': gives the ability to rewrite the table row documents as returned from the cursor, so no post-processing is necessary.