Updated Branches: refs/heads/cassandra-1.0 e2231a197 -> 2bb862c32
Add help for INSERT to cqlsh. Patch by Paul Cannon, reviewed by brandonwilliams for CASSANDRA-3718. Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/2bb862c3 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/2bb862c3 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/2bb862c3 Branch: refs/heads/cassandra-1.0 Commit: 2bb862c320987bcc696765f4f5d8e3029db44371 Parents: e2231a1 Author: Brandon Williams <brandonwilli...@apache.org> Authored: Tue Jan 10 13:59:50 2012 -0600 Committer: Brandon Williams <brandonwilli...@apache.org> Committed: Tue Jan 10 13:59:50 2012 -0600 ---------------------------------------------------------------------- bin/cqlsh | 27 +++++++++++++++++++++++++++ 1 files changed, 27 insertions(+), 0 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/2bb862c3/bin/cqlsh ---------------------------------------------------------------------- diff --git a/bin/cqlsh b/bin/cqlsh index 72906b4..0f02a0c 100755 --- a/bin/cqlsh +++ b/bin/cqlsh @@ -1021,6 +1021,33 @@ class Shell(cmd.Cmd): Cassandra documentation. """ + def help_insert(self): + print """ + INSERT INTO <columnFamily> + ( <keyname>, <colname1> [, <colname2> [, ...]] ) + VALUES ( <keyval>, <colval1> [, <colval2> [, ...]] ) + [USING CONSISTENCY <consistencylevel> + [AND TIMESTAMP <timestamp>] + [AND TTL <timeToLive]]; + + An INSERT is used to write one or more columns to a record in a + Cassandra column family. No results are returned. + + The first column name in the INSERT list must be the name of the + column family key. Also, there must be more than one column name + specified (Cassandra rows are not considered to exist with only + a key and no associated columns). + + Unlike in SQL, the semantics of INSERT and UPDATE are identical. + In either case a record is created if none existed before, and + udpated when it does. For more information, see one of the + following: + + HELP UPDATE + HELP UPDATE_USING + HELP CONSISTENCYLEVEL + """ + def help_update(self): print """ UPDATE <columnFamily> [USING CONSISTENCY <consistencylevel>