O'Reilly logo

Lift Application Development Cookbook by Gilberto T. Garcia Jr.

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Querying with Rogue

Rogue is a type-safe domain specific language (DSL) built by Foursquare to execute, find, and modify commands against MongoDB using Lift. You can use Rogue to enhance the power of your record models.

In this recipe, we will learn the basics of Rogue to perform a couple of queries using its features.

Getting ready

We'll evolve the project from the Mapping a MongoDB collection to a Scala class recipe but you'll need to add Rogue in the list of dependencies of the project. Add the following lines in the libraryDependencies Seq key in the build.sbt file:

 "com.foursquare" %% "rogue-field" % "2.2.0" intransitive(), "com.foursquare" %% "rogue-core" % "2.2.0" intransitive(), "com.foursquare" %% "rogue-lift" % "2.2.0" intransitive(), ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required