- Fixed case insensitive flag in match operator (it was true instead of false and viceversa)
- Change event improvements see Pull Request #373
- X509 Authentication
- LegacyUuid class. It allows to manage Binary Subtype 3 Bson types (Uuid Old). The class holds the value in the storing format, some helpers are available for converting back an forth this value based on the known algorithms: java Legacy, C# legacy and Python.
Updated Bson, Mongo_dart_query and Uuid dependencies, this leads to a series of Breaking changes. Please, see the respective github pages for details, here a recap of the most noticeable:
- BSON classes are mainly used for internal use. See the Bson github site for more details
- BsonRegexp now it is normally not needed, use RegExp instead.
- BsonNull is not needed, you can use null directly.
- A new JsCode class has been created, it is no more needed the use of BsonCode.
- a DbRef class has been created. The old version was storing DbPointer and DbRef the same way. Now they are separated as in Bson specification. If you have old data, please consider this change.
- Uuid dependency has been updated and you have to consider that the UuidValue class has been slightly changed. The .fromString constructure must be used mainly instead of the default one. Check the Uuid package github site for details.
- Example for admin command
- Fix for listDatabases() method for new releases
- Fix on ConnectionPool
- Test for SetWindowFields (inherited from mongo_dart_query)
- Added extra data parameter to GridIn class
- Added a
delete()
method toGridOut
class - Added a
toFile()
method toGridOut
class (allows to write safely on disk - adds a(n)
suffix if the file already exists) - Added a
clearBucket()
method to classGridFs
- Added a
dropBucket()
mehthod to classGridFs
- Fixed an issue on
GridFsFile
numChunks()
method
- Fixed an issue on GridFs
save()
method using MongoDb 6.0 - Possible breaking change. The cursorId has been changed from type BsonLong to type Int64. In general all BsonLong fields received from the server now are received as Int64 instead of int (see Bson package)
- authSourceDb defaulted to 'admin' in case neither the default Db nor the authSourceDb has been specified
- Fixed a regression bug using MongoDb-CR authMethod
- Fixed bug preventing pre 3.6 releases to work with mongo_dart
- inherited fro Bson: Moving to the most recent version of the
Rational
class, a Breaking change had been introduced. We have decided to substitute theRational
class with theDecimal
one, because the latter, that it is a wrapper around the former, contains more user friendly methods. You can always get aRational
instance, if needed, calling thetoRational()
method of theDecimal
class. - a connection error condition was throwing the natural number "e" instead of the error text
- connection_pool:
_DbFactory
renamedDbFactory
- connection:
_ServerCapabilities
renamedServerCapabilities
- connection_manager:
_ConnectionManager
renamedConnectionManager
- Lint fixes
- The folder lib\src\database\commands\aggreagation_commands has bin renamed into lib\src\database\commands\aggregation_commands
- created
modernCount
method - OP_MSG commands added:
Drop
,DropDatabase
andListCollections
Db.runCommand()
dropIndex()
- The
unionWith
stage has been added to the AggregationPipelineBuilder. unionWith
examples added in example/manual/aggregate
- Updating the dependencies, the
Decimal
class substitutes theRational
one. Inherited from BSON package. It seems that theRational
class has been designed more like a "core" class and theDecimal
one (that is a subclass) is for everyday use. You can alway get aRational
instance from aDecimal
calling the methodtoRational()
.
Now using Lints instead of Pedantic
Fixed Warnings and Lints for pub evaluation.
- Fixed misleading error message if the database name was not specified in the connection string
- As the mongo shell assumes
test
if no database is specified, we will do the same. This could be a potential breaking change in some situations.
- Fixed a problem in
Timestamp
class so that seconds and increment were inverted in reading from db. - Decoupled the
Timestamp
class from the newly createdBsonTimestamp
one.
-
Added SCRAM-SHA-256 authentication mechanism If no authentication mechanism is set, as a first try the driver analyze the server response that returns the available scram mechanisms for the required user, otherwise, SCRAM-SHA-256 is set starting from release 4.0.
BREAKING CHANGE Incidentally a potential breaking change has been introduced. If there is any problem during authentication, in previous versions a map containing the error message was thrown. Now a MongoDartError object is thrown.
Please NOTE By default the driver automatically sets SCRAM-SHA-256 if the server release is equal or greater to 4.0. Unfortunately Atlas does not yet support SHA-256, and does not return informations about the supported authentication mechanisms for the user, so the driver, when detects the connection error, automatically downgrades to SHA-1 If you want to avoid the first attempt, you can set the autentication mechanism to SHA-1 in the connection string.
- Removed deprecated MD5 calculation in GridFs
- Fix in README. There was a wrong example on how to call the replaceOne method.
- changed documentation references, now pointing directly on GitHub
- Fixed problem with tls CAFile parameter if passed more than once.
- Documentation and examples
- Example of cursor use.
- Created cursor.batchSize variable
- Fix on setting operation batchSize to zero
- Null-safety port - first step
- Uuid fields (UuidType class)
- $mul operator in ModifierBuilder
- Added tls client and server certificate management
- Created method .onlyFirst() in class ModernCursor
- distinct()
- reorganized folder with new commands
- more examples and docs
- Renamed DeleteRequest classes as DeleteStatement
- updateOne(), replaceOne() and updateMany()
- modermFindAndModify()
- bulkWrite()
- watch()
- all crud methods have been modified to call the modern version if MongoDb has a version of 3.6 or greater.
- DbCollection.deleteOne()
- DbCollection.deleteMany()
- The hidden class
_Connection
has been renamedConnection
. If you have already your own Connection class may be that they conflict. In this case, you shoul hide theConnection
class while importing MongoDart in your sources. Ex.dart import 'package:mongo_dart/mongo_dart.dart' hide Connection;
- OP_MSG operations and commands. See the README file.
- Decimal128 Type (inherited from BSON enhancements)
- Test for text index.
- Fix problem wit "OPENING" state in db. When a socket error happened during opening, the state was't resetted so that any new
db.open()
attempt failed. - Closing a db when the connection socket was null threw error.
- Changed the way the socket error is thrown on
db.open()
: All errors detected are collected.- If after all the attempts the master connection is not on, an error is thrown relative to the the first server tested. This for compatibility reason with the previous way the message was thrown.
- If the master connection is on, the errors are logged as warning.
- The socket error message has been changed to comprehend also the address of the server, so it is easier to identify the problem.
- If an authentication error occurs, the relative socket is closed.
- New
isConnected
Db
getter. It returnstrue
if the state of the database is open and at least the primary connection is on. - db._masterConnectionVerified() now throws an explicit error if the db state is not OPEN (it was throwing a
NoSuchMethodError
).
- New
Db
constructor (Db.create()
) that accepts also the url in DNS Seedlist Connection Format (mongodb+srv://
)
- Secure Connection
- The connection string now accepts more than one server.
- Before: only mongodb://www.example.org/test.
- Now it can be: mongodb://www.example.org,www1.example.org,www2.example.org/test
- It is equivalent to: db.pool([mongodb://www.example.org/test, mongodb://www1.example.org/test, mongodb://www2.example.org/test]);
- Added an "uriList" getter in "Db" class.
- Lint clean-up
- Fix - socket error on connect was not catched
- Better management of socket error.
Fixes problems with createIndex method.
Breaking changes:
- The name of the index is now created without the leading underscore (Ex. creating an index on key "a", in the old version created an index named "_a_1", now the name will be "a_1").
- The minimum dart sdk version required has been raised to 2.5.2
Changes List:
- New message (called ModernMessage). This has been tested for createIndex() only, and could be the base for moving all operations and commands from the old messages to this new one. Gradually ;-)
- A new method createIndex() has been created in the DbCollection class. This only works starting from 3.6. By default the result of the call is a little different form the old one (no getLastError() call is needed). For compatibility reasons I introduced a new parameter (modernReply), if set to false, it performs a getLastError() and returns the same way as the old method.
- The original createIndex method in Db class has been changed in order to call the new one (with modernReply: false) if the release is at least 3.6.
- The original MongoMessage has been split into two. The response part (Called MongoResponseMessage) now is the super class of MongoReplyMessage and MongoModernMessage.
- Some WriteConcern instances have been deprecated.
- A new "ServerStatus" message has been created. It is called when the connection is opened, and some values are stored if needed. The method is called ServerStatus() (in Db class) and returns a Map with all available status information. This method is only available from 3.6. on.
- An experimental "InsertOne" method has been created (only from 3.6).
- A MongoDbNamespace and a ReadPreference class have been created, mainly for future use.
- New tests.
- The Pedantic package has been included as a dev_dependency. The analysis.yaml has been updated to a more recent format, also including the pedantic package (default set of Google lint rules).
- Upgraded to
mongo_dart_query
0.4.1
. The update adds aggregation pipeline builder.
- Updates for Dart 2.5 compatibility. As of Dart 2.5, the
Socket
class emitsUint8List
, rather than plainList<int>
, so some fixes were necessary to allow the package to continue to function.- Courtesy of @a14n, thank you!
- Resolves #160, among other issues.
- Upgraded
uuid
constraint to^2.0.0
.
- Added
cursor
option toDbCollection.aggregate
. - Added "Tobe O" to authors in
pubspec.yaml
.
- Cast fixes, for compatibility with Dart 2.
- Moved from
dart:convert
usage topackage:dart2_constant
, for the sake of backwards compatibility.
- Changed the signature of
DbCollection.remove
; itsselector
parameter is now required, whilewriteConcern
is now a named optional parameter.
Future remove(selector, {WriteConcern writeConcern});
Resolves #73.
- Strong mode compliance. Preparing for Dart 2.0
- Fix bad type in _Connection class
- Minor changes, commented out code removed
- Big chunk of tests was commented out in 0.2.6 by error. All tests restored.
- update for new sdk (with 1.17.0 [MongoMessageHandler] was broken in checked mode)
- upgrade to current version of
crypto
package, and it's new (Converter based) API
- Fixed markdown for pub.
- Moved mongo_dart project to a new organization on GitHub.
- Authentication schemes now use Secure Random coming from
dart:math
since 1.14. Note that this version now required SDK version >= 1.14 because of this - Added sort by text score to the query builders.
- SCRAM-SHA1 authentication scheme added by Joel Trottier-Hebert. Random string (salt) is generated
with standard dart Random, which is not cryptographically strong for now, hence beta marker on version.
Secure Random is due in the next version of SDK, so that would be improved soon. - SCRAM-SHA1 scheme used as a default while driver is connected to mongodb 3.0, MONGODB_CR used otherwise.
authMechanism
connection string option can be used to override these defaults. authSource
connection string option added See: https://github.com/vadimtsushko/mongo_dart/issues/72- Many refactorings in tests and code with async/await done by Joel Trottier-Hebert
- Dependency on
logging
package loosen to >=0.9.1 <0.12.0
- Small bump up in dependencies
- Swithed to travis from drone.io
- Can use null-aware operators in example (blog)
- Loosening parameter type in CursorStream in accordance with sdk 1.13.0
- README update with basic usage
- Fix issue 71 - Logger allocates lot of strings
- Breaking change: DbCollection
find
method now returnsStream<Map>
instead of Cursor. Cursor have had compatible withStream<Map>
toList
andforEach
quite some time already, so in case you used these methods only, you should be covered. On the other hand if you usedfind().stream
to get a stream it is not valid anymore. In that case you should change your code to plainfind()
- Breaking change: This version use upgraded version of
bson
.ObjectId.toJson
now convertsObjectId
to simple hex string representation. Earlier it was something likeObjectId('a29d3ae24...aa')
New behaviour would be more useful when you serializebson
map to json be default conversion. With new behaviour serialized ObjectId value could be passed toObjecdId.parse
method. But if your code currently depends on old behaviour (if you now use something likeid.substring(10, 34)
to get hex part of the string representation, you should change your code.
- compatibility with MongoDB 3.0 and WiredTiger. New
db.getCollectionNames()
,db.getCollectionInfos()
,collection.getIndexes()
methods, backward compatible with earlier versions of MongoDb. collectionsInfoCursor
,listCollections
,indexInformation
methods of Db deprecated- use
test
instead ofunittest
package - add code coverage metrix with coveralls.io
- Save method use
upsert
flag in accordance with mongodb docs
- Remove validation for index keys.
- Tailable cursor support added by sestegra. See tailable_cursor.dart in example directory.
- Preliminary support for streaming in Aggregate framerork. Added method
aggregateToStream
- Added getBuildInfo command
- Additional checks and descriptive error message against opening db in opening state, additional tests
- Additional checks and descriptive error message against querying closed db
- Better error handling when a connection with the database is lost. Thanks to luizmineo PR 50.
Future(List<String>) listCollections()
helper added to DbFuture(List<String>) listDatabases()
helper added to Db
- Better error handling. Bugfix for issue 49
- Initial support for replica set added by sestegra
- Change log made compatible with pub site preferences, thanks to Andreas Olund.
- API docs generation set up as hop task.
- Optimization in networking protocol: insert, update and remove commands now sent in one packet with subsequent getLastError(). See https://github.com/vadimtsushko/mongo_dart/issues/41 Speedup on operations with default WriteConcern:ACKNOWLEDGED vary from 50% and more. Many thanks to https://github.com/tomaskulich
- Ready for Dart 1.0
- adding multiupdate support
- Upgrade for Dart SDK version 0.8.10.3_r29803
- Meta lib removed.
- Upgrade for braking changes in dart:async (StreamEventTransformed removed from API). Ready for Dart SDK version 0.8.5.1_r28990
- Version contraints removed from pubspec
- Merge pull request from analogic. Added Future to save and removed unnecessary completers
- Bugfix for count() method
- New sample added. Readme rewritten.
- Network data packets to MongoDb messages conversion refactored.
- each() method is deprecated in favor of foEach(), so Cursor have more stream-like interface.
- stream getter added to Cursor. After deprecation period find() will return
Stream<Map>
instead of Cursor
- Added support for modifier builder for field level updates. See example/update.dart and testFieldLevelUpdateSimple
- Updgrate for Dart SDK version 0.6.3.3_r24898 (? operator removed)
- Paul Evans added raw aggregate operation
- Paul Evans added distinct operation
- Upgrade for Dart SDK version 0.5.13.1_r23552
- Query API supports logical AND and OR operators.
- Bugfix to fields() issue. Fields clause in find(), findOne() methods did not work. Relevant test and sample (in example/query.dart) added
- Update for changed SelectorBuilder
- mongo_dart_query published separately and added as dependency to mongo_dart. Unified SelectorBuilder will be used by mongo_dart and objectory.
- Bson library published separately and added as dependency to mongo_dart
- Upgrade in Bson for changed implementation of dart:typeddata in Dart SDK version 0.5.0.1_r21823.
- Upgrade for M4.
- Switch from dart:scalarlist to dart:typeddata. Logging updated to new API.
- Bug fix on Issue 18 about db.ensureIndex
- Bug fix for unitialized BsonPlatform
- Bug fix for MongoMessage header curruption
- Support for dart SDK version 0.4.2.5_r20193
- Support for Dart Editor version 0.4.1_r19425
- GridFS refactored, now works on all old and added tests.
- GridFS still broken, but in this version there is no malformed types from previous dart:io version
- Support of dart:io version 2. (Stream-based).
- WriteConcern introduced. Db.open method has writeConcern param, as individual modifying operations. Default writeConcern = WriteConcern.AKNOWLEDGED
- writeConcern parameter replaced safeMode parameter on modifying operations
- GridFS not yet ported to dart:io version 2.
- Fixed bug in limit functionality. Corresponding test added.
- M3 ready. Run on version 0.3.1.1_r17328
- New syntax cleanUp. Next revisions will be published on pub.dartlangl.org. No more need to use git dependency for dependend application.
- Ted Sander joined project and added initial support of GridFS functionality
- Fixed bux in database_tests.dart (Process did not ends cleanly)
- Sdk package dependencies moved to pub.dartlang.org
- new syntax changes
- Selector API changed
- modifier_builder added
- Repairing incomplete commit v0.0.5
- DbCollection's update and insert methods got optional *safeMode- parameter
- $err field set in MongoDB result object raises Error in mongo_dart
- Db got createIndex and ensureIndex methods
- Feature checklist added.
- code updates for SDK r14458
- Changes reflecting dart lib changes - methods to getters, such as String.charCodes(), Map.getKeys() and so on
- New rules for optional function parameters applied
- Tests reworked. Got rid of asyncTest. Use expectAsync1 within future chain() and then() methods.