Uploaded image for project: 'Couchbase Documentation'
  1. Couchbase Documentation
  2. DOC-6167

Add advisory about using BucketManager.GetDesignDocuments with BucketManager.RemoveDesignDocument

    XMLWordPrintable

Details

    • SDK32: QueryCollections, SDK30: Connect,Txns, SDK34: Txn/RBAC Mgmt./QColl
    • 1

    Description

      The .NET API GetDesignDocuments() (https://docs.couchbase.com/sdk-api/couchbase-net-client-2.7.15/html/566c0751-2605-45f6-efdf-76d7e4713a3c.htm) returns a raw JSON object containing all of the design documents on the server.

      The names of each design document includes the leading _design/ prefix as they're stored with on the server-side.
      If you try and pass the names you retrieve from this object directly to RemoveDesignDocument() (https://docs.couchbase.com/sdk-api/couchbase-net-client-2.7.15/html/a064897c-208b-d68f-9f7c-b745c01b8fa9.htm) then this will fail.

      This is because the RemoveDesignDocument() API expects that the string passed does not include this prefix, so you have to strip it out first.

      Would be good to call this out either in the API documentation for getDesignDocuments or in the view management (https://docs.couchbase.com/dotnet-sdk/current/managing-clusters.html#view-management) section of the docs.

      Attachments

        Issue Links

          Activity

            People

              jmorris Jeff Morris
              matt.carabine Matt Carabine (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                PagerDuty