Uploaded image for project: 'Couchbase C client library libcouchbase'
  1. Couchbase C client library libcouchbase
  2. CCBC-1322

Collections: cbc inconsistent collection/scope with other command line tools

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Minor
    • None
    • 3.0.6
    • tools
    • None
    • 1

    Description

      bug/improvement?

      cbc-create (presume others) have two collection related arguments --scope and --collection

      Other command line tools and for example N1QL use a different method of specifying a collection (which originated in N1QL) that is an almost 'path' style - scope.collection

      All tools should have a consistent method of refering to a collection for an improved end-user experience

      For example couchbase-cli to create a collection c01 in a scope s01

      couchbase-cli collection-manage -c localhost:9000 -u Administrator -p asdasd --bucket default --create-collection s01.c01

      Default collection can be explicit or implicit, the following commands do the same thing.

      • explicit couchbase-cli collection-manage -c localhost:9000 -u Administrator -p asdasd --bucket default --create-collection _default.collection
      • implicit couchbase-cli collection-manage -c localhost:9000 -u Administrator -p asdasd --bucket default --create-collection .collection

      cbstats

      • explicit cbstats localhost -u Administrator -p asdasd -b bucket collections _default.collection
      • implicit cbstats localhost -u Administrator -p asdasd -b bucket collections .collection

      Also these are equivalent

      • explicit
        • cbstats localhost -u Administrator -p asdasd -b bucket collections _default._default
        • couchbase-cli collection-manage -c localhost -u Administrator -p asdasd --bucket bucket --drop-collection _default._default
      • implicit
        • cbstats localhost -u Administrator -p asdasd -b bucket collections .
        • couchbase-cli collection-manage -c localhost -u Administrator -p asdasd --bucket bucket --drop-collection .
        • couchbase-cli collection-manage -c localhost -u Administrator -p asdasd --bucket bucket --drop-collection _default.

      In summary

      • Scope and collection fully specified and separated with a . scope.collection
      • default scope can be named or implied .collection
      • default collection can be named or implied _default.
      • default collection and scope can be implied .

      Attachments

        Issue Links

          Activity

            People

              avsej Sergey Avseyev
              jwalker Jim Walker
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                PagerDuty