All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ongo.reactivemongo-bson-geo_3.1.1.0-RC4.source-code.compat.scala Maven / Gradle / Ivy

There is a newer version: 1.1.0.noshaded-RC12
Show newest version
package reactivemongo.api.bson

private[bson] trait GeoGeometryCollectionCompat {
  _self: GeoGeometryCollection.type =>

  given Conversion[GeoGeometryCollection, Tuple1[Seq[GeoGeometry]]] = {
    (geo: GeoGeometryCollection) => Tuple1(geo.geometries)
  }

  implicit object ProductOfGeoGeometryCollection
      extends scala.deriving.Mirror.Product {
    type MirroredType = GeoGeometryCollection
    type MirroredElemTypes = Tuple1[Seq[GeoGeometry]]
    type MirroredMonoType = GeoGeometryCollection
    type MirroredLabel = "GeoGeometryCollection"
    type MirroredElemLabels = Tuple1["geometries"]

    def fromProduct(p: Product): MirroredMonoType =
      new GeoGeometryCollection(
        p.productElement(0).asInstanceOf[Seq[GeoGeometry]]
      )
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy