delete
Encapsulates commands that delete key/value pairs from store or rows from table. The subcommands are as follows:
delete kv
delete kv [-key <key>] [-start prefixString] [-end prefixString] [-all] Deletes one or more keys. If -all is specified, delete all keys starting at the specified key. If no key is specified, delete all keys in the store. The -start and -end flags can be used for restricting the range used for deleting.
For example, to delete all keys in the store starting at root:
kv -> delete kv -all
301 Keys deleted starting at root delete table
kv-> delete table -name <table_name>
[-field <name> -value <value>]*
[-field <name> [-start <value>] [-end <value>]]
[-ancestor <name>]* [-child <child_name>]*
[-json <string>] [-delete-all] Deletes one or multiple rows from the named table.
-nameIdentifies a table name, which can be any of the following:
table_name– The target table is a top level table created in the default namespace,sysdefault. The default namespace (sysdefault:) prefix is not required to identify such tables.table_name.child_name– The target table is the child of a parent table. Identify the child table by preceding it with the parenttable_name, followed by a period (.) separator beforechild_name.namespace_name:table_name– The target table was not created in the default (sysdefault) namespace. Identifytable_nameby preceding it with itsnamespace_name, followed by a colon (:).namespace_name:table_name.child_name– The target table is the child of a parent table that was created in a namespace. Identifychild_nameby preceding it with bothnamespace_name:and the parenttable_name, , followed by a period (.) separator.
-
-fieldand-valuePairs specify the field values of the primary key or, use an empty key to delete all rows from the table.
-
-field,-start, and-endUse these flags to restrict the sub-range for deletion associated with the parent key.
-
-ancestorand-childUse to delete rows from a specific ancestor or descendant tables, in addition to the target table.
-
-jsonIndicates that the key field values are in JSON format.
-
-delete-allIndicates to delete all rows in a table.