O'Reilly logo

Mongoose for Application Development by Simon Holmes

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

Chapter 6. Interacting with Data – Reading, Querying, and Finding

So we've seen how Mongoose provides simple static methods for adding data to the database. Now let's see what Mongoose offers to help us find the data we want by querying the database and reading the data back into model instances in our application.

In this chapter we will:

  • Learn about the built-in options for querying MongoDB through Mongoose
  • Get practical by updating our application, letting us find individual users, individual projects and lists of projects
  • Extend on the default functionality by creating our own static method

Approaches to find and read data

Mongoose offers many ways of querying data, but much like what we saw in Chapter 5, Interacting with Data – Creation, there ...

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