Creates a new BSONArray containing all the values
in the given Iterable
.
Creates a new BSONArray containing all the values
in the given Iterable
.
Creates a new BSONArray containing all the given values
.
An empty BSONArray.
Returns a String representing the given BSONArray.
Extracts the values sequence if that
's a BSONArray.
Extracts the values sequence if that
's a BSONArray.
import reactivemongo.api.bson.{ BSONArray, BSONValue } def foo(input: BSONValue): Unit = input match { case BSONArray(vs) => pretty(vs) case _ => println("Not a BSON array") } def bar(arr: BSONArray): Unit = arr match { // with splat pattern case BSONArray(Seq(requiredFirst, other @ _*)) => println(s"first = \$requiredFirst") pretty(other) case _ => println("BSON array doesn't match") } def pretty(values: Seq[BSONValue]): Unit = println(values.map(BSONValue.pretty).mkString(", "))
See BSONArray