Skip to content
This repository was archived by the owner on Mar 3, 2026. It is now read-only.

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

Maven Central javadoc jooby-jongo website

jongo

Jongo query in Java as in Mongo shell.

NOTE: This module depends on: mongodb driver module.

exports

<dependency>
  <groupId>org.jooby</groupId>
  <artifactId>jooby-jongo</artifactId>
  <version>1.5.0</version>
</dependency>

usage

{
  use(new Mongodb());
  use(new Jongoby());

  get("/", req -> {
    Jongo jongo = require(Jongo.class);
    // work with jongo...
  });
}

Previous example will give you a Jongo instance connected to the default database, provided by the mongodb module.

Access to alternate database is provided via: JongoFactory.

{
  use(new Mongodb());
  use(new Jongoby());

  get("/", req -> {
    Jongo jongo = require(JongoFactory.class).get("alternate-db");
    // work with jongo...
  });
}

For more information, please visit the Jongo web site.