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 3A7069511 for ; Mon, 16 Jul 2012 17:24:10 +0000 (UTC) Received: (qmail 83239 invoked by uid 500); 16 Jul 2012 17:24:10 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 83204 invoked by uid 500); 16 Jul 2012 17:24:10 -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 83195 invoked by uid 99); 16 Jul 2012 17:24:10 -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, 16 Jul 2012 17:24:10 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id CEFB114904; Mon, 16 Jul 2012 17:24:09 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: slebresne@apache.org To: commits@cassandra.apache.org X-Mailer: ASF-Git Admin Mailer Subject: git commit: Minor edit to CQL3 doc Message-Id: <20120716172409.CEFB114904@tyr.zones.apache.org> Date: Mon, 16 Jul 2012 17:24:09 +0000 (UTC) Updated Branches: refs/heads/cassandra-1.1 35335caa0 -> 4a002a579 Minor edit to CQL3 doc Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/4a002a57 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/4a002a57 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/4a002a57 Branch: refs/heads/cassandra-1.1 Commit: 4a002a5792d36eef38952cc7921bf4af904e142a Parents: 35335ca Author: Sylvain Lebresne Authored: Mon Jul 16 19:24:03 2012 +0200 Committer: Sylvain Lebresne Committed: Mon Jul 16 19:24:03 2012 +0200 ---------------------------------------------------------------------- doc/cql3/CQL.textile | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/4a002a57/doc/cql3/CQL.textile ---------------------------------------------------------------------- diff --git a/doc/cql3/CQL.textile b/doc/cql3/CQL.textile index 2255e0b..e0f25da 100644 --- a/doc/cql3/CQL.textile +++ b/doc/cql3/CQL.textile @@ -596,8 +596,6 @@ The @@ specifies which rows must be queried. It is composed of rel Not all relations are allowed in a query. For instance, non-equal relations (where @IN@ is considered as an equal relation) on a partition key is only supported if the partitioner for the keyspace is an ordered one. Moreover, for a given partition key, the clustering keys induce an ordering of rows and relations on them is restricted to the relations that allow to select a *contiguous* (for the ordering) set of rows. For instance, given -When specifying relations, the @TOKEN@ function can be used on the @PARTITION KEY@ column to query. In that case, rows will be selected based on the token of their @PARTITION_KEY@ rather than on the value (note that the token of a key depends on the partitioner in use). - bc(sample). CREATE TABLE posts ( userid text, @@ -620,6 +618,11 @@ bc(sample). // Needs a blog_title to be set to select ranges of posted_at SELECT entry_title, content FROM posts WHERE userid='john doe' AND posted_at >= 2012-01-01 AND posted_at < 2012-01-31 +When specifying relations, the @TOKEN@ function can be used on the @PARTITION KEY@ column to query. In that case, rows will be selected based on the token of their @PARTITION_KEY@ rather than on the value (note that the token of a key depends on the partitioner in use, and that in particular the RandomPartitioner won't yeld a meaningful order). Example: + +bc(sample). +SELECT * FROM posts WHERE token(userid) > token('tom') AND token(userid) < token('bob') + h4(#selectOrderBy). @@ The @ORDER BY@ option allows to select the order of the returned results. It takes as argument a list of column names along with the order for the column (@ASC@ for ascendant and @DESC@ for descendant, omitting the order being equivalent to @ASC@). Currently the possible orderings are limited (which depends on the table "@CLUSTERING ORDER@":#createTableOptions):