Casbah (MongoDB Scala Driver) 2.1.0 Released

116 views
Skip to first unread message

Brendan W. McAdams

unread,
Mar 15, 2011, 2:41:45 PM3/15/11
to mongodb-ca...@googlegroups.com, mongod...@googlegroups.com, mongodb-...@googlegroups.com
Casbah, the official MongoDB Scala Driver, has released version 2.1.0.

This is primarily focused on providing support for Java Driver 2.5 (Which added a number of significant improvements to areas such as Replica Sets, and Casbah inherits these improvements with 2.1.0) and MongoDB 1.8 (Specifically, a new MapReduce API).

There are breaking changes in MapReduce, in that you are now required to specify an output collection.  

Also, due to issues raised by users in the 2.0 redesign of the type hierarchy of casbah-core, some further adjustments have been made there which may affect those declaring explicit types for Collection/DB/Cursor and/or those writing custom subtypes thereof.  Please review the code or email me for clarification.

As always, artifacts for this release. cross-built for Scala 2.8.0 and 2.8.1, have been published to the central Scala Maven repository at http://scala-tools.org/repo-releases/

Adding it to your dependency manager?  

You can add Casbah to Maven with the following dependency block.

Scala 2.8.0 users:

<dependency>
    <groupId>com.mongodb.casbah</groupId>
    <artifactId>casbah_2.8.0</artifactId>
    <version>2.1.0</version>
<dependency>

Scala 2.8.1 users:

<dependency>
    <groupId>com.mongodb.casbah</groupId>
    <artifactId>casbah_2.8.1</artifactId>
    <version>2.1.0</version>
<dependency>
You can add Casbah to Ivy with the following dependency block.
Scala 2.8.0 users:
<dependency org="com.mongodb.casbah" name="casbah_2.8.0" rev="2.1.0"/>
Scala 2.8.1 users:
<dependency org="com.mongodb.casbah" name="casbah_2.8.1" rev="2.1.0"/>

Finally, you can add Casbah to SBT by adding the following to your project file:

val casbah = "com.mongodb.casbah" %% "casbah" % "2.1.0"
Thanks to everyone who contributed to this release, especially the 10gen Java team, whose bugfixes and improvements significantly benefit Casbah as well.  Docs & Tutorial available at http://api.mongodb.org/scala/casbah/; Changelog Follows.

Casbah 2.1.0 / 2011-03-15

  • SCALA-22 Added a dropTarget boolean option to rename collection, which specifies behavior if named target collection already exists, proxies JAVA-238
  • Removed resetIndexCache, which has also been removed from the Java Driver
  • SCALA-21 Added "set metadata" method to match Java Driver (See Java-261)
  • SCALA-20 Updated to Java Driver 2.5

  • SCALA-21 - Update GridFS to use DBObject views. Holding back full bugfix until we have a 2.5 build to link against
  • Example adjustments to filter by start time and namespace
  • SCALA-10 - And this is why we unit test. Size was returning empty for cursor based results as it wasn't pulling the right value. Fixed, calling cursor.size.
  • Added an alternative object construction method for MongoDBObject with a list of pairs, rather than varargs [philwills]
  • Making scaladoc for MongoURI more explicit. Note that the wiki markup for lists isn't actually implemented in scaladoc yet. [philwills]
  • Refactor Collection and Cursors using Abstract types, explicit 'DBObject' version is always returned from DB, Collection etc now. Those wanting to use typed versions must code the flip around by hand. !!! BREAKING CHANGE, SEE CODE / EXAMPLES
  • SCALA-10 Updated MapReduce interfaces to finish 1.8 compatibility

    • Renamed MapReduceError to MapReduceException; MapReduceError is a non exception which represents a failed job
    • Changed MapReduceResult to automatically proxy 'results' in inline result sets
  • Added missing methods to GridFSDBFile necessary to access the underlying datastream
  • Fixed setter/getter of option on cursor
  • For several reasons changed backing trait of DBList PML from Buffer to LinearSeq
  • Moved to new MapReduce functionality based on MongoDB 1.7.4+ !!! You must now specify an output mode.

  • MapReduce failures shouldn't throw Error which can crash the runtime
  • New MapReduceSpec updates to include tests against new MongoDB MapReduce logic
Reply all
Reply to author
Forward
0 new messages