Giter Club home page Giter Club logo

reactivemongo-site's Introduction

ReactiveMongo

ReactiveMongo is a scala driver that provides fully non-blocking and asynchronous I/O operations.

Usage

First add the dependencies in your build.sbt.

libraryDependencies ++= Seq(
  "org.reactivemongo" %% "reactivemongo" % "VERSION"
)

Maven Javadocs

See the documentation

Build manually

To benefit from the latest improvements and fixes, you may want to compile ReactiveMongo from source. You will need a Git client and SBT.

From the shell, first checkout the source:

$ git clone [email protected]:ReactiveMongo/ReactiveMongo.git

Then go to the ReactiveMongo directory and launch the SBT build console:

$ cd ReactiveMongo
$ sbt
> +publishLocal

Running tests:

In order to execute the unit and integration tests, SBT can be used as follows.

sbt testOnly

The test environement must be able to handle the maximum number of incoming connection for the MongoDB instance. This must be checked, and eventually updated, using ulimit -n.

CircleCI Test coverage

Reproduce CI build:

To reproduce a CI build, see the Docker tools.

Learn More

See also the samples

reactivemongo-site's People

Contributors

adericbourg avatar baton-rw avatar bfontaine avatar cchantep avatar cvogt avatar gratner avatar jbn avatar leonyah avatar lepirlouit avatar ndeverge avatar nicolaenmv avatar philipwhiuk avatar samtheisens avatar sgodbillon avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

reactivemongo-site's Issues

Website first page example

Hi, first page example is not complete, some of 'import' are not correct because if you follow the exact think you will get error!

Iteratee and find are not there

Documentation about deprecation

[warn] /Users/cchantep/Projects/ReactiveMongo/driver/src/main/scala/api/cursor.scala:359: method collect in trait Cursor is deprecated: Use `collect` with an [[Cursor.ErrorHandler]].
[warn]   override def collect[M[_]](maxDocs: Int = Int.MaxValue, stopOnError: Boolean = true)(implicit cbf: CanBuildFrom[M[_], T, M[T]], ec: ExecutionContext): Future[M[T]] = wrappee.collect[M](maxDocs, stopOnError)

method db in class MongoConnection is deprecated: Must use [[database]]

Use cursor() or `cursor(readPreference)

Use collect with an [[Cursor.ErrorHandler]]

method documents in class AggregationResult is deprecated: Use [[firstBatch]]

method result in class AggregationResult is deprecated: Use [[head]]

method secondaryPreferred in object ReadPreference is deprecated: Use secondaryPreferred(T*)
[warn] one[BSONDocument](ReadPreference.secondaryPreferred(

Play :

method db in trait MongoController is deprecated: Use [[database]]

method gridFSBodyParser in trait MongoController is deprecated: Use gridFSBodyParser with Future[GridFS]

Unified Scaladoc

  • driver API
  • Iteratee API
  • JSON API
  • Play plugin API
  • AkkaStream API

Documentation about the aggregate operation

import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.Future

import reactivemongo.bson._
import reactivemongo.api.collections.bson.BSONCollection

def populatedStates(cities: BSONCollection): Future[List[BSONDocument]] = {
  import cities.BatchCommands.AggregationFramework
  import AggregationFramework.{ Group, Match, SumField }

  cities.aggregate(Group(BSONString("$state"))(
    "totalPop" -> SumField("population")), List(
    Match(document("totalPop" ->
      document("$gte" -> 10000000L))))).map(_.documents)
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.