implicit.ly

Scala software, hot off the presses

salat 0.0.7

Features new in Salat 0.0.7 include:

  • reorganization of Salat project into modules
  • base dependency is now salat-core 0.0.7
  • SalatDAO provides simple, extensible turnkey DAO pattern
  • insert, save and remove methods accept case classes
  • find returns an Iterable Mongo cursor typed to your case class - skip, limit, sort and get your objects no fuss no muss
  • query and get back a list of typed ids
  • projections return an Iterable Mongo cursor typed to a case class or a primitive
  • child collection support - find, update, remove, find ids and get back typed projections on children using a typed parent id or typed list of parent ids
  • new, more detailed documentation on our wiki
  • better error handling, including detailed explanations when graters and constructors misfire
  • More flexible @Key behavior to override field name when serializing objects
  • register global overrides at the context level
  • use @Key in a trait or an abstract superclass
  • Create a custom context to get more flexible type hinting
  • chose a type hinting strategy: always (default), only when necessary, or never (not recommended)
  • customize the type hint at the context level - replace "_typeHint" with whatever you like
  • Use @Persist to persist case class fields that are not declared in the constructor
  • works with var, val and lazy val defined inside case class
  • also works with fields defined in traits or abstract superclasses

Salat is a simple Scala serialization library that makes it easy to:

  • serialize a Scala case class to a MongoDB DBObject
  • deserialize a MongoDB DBObject back into an instance of the original case class

Documentation is available on the wiki.

Feature highlights:

  • Built to leverage 10gen's Casbah and its full suite of BSON encoders. Primitive values of types ranging from Double and Float to Joda Time's DateTime are supported seamlessly out of the box.
  • Works with nested case class instances of arbitrary depth. Support is provided for nested Seq-s and Map-s, whose values may be primitives or embedded case classes which will also be (de)serialized.
  • Supports Scala idioms such as Option-s and default argument values.
  • Only minimal use is made of Java reflection. Where feasible, Salat leverages Scala class signatures.

Salat is free software. Its availability is governed by the Apache 2 license. See LICENSE.md at source root for more information. Please make use of the GitHub project to report issues or contact the author.

Development supported by Novus Partners, Inc.

Filed under  //   Scala 2.8.1   com.novus   salat  

salat 0.0.5

Features new in Salat 0.0.5 include:

  • Resolve classes across multiple class loaders
  • More helpful error messages, more useful debug output
  • Serialize and deserialize objects templated to an abstract superclass using @Salat annotation (traits were introduced in 0.0.4)
  • Persist enums by string or by id (globally or a per-case basis)
  • Improved support for BigDecimal, BigInt and Char
  • Improved Grater lookup via Context: class name, class instance, MongoDBObject with type hint

Salat is a simple Scala serialization library that makes it easy to:

  • serialize a Scala case class to a MongoDB DBObject
  • deserialize a MongoDB DBObject back into an instance of the original case class

Documentation is available on the wiki.

Feature highlights:

  • Built to leverage 10gen's Casbah and its full suite of BSON encoders. Primitive values of types ranging from Double and Float to Joda Time's DateTime are supported seamlessly out of the box.
  • Works with nested case class instances of arbitrary depth. Support is provided for nested Seq-s and Map-s, whose values may be primitives or embedded case classes which will also be (de)serialized.
  • Supports Scala idioms such as Option-s and default argument values.
  • Only minimal use is made of Java reflection. Where feasible, Salat leverages Scala class signatures.

Salat is free software. Its availability is governed by the Apache 2 license. See LICENSE.md at source root for more information. Please make use of the GitHub project to report issues or contact the author.

Development supported by Novus Partners, Inc.

Filed under  //   Scala 2.8.0   Scala 2.8.1   com.novus   salat  

casbah 1.0.8.5

Backport feature release; some features from the 1.1 development branch have been pulled back to 1.0.x.

  • Backported a MongoDBList interface which uses Scala 2.8 collection factory/builder standard to produce com.mongodb.BasicDBList instances; implicit conversion support for additional usefulness. [BWM]
  • Backported safely and batchSafely methods on MongoDB and MongoCollection. These use requestStart/requestDone to run operations within a single thread/connection and then check getLastError (getPrevErrors for "batch"), throwing any exceptions that occurred. If you want to ensure writes this should be used, but they will block.

