Packages

package compat

Implicit conversions for handler & values types between reactivemongo.bson and reactivemongo.api.bson .

import reactivemongo.api.bson.compat._

For more specific imports, see ValueConverters and HandlerConverters .

Linear Supertypes
HandlerConverters, LowPriorityHandlerConverters1, LowPriorityHandlerConverters2, LowPriorityHandlerConverters3, ValueConverters, LowPriorityConverters, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. compat
  2. HandlerConverters
  3. LowPriorityHandlerConverters1
  4. LowPriorityHandlerConverters2
  5. LowPriorityHandlerConverters3
  6. ValueConverters
  7. LowPriorityConverters
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. trait HandlerConverters extends LowPriorityHandlerConverters1

    Implicit conversions for handler types between reactivemongo.bson and reactivemongo.api.bson .

    Implicit conversions for handler types between reactivemongo.bson and reactivemongo.api.bson .

    import reactivemongo.api.bson.compat.HandlerConverters._
    
    def foo[T](lw: reactivemongo.bson.BSONDocumentWriter[T]) = {
      val w: reactivemongo.api.bson.BSONDocumentWriter[T] = lw
      w
    }
    
    import reactivemongo.bson.BSONValue
    
    def bar[T](lr: reactivemongo.api.bson.BSONReader[T]) = {
      val r: reactivemongo.bson.BSONReader[BSONValue, T] = lr
      r
    }
  2. trait ValueConverters extends LowPriorityConverters

    Implicit conversions for value types between reactivemongo.bson and reactivemongo.api.bson.

    Implicit conversions for value types between reactivemongo.bson and reactivemongo.api.bson.

    // Required import
    import reactivemongo.api.bson.compat.ValueConverters._
    
    // From legacy reactivemongo.bson
    import reactivemongo.api.bson.{ BSONDouble, BSONString, BSONValue }
    
    val newStr: BSONString = reactivemongo.bson.BSONString("foo")
    val newVal: BSONValue = reactivemongo.bson.BSONInteger(2)
    
    // To legacy
    val oldStr: reactivemongo.bson.BSONString = BSONString("bar")
    val oldVal: reactivemongo.bson.BSONValue = BSONDouble(1.2D)

