Define views NoSQL


show more Defining views provides you with in-depth training on Developer. Taught by Joseph LeBlanc as part of the Up and Running with NoSQL Databases show less
please wait ...

Defining views

Once you have a Map Function returning the data you want from CouchDB, you can save it as a view. Let's create a view on this dataset so we can use it again later. Navigate to the restaurant database. If it's not already selected, select Temporary View from the dropdown. It saved the Map Function from our previous Temporary View. If you don't already have this code in place, copy it in and click Run. We want to save this view, so we have all the content except for the page with the hours.

Click the Save As button, and then type in the name of the design document and the view name. The design document is something we can use to build an application with later. I'm going to name this design document pages and I'm going to name this view without_hours. So now you'll notice that the View dropdown has pages, our design document, and without_hours, the name of the view. We can go to all documents or we can switch to our view.

We can also get to a JSON- format...

Defining views
Video duration: 1m 54s 56m 57s Intermediate

Viewers:

Defining views provides you with in-depth training on Developer. Taught by Joseph LeBlanc as part of the Up and Running with NoSQL Databases

please wait ...