cbt docs: Calling out raw byte support for cbt lookup command and generating docs for dropallrows.
Fixes #1195
Change-Id: I7e3fc159e84eafc31fd283ed53371fc222558620
Reviewed-on: https://code-review.googlesource.com/c/gocloud/+/47090
Reviewed-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Igor Bernstein <igorbernstein@google.com>
diff --git a/bigtable/cmd/cbt/cbt.go b/bigtable/cmd/cbt/cbt.go
index 5c1081c..ebfd441 100644
--- a/bigtable/cmd/cbt/cbt.go
+++ b/bigtable/cmd/cbt/cbt.go
@@ -403,10 +403,12 @@
do: doLookup,
Usage: "cbt lookup <table-id> <row-key> [columns=<family>:<qualifier>,...] [cells-per-column=<n>] " +
" [app-profile=<app profile id>]\n" +
+ " row-key String value of key, raw bytes are supported but need to be prefixed with a dollar sign and use single quotes\n" +
" columns=<family>:<qualifier>,... Read only these columns, comma-separated\n" +
" cells-per-column=<n> Read only this number of cells per column\n" +
" app-profile=<app-profile-id> The app profile ID to use for the request\n\n" +
- " Example: cbt lookup mobile-time-series phone#4c410523#20190501 columns=stats_summary:os_build,os_name cells-per-column=1",
+ " Example: cbt lookup mobile-time-series phone#4c410523#20190501 columns=stats_summary:os_build,os_name cells-per-column=1\n" +
+ " Example: cbt lookup mobile-time-series $'\\x41\\x42'",
Required: cbtconfig.ProjectAndInstanceRequired,
},
{
diff --git a/bigtable/cmd/cbt/cbtdoc.go b/bigtable/cmd/cbt/cbtdoc.go
index b172471..5cefbdb 100644
--- a/bigtable/cmd/cbt/cbtdoc.go
+++ b/bigtable/cmd/cbt/cbtdoc.go
@@ -38,6 +38,7 @@
deletecolumn Delete all cells in a column
deletefamily Delete a column family
deleterow Delete a row
+ deleteallrows Delete all rows
deletetable Delete a table
doc Print godoc-suitable documentation for cbt
help Print help text
@@ -232,6 +233,16 @@
+Delete all rows
+
+Usage:
+ cbt deleteallrows <table-id>
+
+ Example: cbt deleteallrows mobile-time-series
+
+
+
+
Delete a table
Usage:
@@ -280,11 +291,13 @@
Usage:
cbt lookup <table-id> <row-key> [columns=<family>:<qualifier>,...] [cells-per-column=<n>] [app-profile=<app profile id>]
+ row-key String value of key, raw bytes are supported but need to be prefixed with a dollar sign and use single quotes
columns=<family>:<qualifier>,... Read only these columns, comma-separated
cells-per-column=<n> Read only this number of cells per column
app-profile=<app-profile-id> The app profile ID to use for the request
Example: cbt lookup mobile-time-series phone#4c410523#20190501 columns=stats_summary:os_build,os_name cells-per-column=1
+ Example: cbt lookup mobile-time-series $'\x41\x42'