Value Members

  1. implicit final def fromArray(array: BSONArray): bson.BSONArray
    Definition Classes
    ValueConverters
  2. implicit final def fromBinary(binary: BSONBinary): bson.BSONBinary
    Definition Classes
    ValueConverters
  3. implicit final def fromBinarySubtype(subtype: Subtype): bson.Subtype
    Definition Classes
    ValueConverters
  4. implicit final def fromBoolean(boolean: BSONBoolean): bson.BSONBoolean
    Definition Classes
    ValueConverters
  5. implicit final def fromDateTime(dateTime: BSONDateTime): bson.BSONDateTime
    Definition Classes
    ValueConverters
  6. implicit final def fromDecimal(decimal: BSONDecimal): bson.BSONDecimal
    Definition Classes
    ValueConverters
  7. implicit final def fromDocument(doc: BSONDocument): bson.BSONDocument
    Definition Classes
    ValueConverters
  8. implicit final def fromDocumentHandler[T](h: BSONDocumentHandler[T]): bson.BSONDocumentHandler[T]

    Implicit conversion from new BSONDocumentHandler to the legacy API.

    Implicit conversion from new BSONDocumentHandler to the legacy API.

    import reactivemongo.api.bson.compat.HandlerConverters.fromDocumentHandler
    
    def bar[T](lh: reactivemongo.api.bson.BSONDocumentHandler[T]) = {
      val h: reactivemongo.bson.BSONDocumentHandler[T] = lh
      h
    }
    Definition Classes
    HandlerConverters
  9. implicit final def fromDocumentReader[T](r: BSONDocumentReader[T]): bson.BSONDocumentReader[T]

    import reactivemongo.api.bson.compat.HandlerConverters.fromDocumentReader
    
    def foo[T](r: reactivemongo.api.bson.BSONDocumentReader[T]) = {
      val lr: reactivemongo.bson.BSONDocumentReader[T] = r
      lr
    }
    Definition Classes
    LowPriorityHandlerConverters2
  10. implicit final def fromDocumentWriter[T](w: BSONDocumentWriter[T]): bson.BSONDocumentWriter[T]

    import reactivemongo.api.bson.compat.HandlerConverters.fromDocumentWriter
    
    def bar[T](lw: reactivemongo.api.bson.BSONDocumentWriter[T]) = {
      val w: reactivemongo.bson.BSONDocumentWriter[T] = lw
      w
    }
    Definition Classes
    LowPriorityHandlerConverters2
  11. implicit final def fromDouble(double: BSONDouble): bson.BSONDouble
    Definition Classes
    ValueConverters
  12. implicit final def fromElement(element: BSONElement): bson.BSONElement
    Definition Classes
    ValueConverters
  13. implicit final def fromHandler[T](h: BSONHandler[T]): bson.BSONHandler[bson.BSONValue, T]
    Definition Classes
    LowPriorityHandlerConverters1
  14. implicit final def fromInteger(integer: BSONInteger): bson.BSONInteger
    Definition Classes
    ValueConverters
  15. implicit final def fromJavaScript(javaScript: BSONJavaScript): bson.BSONJavaScript
    Definition Classes
    ValueConverters
  16. implicit final def fromJavaScriptWS(javaScript: BSONJavaScriptWS): bson.BSONJavaScriptWS
    Definition Classes
    ValueConverters
  17. implicit final def fromLong(long: BSONLong): bson.BSONLong
    Definition Classes
    ValueConverters
  18. implicit val fromMaxKey: (BSONMaxKey) => bson.BSONMaxKey.type
    Definition Classes
    ValueConverters
  19. implicit val fromMinKey: (BSONMinKey) => bson.BSONMinKey.type
    Definition Classes
    ValueConverters
  20. implicit val fromNull: (BSONNull) => bson.BSONNull.type
    Definition Classes
    ValueConverters
  21. implicit final def fromObjectID(objectID: BSONObjectID): bson.BSONObjectID
    Definition Classes
    ValueConverters
  22. implicit final def fromReader[T](r: BSONReader[T]): bson.BSONReader[bson.BSONValue, T]
    Definition Classes
    LowPriorityHandlerConverters3
  23. implicit final def fromRegex(regex: BSONRegex): bson.BSONRegex
    Definition Classes
    ValueConverters
  24. implicit final def fromStr(string: BSONString): bson.BSONString
    Definition Classes
    ValueConverters
  25. implicit final def fromSymbol(symbol: BSONSymbol): bson.BSONSymbol
    Definition Classes
    ValueConverters
  26. implicit final def fromTimestamp(timestamp: BSONTimestamp): bson.BSONTimestamp
    Definition Classes
    ValueConverters
  27. implicit val fromUndefined: (BSONUndefined) => bson.BSONUndefined.type
    Definition Classes
    ValueConverters
  28. implicit final def fromValue(bson: BSONValue): bson.BSONValue
    Definition Classes
    LowPriorityConverters
  29. implicit final def fromWriter[T](w: BSONWriter[T]): bson.BSONWriter[T, bson.BSONValue]
    Definition Classes
    LowPriorityHandlerConverters3
  30. final def legacyDocumentHandler[T](implicit r: bson.BSONDocumentReader[T], w: bson.BSONDocumentWriter[T]): bson.BSONDocumentHandler[T]
    Definition Classes
    LowPriorityHandlerConverters1
  31. implicit def legacyReaderNewValue[B <: BSONValue, L](implicit r: BSONDocumentReader[B], conv: (B) => L): bson.BSONDocumentReader[L]

    Based on the compatibility conversions, provides instances of legacy BSONDocumentReader for the new BSON value API.

    Based on the compatibility conversions, provides instances of legacy BSONDocumentReader for the new BSON value API.

    Definition Classes
    HandlerConverters
  32. implicit def legacyWriterNewValue[B <: BSONValue, L](implicit w: BSONDocumentWriter[B], conv: (L) => B): bson.BSONDocumentWriter[L]

    Based on the compatibility conversions, provides instances of legacy BSONDocumentWriter for the new BSON value API.

    Based on the compatibility conversions, provides instances of legacy BSONDocumentWriter for the new BSON value API.

    Definition Classes
    HandlerConverters
  33. final def providedDocumentHandler[T](implicit r: BSONDocumentReader[T], w: BSONDocumentWriter[T]): BSONDocumentHandler[T]

    Provided there are both a BSONDocumentReader and a BSONDocumentWriter for the given type T, a BSONDocumentHandler is materialized.

    Provided there are both a BSONDocumentReader and a BSONDocumentWriter for the given type T, a BSONDocumentHandler is materialized.

    Definition Classes
    LowPriorityHandlerConverters1
  34. implicit final def toArray(legacy: bson.BSONArray): BSONArray
    Definition Classes
    ValueConverters
  35. implicit final def toBinary(legacy: bson.BSONBinary): BSONBinary
    Definition Classes
    ValueConverters
  36. implicit final def toBinarySubtype(legacy: bson.Subtype): Subtype
    Definition Classes
    ValueConverters
  37. implicit final def toBoolean(legacy: bson.BSONBoolean): BSONBoolean
    Definition Classes
    ValueConverters
  38. implicit final def toDateTime(legacy: bson.BSONDateTime): BSONDateTime
    Definition Classes
    ValueConverters
  39. implicit final def toDecimal(legacy: bson.BSONDecimal): BSONDecimal
    Definition Classes
    ValueConverters
  40. implicit final def toDocument(legacy: bson.BSONDocument): BSONDocument
    Definition Classes
    ValueConverters
  41. implicit final def toDocumentHandler[T](h: bson.BSONDocumentHandler[T]): BSONDocumentHandler[T]

    Implicit conversion from legacy BSONDocumentHandler to the new API.

    Implicit conversion from legacy BSONDocumentHandler to the new API.

    import reactivemongo.api.bson.compat.HandlerConverters.toDocumentHandler
    
    def foo[T](lh: reactivemongo.bson.BSONDocumentHandler[T]) = {
      val h: reactivemongo.api.bson.BSONDocumentHandler[T] = lh
      h
    }
    Definition Classes
    HandlerConverters
  42. implicit final def toDocumentReader[T](implicit r: bson.BSONDocumentReader[T]): BSONDocumentReader[T]

    Provided there is a legacy document reader, resolve a new one.

    Provided there is a legacy document reader, resolve a new one.

    Definition Classes
    LowPriorityHandlerConverters2
  43. implicit final def toDocumentReaderConv[T](r: bson.BSONDocumentReader[T]): BSONDocumentReader[T]

    import reactivemongo.api.bson.compat.HandlerConverters.toDocumentReaderConv
    
    def lorem[T](lw: reactivemongo.bson.BSONDocumentReader[T]) = {
      val w: reactivemongo.api.bson.BSONDocumentReader[T] = lw
      w
    }
    Definition Classes
    LowPriorityHandlerConverters2
  44. implicit final def toDocumentWriter[T](implicit w: bson.BSONDocumentWriter[T]): BSONDocumentWriter[T]

    Provided there is a legacy document writer, resolve a new one.

    Provided there is a legacy document writer, resolve a new one.

    Definition Classes
    LowPriorityHandlerConverters2
  45. implicit final def toDocumentWriterConv[T](w: bson.BSONDocumentWriter[T]): BSONDocumentWriter[T]

    import reactivemongo.api.bson.compat.HandlerConverters.toDocumentWriterConv
    
    def foo[T](lw: reactivemongo.bson.BSONDocumentWriter[T]) = {
      val w: reactivemongo.api.bson.BSONDocumentWriter[T] = lw
      w
    }
    Definition Classes
    LowPriorityHandlerConverters2
  46. implicit final def toDouble(legacy: bson.BSONDouble): BSONDouble
    Definition Classes
    ValueConverters
  47. implicit final def toElement(legacy: bson.BSONElement): BSONElement
    Definition Classes
    ValueConverters
  48. implicit final def toHandler[T, B <: bson.BSONValue](h: bson.BSONHandler[B, T])(implicit bc: ClassTag[B]): BSONHandler[T]
    Definition Classes
    LowPriorityHandlerConverters1
  49. implicit final def toInteger(legacy: bson.BSONInteger): BSONInteger
    Definition Classes
    ValueConverters
  50. implicit final def toJavaScript(legacy: bson.BSONJavaScript): BSONJavaScript
    Definition Classes
    ValueConverters
  51. implicit final def toJavaScriptWS(legacy: bson.BSONJavaScriptWS): BSONJavaScriptWS
    Definition Classes
    ValueConverters
  52. implicit final def toLong(legacy: bson.BSONLong): BSONLong
    Definition Classes
    ValueConverters
  53. implicit val toMaxKey: (bson.BSONMaxKey.type) => BSONMaxKey
    Definition Classes
    ValueConverters
  54. implicit val toMinKey: (bson.BSONMinKey.type) => BSONMinKey
    Definition Classes
    ValueConverters
  55. implicit val toNull: (bson.BSONNull.type) => BSONNull
    Definition Classes
    ValueConverters
  56. implicit final def toObjectID(legacy: bson.BSONObjectID): BSONObjectID
    Definition Classes
    ValueConverters
  57. implicit final def toReader[T, B <: bson.BSONValue](r: bson.BSONReader[B, T])(implicit bc: ClassTag[B]): BSONReader[T]
    Definition Classes
    LowPriorityHandlerConverters3
  58. implicit final def toRegex(legacy: bson.BSONRegex): BSONRegex
    Definition Classes
    ValueConverters
  59. implicit final def toStr(legacy: bson.BSONString): BSONString
    Definition Classes
    ValueConverters
  60. implicit final def toSymbol(legacy: bson.BSONSymbol): BSONSymbol
    Definition Classes
    ValueConverters
  61. implicit final def toTimestamp(legacy: bson.BSONTimestamp): BSONTimestamp
    Definition Classes
    ValueConverters
  62. implicit val toUndefined: (bson.BSONUndefined.type) => BSONUndefined
    Definition Classes
    ValueConverters
  63. implicit final def toValue(legacy: bson.BSONValue): BSONValue
    Definition Classes
    LowPriorityConverters
  64. implicit final def toWriter[T](w: bson.BSONWriter[T, _ <: bson.BSONValue]): BSONWriter[T]
    Definition Classes
    LowPriorityHandlerConverters3
  65. object HandlerConverters extends HandlerConverters

    See compat$ and HandlerConverters

  66. object ValueConverters extends ValueConverters

    See compat$ and ValueConverters

Inherited from HandlerConverters

Inherited from LowPriorityHandlerConverters1

Inherited from LowPriorityHandlerConverters2

Inherited from LowPriorityHandlerConverters3

Inherited from ValueConverters

Inherited from LowPriorityConverters

Inherited from AnyRef

Inherited from Any

Ungrouped