Discussion:
[dart-misc] New version of mongo_dart with couple of breaking changes
Vadim Tsushko
2015-09-06 10:55:14 UTC
Permalink
Hi dartisans

I've just published mongo_dart 0.2.1 (with last published version 0.1.48)
There is couple of breaking changes in that version so if you are using
mongo_dart
please read notes below and decide should you temporarily opt out from that
version by setting upper limit for mongo_dart dependency to < 2.0.0

- Breaking change: DbCollection `find` method now returns Stream<Map> instead of Cursor.
Cursor have had compatible with Stream<Map> `toList` and `forEach` quite some time already, so in case you used these methods only,
you should be covered. On the other hand if you used `find().stream` to get a stream it is not valid anymore. In that case you
should change your code to plain `find()`
- Breaking change: This version use upgraded version of `bson`. `ObjectId.toJson` now converts `ObjectId` to simple hex string representation.
Earlier it was something like `ObjectId('a29d3ae24...aa')` New behaviour would be more useful when you serialize `bson` map to json be default
conversion. With new behaviour serialized ObjectId value could be passed to `ObjecdId.parse` method.
But if your code currently depends on old behaviour (if you now use something like `id.substring(10, 34)` to get hex part of the
string representation, you should change your code.
--
For other discussions, see https://groups.google.com/a/dartlang.org/

For HOWTO questions, visit http://stackoverflow.com/tags/dart

To file a bug report or feature request, go to http://www.dartbug.com/new

To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
Tristan Caron
2015-09-06 13:12:49 UTC
Permalink
Yeah ! Thank you!
Post by Vadim Tsushko
Hi dartisans
I've just published mongo_dart 0.2.1 (with last published version 0.1.48)
There is couple of breaking changes in that version so if you are using
mongo_dart
please read notes below and decide should you temporarily opt out from
that version by setting upper limit for mongo_dart dependency to < 0.2.0
- Breaking change: DbCollection `find` method now returns Stream<Map> instead of Cursor.
Cursor have had compatible with Stream<Map> `toList` and `forEach` quite some time already, so in case you used these methods only,
you should be covered. On the other hand if you used `find().stream` to get a stream it is not valid anymore. In that case you
should change your code to plain `find()`
- Breaking change: This version use upgraded version of `bson`. `ObjectId.toJson` now converts `ObjectId` to simple hex string representation.
Earlier it was something like `ObjectId('a29d3ae24...aa')` New behaviour would be more useful when you serialize `bson` map to json be default
conversion. With new behaviour serialized ObjectId value could be passed to `ObjecdId.parse` method.
But if your code currently depends on old behaviour (if you now use something like `id.substring(10, 34)` to get hex part of the
string representation, you should change your code.
--
For other discussions, see https://groups.google.com/a/dartlang.org/

For HOWTO questions, visit http://stackoverflow.com/tags/dart

To file a bug report or feature request, go to http://www.dartbug.com/new

To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.
Loading...