Sample Application

    Discover how to program interactions with the Couchbase Server via the data, query, and search services — using the Travel Sample Application with the built-in Travel Sample data Bucket. Discover how to program interactions with Couchbase via the Data, Query, and Search services.

    Sample App Backend

    The backend code shows Couchbase Scala SDK in action with Query and Search, but also how to plug together all of the elements and build an application with Couchbase Server and the Scala SDK.

    The app directory contains the various components, classes and functions for handling users, registration, and SQL++ (formerly N1QL) queries.

    For this quickstart, we use three collections, airport, airline and routes that contain sample airports, airlines and airline routes respectively. The routes collection connects the airports and airlines as seen in the figure below. We use these connections in the quickstart to generate airports that are directly connected and airlines connecting to a destination airport. Note that these are just examples to highlight how you can use SQL++ queries to join the collections.

    travel-sample data model

    REST API

    You can explore the REST API here in read-only mode, or once you are running the application, at the /apidocs endpoint.