Details
-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
None
-
None
-
1
Description
I noticed the 'cbc' (part of the libcouchbase so other tools will also suffer the same issue) doesn't have very good help yes it just works with the default scope/collection.
I have a keyspace of bulk.data.source and want to use cbc to create a document.
cbc create SampleDocument2 -V '{"a_key": "a_value"}' -U couchbase://localhost/bulk -u Administrator -P password --expiry=60
|
The above works but of course by default writes the document to bulk._default._default which is not what I wanted (fine for 6.6.2 but not 7.0).
I was trying to get it to work in 7.0 GA (with scope 'data' and collection 'source'), I took a long time to determine the needed options, the below does what I want.
cbc create SampleDocument2 -V '{"a_key": "a_value"}' -U couchbase://localhost/bulk --scope=data --collection=source -u Administrator -P password --expiry=60
|
However the options I needed like are not documented in the output of -h for help **
--scope=data --collection=source
|
As can be seen below there is no information on how to set a scope and a collection both of the options for -scope and -collection are undocumented:
cbc create -h
|
Option h requires argument
|
Usage:
|
create [OPTIONS...] KEY -V VALUE
|
Store item to the server
|
-P --password Bucket password [Default='']
|
-u --username Username [Default='']
|
-Z --config-cache Path to cached configuration [Default='']
|
-U --spec Connection string [Default='couchbase://localhost/default']
|
--truststorepath [Default='']
|
--certpath Path to server SSL certificate [Default='']
|
--keypath Path to client SSL private key [Default='']
|
-T --timings Enable command timings [Default=FALSE]
|
-v --verbose Set debugging output (specify multiple times for greater verbosity [Default=FALSE]
|
--dump Dump verbose internal state after operations are done [Default=FALSE]
|
-y --compress Turn on compression of outgoing data (second time to force compression) [Default=FALSE]
|
-D --cparam <OPTION=VALUE> Additional options for connection. Use -Dtimeout=SECONDS for KV operation timeout [Default=]
|
-M --mode <upsert|insert|replace> Mode to use when storing [Default='upsert']
|
-f --flags Flags for item [Default=0]
|
-e --expiry Expiry for item [Default=0]
|
-p --persist-to Wait until item is persisted to this number of nodes [Default=0]
|
-r --replicate-to Wait until item is replicated to this number of nodes [Default=0]
|
-V --value Value to use. If unspecified, read from standard input [Default='']
|
-J --json Indicate to the server that this item is JSON [Default=FALSE]
|
--scope Name of the collection scope [Default='_default']
|
--collection Name of the collection [Default='']
|
-d --durability Durability level [Default='none']
|
-? --help this message
|
Attachments
Issue Links
- relates to
-
CCBC-1482 Better Support for Scopes and Collections with `cbc` utils
- Resolved