The following changes have been made to classes/functions/methods of this extension.
Version | Function | Description |
---|---|---|
1.3.0 | MongoCollection::ensureIndex | The options parameter does no longer accept just a boolean to signify a unique index. Instead, this now has to be done with array('unique' => true). |
MongoCollection::insert | The options parameter does no longer accept just a boolean to signify a safe insert. Instead, this now has to be done with array('safe' => true). | |
MongoCollection::remove | The options parameter does no longer accept just a boolean to signify "justOne". Instead, this now has to be done with array('justOne' => true). | |
MongoCollection::update | The options parameter does no longer accept just a boolean to signify an upsert. Instead, this now has to be done with array('upsert' => true). | |
1.2.10 | Mongo::getHosts | Support for non-replicasets was added. The returned array elements now also include the hostname and port. |
1.2.7 | MongoCollection::batchInsert | The continueOnError flag has been added. |
1.2.5 | MongoGridFS::storeUpload | Changed second parameter to an array of metadata. Pre-1.2.5, the second parameter was an optional string overriding the filename. |
1.2.0 | Mongo::close | Before version 1.2.0 the driver would not use persistent connections by default, and all connections would be closed as soon as a MongoDB connection went out if scope. Since version 1.2.0 this is no longer the case and it is a bad idea to call close as you might end up overloading the server with connections under high load. |
Mongo::__construct | Removed the persist option, as all connections are now persistent. It can still be used, but it doesn't affect anything. "persist" If the connection should be persistent. If set, the connection will be persistent. The string representation of the value is used as an id for the connection, so two instances of Mongo that are initialized with array("persist" => "foobar") will share the same database connection, whereas an instance initialized with array("persist" => "barbaz") will use a different database connection. The "replicaSet" parameter now takes a string, not a boolean (although boolean is still accepted). | |
Mongo::__construct | Added the username and password options. | |
MongoCollection::ensureIndex | Added timeout option. | |
MongoCollection::insert | Added timeout option. | |
MongoCollection::remove | Added timeout option. | |
MongoCollection::save | Added timeout option. | |
MongoCollection::update | Added timeout option. | |
MongoDB::command | Added options parameter with a single option: timeout. | |
1.1.0 | MongoCursor::info | Added a number of other fields, including id (the cursor id), at (the driver's counter of which document is current), numReturned (the number returned by the server in the current batch), and server (which server the query was sent to—useful in conjunction with MongoCursor::slaveOkay). |
1.0.11 | MongoCollection::ensureIndex | MongoException will be thrown if index name (either generated or set) is longer than 128 bytes. |
MongoCollection::ensureIndex | "safe" will trigger master failover, if necessary. | |
MongoCollection::insert | Disconnects on "not master" errors if "safe" is set. | |
MongoCollection::remove | Disconnects on "not master" errors if "safe" is set. | |
MongoCollection::save | Disconnects on "not master" errors if "safe" is set. | |
MongoCollection::update | Disconnects on "not master" errors if "safe" is set. | |
1.0.10 | MongoCursor::info | Added started_iterating field, a boolean indicating if cursor is pre- or post-query. |
1.0.9 | Mongo::__construct | Added the replicaSet option. |
MongoCollection::batchInsert | Added ability to pass integers to "safe" options (only accepted booleans before) and added "fsync" option. | |
MongoCollection::insert | Added ability to pass integers to "safe" options (only accepted booleans before) and added "fsync" option. | |
MongoCollection::insert | The return type was changed to be an array containing error information if the "safe" option is used, otherwise it is a boolean as before. | |
MongoCollection::remove | The return type was changed to be an array containing error information if the "safe" option is used, otherwise it is a boolean as before. | |
MongoCollection::remove | Added ability to pass integers to "safe" options (only accepted booleans before) and added "fsync" option. | |
MongoCollection::save | Added ability to pass integers to "safe" options (only accepted booleans before) and added "fsync" option. | |
MongoCollection::update | The return type was changed to be an array containing error information if the "safe" option is used, otherwise it is a boolean as before. | |
MongoCollection::update | Added ability to pass integers to "safe" options (only accepted booleans before) and added "fsync" option. | |
1.0.7 | MongoCollection::count | Added limit and skip parameters. |
1.0.5 | MongoCollection::batchInsert | Added "options" parameter. |
MongoCollection::insert | Changed second parameter to an array of options. Pre-1.0.5, the second parameter was a boolean indicating the "safe" option. | |
MongoCollection::remove | Changed second parameter to an array of options. Pre-1.0.5, the second parameter was a boolean indicating the "justOne" option and there was no safe option. | |
MongoCollection::save | Added "options" parameter. | |
MongoCollection::update | Added "safe" option. | |
1.0.2 | Mongo::__construct | Changed constructor to take an array of options. Pre-1.0.2, the constructor took the following parameters: server The server name. connect Optional boolean parameter specifying if the constructor should connect to the database before returning. Defaults to TRUE. persistent If the connection should be persistent. paired If the connection should be paired. |
MongoCollection::ensureIndex | Changed "options" parameter from boolean to array. Pre-1.0.2, the second parameter was an optional boolean value specifying a unique index. | |
1.0.1 | MongoCollection::update | Changed "options" parameter from boolean to array. Pre-1.0.1, the second parameter was an optional boolean value specifying an upsert. |