key-value pair construction 

the tools to build DBObjects rely on DBOKV to write the key-value pairs into the objects. the implicit class StringToDBOKV provides methods for obtaining DBOKVs

val dbo = new BasicDBObject() //from the mongo-java-driver
val kv = "keyname" :> 25 //produces DBOKV[Int]("keyname", 25)
kv.write(dbo) //writes 25 into db at the key "keyname"

note that :> only produces a DBOKV if an implicit EncodeBsonField can be found for the type of the argument.


there are two different ways to write optional values.