Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 488B3CAAA for ; Mon, 23 Sep 2013 03:46:28 +0000 (UTC) Received: (qmail 16010 invoked by uid 500); 23 Sep 2013 03:46:26 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 15809 invoked by uid 500); 23 Sep 2013 03:46:25 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 15800 invoked by uid 99); 23 Sep 2013 03:46:20 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 23 Sep 2013 03:46:20 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id A89AF8B0BF0; Mon, 23 Sep 2013 03:46:19 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: dbrosius@apache.org To: commits@cassandra.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: 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:46:19 +0000 (UTC) Updated Branches: refs/heads/cassandra-1.2 fb43309b4 -> 7fdcbd0b4 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-1.2 Commit: 7fdcbd0b433f9c30459f17527a05e5a87eb8efab Parents: fb43309 Author: Dave Brosius Authored: Sun Sep 22 23:44:05 2013 -0400 Committer: Dave Brosius 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 ( , type, type, + [, ...]], PRIMARY KEY (, , ); + + 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( , , ... ) + + 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 ((, ), ) + """ + def help_create_table_types(self): print """ CREATE TABLE: Specifying column types