- Merged PR #48: Extend error handling to include if a write was retried (@thekid)
- Fixed "undefined index primary" when no primary is available - @thekid
- Made compatible with XP 12 - @thekid
- Merged PR #44: Add
equals()
methods for wrapper classes - @thekid - Merged PR #45: Implement Collection
modify()
andremove()
via https://www.mongodb.com/docs/manual/reference/command/findAndModify/ (@thekid) - Fixed
upsert()
inconsistency withupdate()
anddelete()
in how it handles the query parameter (@thekid)
- Merged PR #43: Retry "Exception: not primary" when writing (fixes #42) (@thekid)
The second major release adds the possibility to pass additional options to all commands, including read preference as well as read and write concerns.
- Merged PR #40: Implement read and write concerns, implementing #11. See https://www.mongodb.com/docs/manual/reference/read-concern/ and https://www.mongodb.com/docs/manual/reference/write-concern/ (@thekid)
- Merged PR #41: Remove deprecated Collection::command(), superseded in
1.4.0 with the new
run()
method, see #21. (@thekid) - Merged PR #39: Refactor all methods to receive options varargs. Passing
additional options to methods such as find can be accomplished by
creating
Options
instances. (@thekid)
- Merged PR #38: Support authentication mechanism negotiation. This way, we default to using SCRAM-SHA-256 if the server supports it as mandated by the specification. (@thekid)
- Merged PR #37: Implement SCRAM-SHA-256 authentication. Implements #8 (@thekid)
- Merged PR #36: Introduce Commands class which keeps all messages on the
same connection, fixing #29 (Error: cursor id "..." not found). Note:
This changes the low-level internal API inside the
io
package! (@thekid)
- Merged PR #35: Return document properties by reference - @thekid
- Merged PR #34: Make it possible to omit regex modifiers - @thekid
- Introduced new base class
com.mongodb.CannotConnect
- @thekid - Merged PR #32: Fix DNS errors, fixing issue #31 - @thekid
- Merged PR #30: Migrate to new testing library - @thekid
- Added fix for #28 - reconnecting when using readPreference nearest fails with Undefined array key "" error. (@thekid)
- Merged PR #27: Handle errors from
dns_get_record()
- @thekid
- Merged PR #26: Add
MongoConnection::protocol()
- @thekid - Fixed IPv6 handling in connection DSNs - @thekid
- Merged PR #25: Implement
toString()
for collections and databases (@thekid)
- Changed error message when an empty or malformed DSN is passed to the
Protocol
class' constructor to better indicate what has gone wrong (@thekid)
- Merged PR #24: Add
Collection::upsert()
which calls the update command withupsert: true
. (@thekid)
- Added support for
socketTimeoutMS
parameter in connection string, defaulting to 60000 (1 minute, the default socket timeout). See https://www.mongodb.com/docs/manual/reference/connection-string/ (@thekid)
- Merged PR #23: Add
MongoConnection::run()
to run commands in the admin database, e.g. ping. (@thekid) - Merged PR #22: Add
Cursor::all()
. This is equivalent to iterating and storing all documents in an array but more concise. (@thekid) - Merged PR #21: Add
Collection::run()
to run commands. This deprecates the command method, which will be removed in a future release. (@thekid)
- Merged PR #19: Pick a random secondary, improving load distribution (@thekid)
- Fixed
com.mongodb.result.Cursor::first()
to raise a meaningful error message when cursor has been forwarded (@thekid) - Added
com.mongodb.result.Cursor::present()
to check whether a cursor represents a non-empty result (@thekid)
- Fixed reading large documents - @thekid
- Merged PR #17: Add support for MinKey and MaxKey types - @thekid
- Merged PR #16: Code support - @thekid
- Simplified EOF handling in
Connection::send()
- @thekid - Renamed Protocol class' connection() method to
dsn()
- @thekid
This first major release supports working with replica sets as well as with standalone MongoDB servers. There is no support for read and write concerns yet, and no support for client-side encryption.
- Fixed
com.mongodb.Decimal128
for large negative numbers - @thekid - Fixed
com.mongodb.NoSuitableCandidate::candidates()
- @thekid - Fixed equality comparisons for
com.mongodb.result.Cursor
- @thekid - Increased code coverage significantly by adding a variety of unittests (@thekid)
- Merged PR #15: Change streams: Watch databases and collections for changes. See https://docs.mongodb.com/manual/changeStreams/ (@thekid)
- Changed
Collection::update()
to update all documents the query finds in the same way delete() does. (@thekid)
- Merged PR #13: Implement multi-document transactions - @thekid
- Fixed operation errors causing reconnection - @thekid
- Normalized databases enumeration between MongoDB versions - @thekid
- Fixed
com.mongodb.MongoConnection::databases()
- @thekid - Fixed
com.mongodb.Database::collections()
- @thekid
- Implemented #9: Reconnect - according to specification, by checking a connection with the ping command if it has been not used for a defined number of seconds (defaulting to 5) (@thekid)
- Merged PR #10: Sessions. Adds support for passing sessions to all of the database and collection methods. (@thekid)
- Merged PR #5: Add support for mongodb+srv. This adds support for DNS seed lists, as well as reading from and writing to separate connections based on the read preference supplied. (@thekid)
- Changed implementation to raise
peer.ProtocolException
instead of low-level socket errors (@thekid)
- Fixed #6: Exception com.mongodb.Error (#40415:Location40415 "BSON field 'saslContinue.done' is an unknown field.") (@thekid)
- Fixed #7: Array to string conversion error in
Document::toString()
(@thekid)
- Made library compatible with XP 11 - @thekid
- Fixed PHP 8.1 compatibility for IteratorAggregate / ArrayAccess return type declarations (@thekid)
- Fixed issue #4: Cannot handle binary subtype 3 - @thekid
- Enable SSL/TLS if
ssl=true
ortls=true
is passed in the connection string parameters; implements feature request #2 (@thekid) - Made
params
forCollection::command()
optional - @thekid
- Added
Cursor::first()
to return the first document (or NULL). (@thekid) - Made
Collection::find()
also accept IDs to find single documents (@thekid) - Added
Collection::command()
to run arbitrary commands - @thekid - Simplified usage of collection methods
update()
anddelete()
(@thekid)
- Fixed reading to ensure we have enough bytes when reading packets (@thekid)
- Fixed error #22 (InvalidBSON) when using
NULL
values - @thekid
- Rewrote
count()
anddistinct()
to use aggregation pipelines. See https://docs.mongodb.com/manual/core/transactions/#count-operation and https://docs.mongodb.com/manual/core/transactions/#distinct-operation (@thekid)
- Added new methods
Collection::distinct()
andCollection::count()
(@thekid) - Added new method
Collection::aggregate()
to perform aggregations, see https://docs.mongodb.com/manual/reference/command/aggregate/ and https://docs.mongodb.com/manual/reference/operator/aggregation/lookup/ (@thekid) - Fixed all places where
_id
was assumed to always holdObjectId
s. (@thekid)
- Merged PR #1: Implement update operation. Currently supports update operator expressions, replacement documents and pipelines will be added later. (@thekid)
- Changed
insert()
to generate and return object IDs if not supplied in passed documents. Consistent with how most MongoDB drivers handle this, see https://docs.mongodb.com/manual/reference/method/db.collection.insert/#id-field (@thekid)
- Fixed large decimal128 number parsing from a string - @thekid
- Added
Decimal128
support as specified in http://bsonspec.org/spec.html (@thekid)
- Added
Database::collections()
method to list collections in a database (@thekid) - Added
MongoConnection::databases()
method which lists all databases (@thekid) - Added support for regular expression, UUID and timestamp types (@thekid)
- First public release - (@thekid)