A newer version of this documentation is available.

View Latest

Collections & Scope

  • Developer Preview
    +
    Available as a Developer Preview in Couchbase Server 6.5.

    The Developer Preview of the upcoming Collections feature in Couchbase Server is fully implemented in the 3.0 API versions of the Couchbase SDKs. Information on the Developer Preview (DP) of Collections can be found in the server docs.

    Using Collections & Scope DP

    Access a non-default collection, in the default scope, with:

    public void collections_1() throws Exception {
      collection = bucket.collection("flights"); // in default scope
    }

    And for a non-default scope:

    public void collections_2() throws Exception {
      collection = bucket.scope("marlowe_agency").collection("flights");
    }

    Further Reading