package monocle
Monocle utilities for BSON values.
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- monocle
- LowPriorityMonocle
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Type Members
Value Members
- def field[T](name: String)(implicit w: BSONWriter[T], r: BSONReader[T]): Optional[BSONDocument, T]
Returns an optional lens for a field with the given
name
.Returns an optional lens for a field with the given
name
.- T
the field type
import reactivemongo.api.bson.monocle._ val lens = field[String]("bar")
- Definition Classes
- LowPriorityMonocle
- def nested[T](documentField: String, f: Optional[BSONDocument, T]): Optional[BSONDocument, T]
Returns an optional lens for a field
f
, nested in a document field.Returns an optional lens for a field
f
, nested in a document field.import reactivemongo.api.bson.monocle._ // For a top document { "foo": { "bar": 1 } } val lens = nested("foo", field[Int]("bar"))