Skip to content
This repository has been archived by the owner on Nov 11, 2020. It is now read-only.

Command method refactoring #122

Merged
merged 18 commits into from
Aug 12, 2013
Merged

Command method refactoring #122

merged 18 commits into from
Aug 12, 2013

Conversation

jmikola
Copy link
Member

@jmikola jmikola commented Aug 7, 2013

Summary of changes:

  • Command methods now throw ResultException on error.
  • group() now returns an ArrayIterator of its actual results -- not the full command response. See ArrayIterator should also store the full command result #125 for an outstanding feature so ArrayIterator can ultimately include the full command response, too.
  • Ensure all mapReduce() options are prepared as MongoCode objects (where applicable)
  • Handle external database output for mapReduce().

jmikola added 18 commits August 12, 2013 16:00
Moved the test back to the unit test suite, since it didn't need to be a functional test.
Currently, this constraint is only used in QueryTest
This avoids an issue with an API change in the driver and makes the group() method more consistent with other command wrappers.
The group command seemed to require this, but there is no harm in doing it for all command options that are expected to be documents.
Before PHP 5.4, checking a string offset on a string variable might return true. Avoid this by expecting an array before we check anything.

See: http://php.net/manual/en/function.isset.php
jmikola added a commit that referenced this pull request Aug 12, 2013
Command method refactoring
@jmikola jmikola merged commit 505e550 into master Aug 12, 2013
@jmikola jmikola deleted the commands branch August 12, 2013 21:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant