You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by br...@apache.org on 2012/01/10 21:08:01 UTC

git commit: Add help for INSERT to cqlsh. Patch by Paul Cannon, reviewed by brandonwilliams for CASSANDRA-3718.

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 <br...@apache.org>
Authored: Tue Jan 10 13:59:50 2012 -0600
Committer: Brandon Williams <br...@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>