Skip to content

Commit 66193e8

Browse files
committed
PHPC-224: Consolidate Result and Cursor classes into one
This class is now simply Traversable (no longer IteratorAggregate) and adds isDead() and getId() methods from the original Cursor class.
1 parent 34fff68 commit 66193e8

24 files changed

+252
-528
lines changed

config.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,11 +151,11 @@ if test "$MONGODB" != "no"; then
151151
";
152152
MONGODB_MONGODB_CLASSES="\
153153
src/MongoDB/Command.c \
154+
src/MongoDB/Cursor.c \
154155
src/MongoDB/CursorId.c \
155156
src/MongoDB/Manager.c \
156157
src/MongoDB/Query.c \
157158
src/MongoDB/ReadPreference.c \
158-
src/MongoDB/Result.c \
159159
src/MongoDB/Server.c \
160160
src/MongoDB/BulkWrite.c \
161161
src/MongoDB/WriteConcern.c \

config.w32

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ if (PHP_MONGODB != "no") {
99
EXTENSION("mongodb", "php_phongo.c");
1010
ADD_SOURCES(configure_module_dirname + "/src", "bson.c", "mongodb");
1111
ADD_SOURCES(configure_module_dirname + "/src/BSON", "Type.c Unserializable.c Serializable.c Persistable.c Binary.c Javascript.c MaxKey.c MinKey.c ObjectID.c Regex.c Timestamp.c UTCDatetime.c", "mongodb");
12-
ADD_SOURCES(configure_module_dirname + "/src/MongoDB", "Command.c CursorId.c Manager.c Query.c ReadPreference.c Result.c Server.c BulkWrite.c WriteConcern.c WriteConcernError.c WriteError.c WriteResult.c", "mongodb");
12+
ADD_SOURCES(configure_module_dirname + "/src/MongoDB", "Command.c Cursor.c CursorId.c Manager.c Query.c ReadPreference.c Server.c BulkWrite.c WriteConcern.c WriteConcernError.c WriteError.c WriteResult.c", "mongodb");
1313
ADD_SOURCES(configure_module_dirname + "/src/MongoDB", "Exception.c RuntimeException.c InvalidArgumentException.c ConnectionException.c AuthenticationException.c SSLConnectionException.c DuplicateKeyException.c ExecutionTimeoutException.c ConnectionTimeoutException.c WriteException.c WriteConcernException.c BulkWriteException.c", "mongodb");
1414
ADD_SOURCES(configure_module_dirname + "/src/contrib/", "php-ssl.c", "mongodb");
1515
ADD_SOURCES(configure_module_dirname + "/src/libbson/src/yajl", "yajl_version.c yajl.c yajl_encode.c yajl_lex.c yajl_parser.c yajl_buf.c yajl_tree.c yajl_alloc.c yajl_gen.c", "mongodb");

docs/crud.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ $query = new MongoDB\Driver\Query(array());
7575
try {
7676
/* Full namespace as the first argument (dbname.collname), and the query object
7777
* to execute as the second.
78-
* Returns MongoDB\Driver\Result on success, throws exception on failure
78+
* Returns MongoDB\Driver\Cursor on success, throws exception on failure
7979
*/
8080
$cursor = $manager->executeQuery("db.collection", $query, $rp);
8181

0 commit comments

Comments
 (0)