ornicar / ReactiveMongo-BSON

:leaves: BSON library for ReactiveMongo

Home Page:http://reactivemongo.org/releases/0.1x/documentation/tutorial/bison.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ReactiveMongo Biːsən

BSON libraries for ReactiveMongo

Motivation

These libraries are intended to replace (at some point after release 1.0) the BSON library currently shipped along with ReactiveMongo driver.

It will fix some issues, bring multiple API and performance improvements (simpler & better).

TODO: Details & publish benchmarks

Usage

The main API library migrates both the BSON values types (with same names; see example) and the handler typeclasses (reader/writer; see example).

Note: The package of the new library is reactivemongo.api.bson (instead of reactivemongo.bson).

It can already be used in your build.sbt:

libraryDependencies += "org.reactivemongo" %% "reactivemongo-bson-api" % VERSION)

Maven Javadocs

import reactivemongo.api.bson._

This refactoring also includes the following optional libraries.

compat:

The compatibility library, that provides conversions between the previous and the new APIs. It can be configured in the build.sbt as below.

libraryDependencies += "org.reactivemongo" %% "reactivemongo-bson-compat" % VERSION

Then the conversions can be imported:

import reactivemongo.api.bson.compat._

msb-compat:

The compatiblity library for org.bson, that provides conversions between this package and the new BSON API. It can be configured in the build.sbt as below.

libraryDependencies += "org.reactivemongo" %% "reactivemongo-bson-msb-compat" % VERSION

Then the conversions can be imported:

import reactivemongo.api.bson.msb._

geo:

The GeoJSON library, that provides the geometry types and the handlers to read from and write to appropriate BSON representation.

It can be configured in the build.sbt as below.

libraryDependencies += "org.reactivemongo" %% "reactivemongo-bson-geo" % VERSION

monocle: EXPERIMENTAL

The library that provides Monocle utilities for BSON values. It can be configured in the build.sbt as below.

libraryDependencies += "org.reactivemongo" %% "reactivemongo-bson-monocle" % VERSION

Then the utilities can be imported:

import reactivemongo.api.bson.monocle._

Build manually

ReactiveMongo BSON libraries can be built from this source repository.

sbt publishLocal

To run the tests, use:

sbt test

Integration tests in the collection module requires a local MongoDB instance on port 27017 .

Travis: Travis build status

About

:leaves: BSON library for ReactiveMongo

http://reactivemongo.org/releases/0.1x/documentation/tutorial/bison.html

License:GNU General Public License v3.0


Languages

Language:Scala 99.5%Language:Shell 0.4%Language:Java 0.1%