File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed
main/scala/com/avsystem/commons/mongo/scala
test/scala/com/avsystem/commons/mongo/core/ops Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import com.avsystem.commons.mongo.core.GenCodecRegistry
55import com .avsystem .commons .serialization .GenCodec
66import org .mongodb .scala .{MongoCollection , MongoDatabase }
77
8+ @ deprecated(" Dependency on org.mongodb.scala will be removed" , " 2.27.0" )
89object GenCodecCollection {
910
1011 def create [T : ClassTag : GenCodec ](
Original file line number Diff line number Diff line change 11package com .avsystem .commons
22package mongo .scala
33
4+ import scala .annotation .nowarn
5+
6+ @ deprecated(" Dependency on org.mongodb.scala will be removed" , " 2.27.0" )
47trait MongoScalaObservableExtensions {
8+
59 import MongoScalaObservableExtensions ._
610
711 implicit def mongoObservableOps [T ](obs : org.mongodb.scala.Observable [T ]): MongoObservableOps [T ] =
812 new MongoObservableOps [T ](obs)
913}
1014
15+ @ nowarn(" msg=deprecated" )
1116object MongoScalaObservableExtensions extends MongoScalaObservableExtensions {
1217
1318 final class MongoObservableOps [T ](private val obs : org.mongodb.scala.Observable [T ]) extends AnyVal {
19+ @ deprecated(" Dependency on org.mongodb.scala will be removed" , " 2.27.0" )
1420 def asMonix : monix.reactive.Observable [T ] = monix.reactive.Observable .fromReactivePublisher(obs)
1521 }
1622}
Original file line number Diff line number Diff line change @@ -2,19 +2,16 @@ package com.avsystem.commons
22package mongo .core .ops
33
44import org .bson .conversions .Bson
5- import org .mongodb .scala .MongoClient
6- import org .mongodb .scala .bson .BsonDocument
75import org .scalactic .Equality
86
97object BsonEquality extends Equality [Bson ] {
10- def toDoc (bson : Bson ): BsonDocument = bson.toBsonDocument(classOf [BsonDocument ], MongoClient .DEFAULT_CODEC_REGISTRY )
118
129 override def areEqual (a : Bson , b : Any ): Boolean =
1310 (a, b) match {
1411 case (null , null ) =>
1512 true
1613 case (aBson, bBson : Bson ) =>
17- toDoc( aBson) == toDoc( bBson)
14+ aBson.toBsonDocument == bBson.toBsonDocument
1815 case _ =>
1916 false
2017 }
You can’t perform that action at this time.
0 commit comments