Formerly known as "mongo-scala-wrappers", Casbah provides a series of wrappers and DSL-like (AKA fluid query syntax) functionality for better utilizing MongoDB from within Scala. This wraps the official MongoDB Java Driver, attempting to provide more Scala-like functionality on top of it. The current (latest) version has been tested against MongoDB 1.4.x, with the 2.0 Java Driver (not all 2.0 driver features are wired in yet, as development began against 1.x). Your Mileage May Vary. See the docs and test classes for information on best practices and functionality.

The latest releases are available from our Maven repository:

http://repo.bumnetworks.com/releases/ # For Releases
http://repo.bumnetworks.com/snapshots/  # For snapshots

This work is open sourced by Novus Partners, Inc. http://novus.com under the Apache License v2.

There is a potentially useful Casbah Tutorial which gives you everything you need to know to be dangerous.

Got questions, problems, suggestions? Please join the Casbah Users' Mailing List

Filed under  //   Scala 2.8.0   casbah   com.novus  

casbah 1.0.7.4

Minor bugfix / tweak release.

  • Fixed some issues w/ GridFS libraries attempting to call toMap in iteration, which isn't implemented on the Java side; added custom toString methods on the GridFS files [BWM]
  • Cleaned up log spam [BWM / MA]
  • Added serialization hook for MongoDBObject to help catch any nested instances [MA]
  • Cleaned up some stray references to java.lang.Object, replaced with AnyRef for good Scala coding practices [BWM]

Formerly known as "mongo-scala-wrappers", Casbah provides a series of wrappers and DSL-like (AKA fluid query syntax) functionality for better utilizing MongoDB from within Scala. This wraps the official MongoDB Java Driver, attempting to provide more Scala-like functionality on top of it. The current (latest) version has been tested against MongoDB 1.4.x, with the 2.0 Java Driver (not all 2.0 driver features are wired in yet, as development began against 1.x). Your Mileage May Vary. See the docs and test classes for information on best practices and functionality.

This work is open sourced by Novus Partners, Inc. http://novus.com under the Apache License v2.

There is a potentially useful Casbah Tutorial which gives you everything you need to know to be dangerous.

Got questions, problems, suggestions? Please join the Casbah Users' Mailing List

Filed under  //   Scala 2.8.0   casbah   com.novus  

casbah 1.0.7

Minor bugfixes/enhancements.

  • Updated reference to Configgy to have a Scala version attached; this was causing issues on some mixed-version users' systems.
  • Corrected massive stupidity from lack of testing on my part and disabled ScalaJDeserializers - in most cases these caused runtime ClassCastExceptions. SERIALIZERS still in place - Deserializers were just plain a bad idea.

Formerly known as "mongo-scala-wrappers", Casbah provides a series of wrappers and DSL-like (AKA fluid query syntax) functionality for better utilizing MongoDB from within Scala. This wraps the official MongoDB Java Driver, attempting to provide more Scala-like functionality on top of it. The current (latest) version has been tested against MongoDB 1.4.x, with the 2.0 Java Driver (not all 2.0 driver features are wired in yet, as development began against 1.x). Your Mileage May Vary. See the docs and test classes for information on best practices and functionality.

This work is open sourced by Novus Partners, Inc. http://novus.com under the Apache License v2.

There is a potentially useful Casbah Tutorial which gives you everything you need to know to be dangerous.

Got questions, problems, suggestions? Please join the Casbah Users' Mailing List

Filed under  //   Scala 2.8.0   casbah   com.novus  

casbah 1.0.5

