BSONString

object BSONString

BSONString utilities

import reactivemongo.api.bson.BSONString

BSONString("foo") match {
 case BSONString(v) => v == "foo"
 case _ => false
}
Companion:
class
class Object
trait Matchable
class Any

Value members

Concrete methods

def apply(value: String): BSONString

Returns a BSONString.

Returns a BSONString.

reactivemongo.api.bson.BSONString("foo")

Returns the plain string representation for the given BSONString.

Returns the plain string representation for the given BSONString.

def unapply(that: Any): Option[String]

Extracts the string value if that's a BSONString.

Extracts the string value if that's a BSONString.

import reactivemongo.api.bson.{ BSONString, BSONValue }

def show(v: BSONValue): String = v match {
 case BSONString(s) => s
 case _ => "not-string"
}