cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbros...@apache.org
Subject [1/2] git commit: add help topic COMPOUND_PRIMARY_KEYS for cqlsh patch by dbrosius reviewed by jbellis for cassandra-6076
Date Mon, 23 Sep 2013 03:48:18 GMT
Updated Branches:
  refs/heads/cassandra-2.0 7ce28f81f -> 05952e7c6


add help topic COMPOUND_PRIMARY_KEYS for cqlsh
patch by dbrosius reviewed by jbellis for cassandra-6076


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/7fdcbd0b
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/7fdcbd0b
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/7fdcbd0b

Branch: refs/heads/cassandra-2.0
Commit: 7fdcbd0b433f9c30459f17527a05e5a87eb8efab
Parents: fb43309
Author: Dave Brosius <dbrosius@apache.org>
Authored: Sun Sep 22 23:44:05 2013 -0400
Committer: Dave Brosius <dbrosius@apache.org>
Committed: Sun Sep 22 23:44:05 2013 -0400

----------------------------------------------------------------------
 pylib/cqlshlib/helptopics.py | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/7fdcbd0b/pylib/cqlshlib/helptopics.py
----------------------------------------------------------------------
diff --git a/pylib/cqlshlib/helptopics.py b/pylib/cqlshlib/helptopics.py
index cdbb8f4..5130a23 100644
--- a/pylib/cqlshlib/helptopics.py
+++ b/pylib/cqlshlib/helptopics.py
@@ -226,7 +226,7 @@ class CQLHelpTopics(object):
         CollatingOrderPreservingPartitioner both require UTF-8 keys.
 
         In cql3 mode, a table can have multiple columns composing the primary
-        key (see HELP COMPOSITE_PRIMARY_KEYS).
+        key (see HELP COMPOUND_PRIMARY_KEYS).
 
         For more information, see one of the following:
 
@@ -235,6 +235,22 @@ class CQLHelpTopics(object):
         """
     help_create_columnfamily = help_create_table
 
+    def help_compound_primary_keys(self):
+        print """
+        CREATE TABLE <cfname> ( <partition_key> <type>, <clustering_key1>
type, <clustering_key2> type,
+                                [, ...]], PRIMARY KEY (<partition_key>, <clustering_key1>,
<clustering_key2>);
+
+        CREATE TABLE allows a primary key composed of multiple columns. When this is the
case, specify
+        the columns that take part in the compound key after all columns have been specified.
+
+        , PRIMARY KEY( <key1>, <key2>, ... )
+
+        The partitioning key itself can be a compound key, in which case the first element
of the PRIMARY KEY
+        phrase should be parenthesized, as
+
+        PRIMARY KEY ((<partition_key_part1>, <partition_key_part2>), <clustering_key>)
+        """
+
     def help_create_table_types(self):
         print """
         CREATE TABLE: Specifying column types


Mime
View raw message