Book Image

Couchbase Essentials

Book Image

Couchbase Essentials

Overview of this book

Table of Contents (15 chapters)
Couchbase Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Couchbase SDKs and views


For another perspective on your view, click on the link right above the grid of results. This link will lead to a JSON view of our index:

{
    "total_rows": 5891,
    "rows": [
        {
            "id": "sullivan_s_black_forest_brew_haus_grill",
            "key": ".38 Special Bitter",
            "value": null
        },
        {
            "id": "512_brewing_company-512_alt",
            "key": "(512) ALT",
            "value": null
        },
        {
            "id": "512_brewing_company-512_bruin",
            "key": "(512) Bruin",
            "value": null
        }      
    ]
}

The client libraries will use this JSON when querying a view. This view also introduces an important element of the Couchbase Server view API—the fact that it's HTTP-based. Unlike the key/value API, which is a binary protocol, views are queried over a RESTful API, with parameter values supplied as query string arguments. Being able to see the JSON that your client library sees...