Optionally parses this value as a T
one.
Optionally parses this value as a T
one.
Some
successfully parsed value, or None
if fails
import reactivemongo.api.bson.BSONValue def foo(v: BSONValue): Option[String] = v.asOpt[String]
Tries to parse this value as a T
one.
Tries to parse this value as a T
one.
import scala.util.Try import reactivemongo.api.bson.BSONValue def foo(v: BSONValue): Try[String] = v.asTry[String]
Returns the whole binary content as array.
The code indicating the BSON type for this value as Byte
The code indicating the BSON type for this value as Byte
The code indicating the BSON type for this value
The code indicating the BSON type for this value
The hexadecimal String representation.
The hexadecimal String representation.
import reactivemongo.api.bson.BSONObjectID def foo(oid: BSONObjectID): scala.util.Try[BSONObjectID] = { val repr: String = oid.stringify BSONObjectID.parse(repr) }
The time of this BSONObjectId, in milliseconds
The time of this BSONObjectId, in milliseconds
BSON ObjectId value.
| Timestamp (seconds) | Machine identifier | Thread identifier | Increment | --- | --- | --- | --- | 4 bytes | 3 bytes | 2 bytes | 3 bytes