Skip to content

Commit

Permalink
Add help for INSERT to cqlsh.
Browse files Browse the repository at this point in the history
Patch by Paul Cannon, reviewed by brandonwilliams for CASSANDRA-3718.
  • Loading branch information
driftx committed Jan 10, 2012
1 parent e2231a1 commit 2bb862c
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions bin/cqlsh
Expand Up @@ -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>
Expand Down

0 comments on commit 2bb862c

Please sign in to comment.