Minor bugfixes/enhancements.

  • Due to oddities and ambiguities, stripped the type parameter apply[A] method from MongoDBObject. If you want a cast return, please use MongoDBObject.getAs[A]. This should minimize odd runtime failures.
  • Added toplevel detection in MongoDBObject's +=/put methods to try and convert a MongoDBObject value to DBObject for you.
  • Added "Product" arguments to $pushAll - this means you can pass a Tuple-style list, where previously it required an Iterable ( $pushAll ("foo" -> (5, 10, 23, "spam", eggs") should now work).
  • Updated to scalaj-collection 1.0 release, built against 2.8.0 final
  • Added a new ScalaJ-Collection based Deserializer and Serializer layer. All base types supported by ScalaJ collection now use asJava / asScala to cleanly ser/deser where possible. This excludes Comparator/Comparable and Map types for sanity reasons. See com.novus.casbah.mongodb.conversions.scala.ScalaConversions for detail. Please report bugs if this breaks your code - it's nascent and a bit naive!
  • New Committer - Max Afonov
  • Removed the BitBucket Mirror; we're purely on GitHub now. Bug tracker linked from Github page.
  • Created a user mailing list - http://groups.google.com/group/mongodb-casbah-users

Formerly known as "mongo-scala-wrappers", Casbah provides a series of wrappers and DSL-like (AKA fluid query syntax) functionality for better utilizing MongoDB from within Scala. This wraps the official MongoDB Java Driver, attempting to provide more Scala-like functionality on top of it. The current (latest) version has been tested against MongoDB 1.4.x, with the 2.0 Java Driver (not all 2.0 driver features are wired in yet, as development began against 1.x). Your Mileage May Vary. See the docs and test classes for information on best practices and functionality.

This work is open sourced by Novus Partners, Inc. http://novus.com under the Apache License v2.

There is a potentially useful Casbah Tutorial which gives you everything you need to know to be dangerous.

Got questions, problems, suggestions? Please join the Casbah Users' Mailing List

Filed under  //   Scala 2.8.0   casbah   com.novus  

casbah 1.0.2

Minor bugfixes/enhancements.

  • Changed $in, $notin, $all to always generate an array in Any* mode
  • Added default type alias import for com.mongodb.DBRef & Casbah's MongoDB class

Formerly known as "mongo-scala-wrappers", Casbah provides a series of wrappers and DSL-like (AKA fluid query syntax) functionality for better utilizing MongoDB from within Scala. This wraps the official MongoDB Java Driver, attempting to provide more Scala-like functionality on top of it. The current (latest) version has been tested against MongoDB 1.4.x, with the 2.0 Java Driver (not all 2.0 driver features are wired in yet, as development began against 1.x). Your Mileage May Vary. See the docs and test classes for information on best practices and functionality. This work is open sourced by Novus Partners, Inc. http://novus.com under the Apache License v2.

There is a potentially useful Casbah Tutorial which gives you everything you need to know to be dangerous.

Filed under  //   Scala 2.8.0   casbah   com.novus  

casbah 1.0.1

Minor bugfixes/enhancements from 1.0 release.

+ Updated externals to link against 2.8.0 final - 1.0 release had some RC/Beta built externals. (scalaj-collection is still linked against Beta)
+ Added an Object interface, MongoDBAddress, for static construction of DBAddress instances.
+ Added type aliases in MongoTypeImports for all Casbah companion objects - please report any odd behavior this causes.
+ Added MapReduceCommand to BaseImports

Formerly known as "mongo-scala-wrappers", Casbah provides a series of wrappers and DSL-like (AKA fluid query syntax) functionality for better utilizing MongoDB from within Scala. This wraps the official MongoDB Java Driver, attempting to provide more Scala-like functionality on top of it. The current (latest) version has been tested against MongoDB 1.4.x, with the 2.0 Java Driver (not all 2.0 driver features are wired in yet, as development began against 1.x). Your Mileage May Vary. See the docs and test classes for information on best practices and functionality. This work is open sourced by Novus Partners, Inc. http://novus.com under the Apache License v2.

There is a potentially useful Casbah Tutorial which gives you everything you need to know to be dangerous.

Filed under  //   Scala 2.8.0   casbah   com.novus  

casbah 1.0

First public full release.

  • GridFS enhanced via Loan Pattern
  • Full support for MongoDB Query operators via fluid syntax (now with lots of testing to minimize breakage)
  • Added support for Scala 2.8-style Map interaction w/ DBObject. Builder pattern, +=, etc.
  • Tutorial Available

Formerly known as "mongo-scala-wrappers", Casbah provides a series of wrappers and DSL-like (AKA fluid query syntax) functionality for better utilizing MongoDB from within Scala. This wraps the official MongoDB Java Driver, attempting to provide more Scala-like functionality on top of it. The current (latest) version has been tested against MongoDB 1.4.x, with the 2.0 Java Driver (not all 2.0 driver features are wired in yet, as development began against 1.x). Your Mileage May Vary. See the docs and test classes for information on best practices and functionality. This work is open sourced by Novus Partners, Inc. http://novus.com under the Apache License v2.

There is a potentially useful Casbah Tutorial which gives you everything you need to know to be dangerous.

Filed under  //   Scala 2.8.0   casbah   com.novus