Commit Graph

5 Commits

Author SHA1 Message Date
Jeremy Mikola
b29c423fda PHPC-1057: Refactor option parsing for execute methods
Execute options are now parsed via php_array functions, which makes the options case-sensitive.

A helper function is now used to convert legacy options for the original three execute methods into an array. This simplifies option parsing in php_phongo.c.

Additionally, Manager methods now perform their own server selection, which means that execute functions in php_phongo.c can rely on a server_id being provided.

Tests have been updated to expect a serverId option when relevant (e.g. query opts). Additionally, error tests for execute methods have been improved so that invalid values for all known options are tested.
2017-12-18 12:11:57 -05:00
Jeremy Mikola
03af904b5d PHPC-1071: Report class name for unexpected object values
This only updates exceptions where object types are entirely unexpected. For instance, options that expect a BSON document (i.e. array or object) need not use this macro, as any object would be accepted.
2017-12-15 11:23:44 -05:00
Derick Rethans
87fbd007f0 PHPC-1042: Support options array for BulkWrite, Command, and Query execute methods 2017-11-27 16:21:58 +00:00
Jeremy Mikola
e2209d50b8 PHPC-689: Use mongoc_cursor_set_hint() for query/command execution
Test changes were necessary because mongoc_cursor_set_hint() forces the slaveOk flag (CDRIVER-903).
2016-04-29 14:32:09 -04:00
Jeremy Mikola
88307b440d PHPC-381: Server::executeQuery/Command() should take a read preference 2015-09-04 16:11:25 -04:00