(Changed in version 2.8.0) +
creates a new map. Use +=
to add an element to this map and return that map itself.
(Changed in version 2.8.0) +
creates a new map. Use +=
to add an element to this map and return that map itself.
(Changed in version 2.8.0) ++
creates a new map. Use ++=
to add an element to this map and return that map itself.
(Changed in version 2.8.0) -
creates a new map. Use -=
to remove an element from this map and return that map itself.
(Changed in version 2.8.0) -
creates a new map. Use -=
to remove an element from this map and return that map itself.
(Changed in version 2.8.0) --
creates a new map. Use --=
to remove an element from this map and return that map itself.
Returns a new list with this MongoDBObject at the *end* Currently only supports composing with other DBObjects, primarily for the use of the Query DSL; if you want heterogenous lists, use MongoDBList directly.
Returns a new list with this MongoDBObject at the *end* Currently only supports composing with other DBObjects, primarily for the use of the Query DSL; if you want heterogenous lists, use MongoDBList directly.
MongoDBList
Returns a new list with this MongoDBObject at the *end* Currently only supports composing with other DBObjects, primarily for the use of the Query DSL; if you want heterogenous lists, use MongoDBList directly.
Returns a new list with this MongoDBObject at the *end* Currently only supports composing with other DBObjects, primarily for the use of the Query DSL; if you want heterogenous lists, use MongoDBList directly.
MongoDBList
Nested as[Type]
Nested as[Type]
A helper to recursively fetch and then finally cast items from a DBObject.
the type to cast the final key to
(String*)
(A)
NoSuchElementException
or ClassCastException
as
as
Works like apply(), unsafe, bare return of a value. Returns default if nothing matching is found, else tries to cast a value to the specified type.
Unless you overrode it, default throws a NoSuchElementException
Any type as long as its not Nothing
(String)
(A)
NoSuchElementException
or ClassCastException
A utility method that allows you to cast a value to an Option[A]
A utility method that allows you to cast a value to an Option[A]
Some(value.asInstanceOf[T]) would only cause a runtime ClassCastException when calling get
This utility ensures that the types match correctly (even boxed scala types eg Int) so we can check against the type and return Some(value) if the types match.
the type to cast to check against
the value to type check against
Option[A] - Some(value) if the type of instances match else None
Utility method to emulate javascript dot notation
Utility method to emulate javascript dot notation
Designed to simplify the occasional insanity of working with nested objects. Your type parameter must be that of the item at the bottom of the tree you specify...
If the cast fails it will return None
Nested getAs[Type]
Nested getAs[Type]
A helper to recursively fetch and then finally cast items from a DBObject.
the type to cast the final value
Strings the keys to lookup
Option[A] - None if value is None, the cast invalid or the key is missing otherwise Some(value)
Utility method to allow typing without conflicting with Map's required get() method and causing ambiguity.
Utility method to allow typing without conflicting with Map's required get() method and causing ambiguity.
An invalid cast will cause the return to be None
the type to cast the result to
String the key to lookup
Option[A] - None if value is None, the cast invalid or the key is missing otherwise Some(value)
(Changed in version 2.8.0) keys
returns Iterable[A]
rather than Iterator[A]
.
(Changed in version 2.9.0) The behavior of scanRight
has changed. The previous behavior can be reproduced with scanRight.reverse.
(Changed in version 2.9.0) transpose
throws an IllegalArgumentException
if collections are not uniformly sized.
validate the object.
validate the object. Throws an exception if it fails
MongoException
An error describing the validation failure
(Changed in version 2.8.0) values
returns Iterable[B]
rather than Iterator[B]
.
(Since version 2.0) containsKey is deprecated in the MongoDB Driver. You should use containsField instead.