cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From slebre...@apache.org
Subject git commit: Minor edit to CQL3 doc
Date Mon, 16 Jul 2012 17:24:09 GMT
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 <sylvain@datastax.com>
Authored: Mon Jul 16 19:24:03 2012 +0200
Committer: Sylvain Lebresne <sylvain@datastax.com>
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 @<where-clause>@ 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). @<order-by>@
 
 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):


Mime
View raw message