Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Tweaks and adjustments to keep in line with 2.3 changes

  • Loading branch information...
commit ab8ef4afb637869866aa8c770ab21cff7f4c1d42 1 parent c720839
@bwmcadams bwmcadams authored
View
6 casbah-commons/src/main/scala/MongoDBList.scala
@@ -108,7 +108,7 @@ object MongoDBList {
def empty: MongoDBList = new MongoDBList()
- def apply[A <: Any](elems: A*): Seq[Any] = {
+ def apply[A <: Any](elems: A*): MongoDBList = {
val b = newBuilder[A]
for (xs <- elems) xs match {
case p: Tuple2[String, _] => b += MongoDBObject(p)
@@ -117,7 +117,7 @@ object MongoDBList {
b.result
}
- def concat[A](xss: Traversable[A]*): Seq[Any] = {
+ def concat[A](xss: Traversable[A]*): MongoDBList = {
val b = newBuilder[A]
if (xss forall (_.isInstanceOf[IndexedSeq[_]]))
b.sizeHint(xss map (_.size) sum)
@@ -146,5 +146,5 @@ sealed class MongoDBListBuilder extends scala.collection.mutable.Builder[Any, Se
def clear() { elems = empty }
- def result: Seq[Any] = elems
+ def result: MongoDBList = elems
}
View
1  casbah-core/src/main/scala/MongoCollection.scala
@@ -132,6 +132,7 @@ abstract class MongoCollection extends Logging with Iterable[DBObject] {
* @dochub indexes
*/
def ensureIndex[A <% DBObject](keys: A, name: String) = underlying.ensureIndex(keys, name)
+
/** Ensures an index on this collection (that is, the index will be created if it does not exist).
* ensureIndex is optimized and is inexpensive if the index already exists.
* @param keys fields to use for index
Please sign in to comment.
Something went wrong with that request. Please try again.