You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by sl...@apache.org on 2014/04/22 10:12:30 UTC

git commit: Fix CQL version number for CASSANDRA-7055

Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.0 bc6f4d003 -> 48d7e4080


Fix CQL version number for CASSANDRA-7055


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

Branch: refs/heads/cassandra-2.0
Commit: 48d7e408085ff4f56a718487dedb05c23dfe57c9
Parents: bc6f4d0
Author: Sylvain Lebresne <sy...@datastax.com>
Authored: Tue Apr 22 10:12:19 2014 +0200
Committer: Sylvain Lebresne <sy...@datastax.com>
Committed: Tue Apr 22 10:12:19 2014 +0200

----------------------------------------------------------------------
 doc/cql3/CQL.textile                                | 16 +++++++++++++++-
 .../org/apache/cassandra/cql3/QueryProcessor.java   |  2 +-
 2 files changed, 16 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/48d7e408/doc/cql3/CQL.textile
----------------------------------------------------------------------
diff --git a/doc/cql3/CQL.textile b/doc/cql3/CQL.textile
index 3847701..f6208bf 100644
--- a/doc/cql3/CQL.textile
+++ b/doc/cql3/CQL.textile
@@ -497,13 +497,16 @@ bc(syntax)..
                   ( USING <option> ( AND <option> )* )?
                   SET <assignment> ( ',' <assignment> )*
                   WHERE <where-clause>
-                  ( IF <identifier> '=' <term> ( AND <identifier> '=' <term> )* )?
+                  ( IF <condition> ( AND condition )* )?
 
 <assignment> ::= <identifier> '=' <term>
                | <identifier> '=' <identifier> ('+' | '-') (<int-term> | <set-literal> | <list-literal>)
                | <identifier> '=' <identifier> '+' <map-literal>
                | <identifier> '[' <term> ']' '=' <term>
 
+<condition> ::= <identifier> '=' <term>
+              | <identifier> '[' <term> ']' '=' <term>
+
 <where-clause> ::= <relation> ( AND <relation> )*
 
 <relation> ::= <identifier> '=' <term>
@@ -552,6 +555,7 @@ bc(syntax)..
                   FROM <tablename>
                   ( USING TIMESTAMP <integer>)?
                   WHERE <where-clause>
+                  ( IF ( EXISTS | ( <condition> ( AND <condition> )*) ) )?
 
 <selection> ::= <identifier> ( '[' <term> ']' )?
 
@@ -560,6 +564,9 @@ bc(syntax)..
 <relation> ::= <identifier> '=' <term>
              | <identifier> IN '(' ( <term> ( ',' <term> )* )? ')'
              | <identifier> IN '?'
+
+<condition> ::= <identifier> '=' <term>
+              | <identifier> '[' <term> ']' '=' <term>
 p. 
 __Sample:__
 
@@ -574,6 +581,7 @@ The @DELETE@ statement deletes columns and rows. If column names are provided di
 
 In a @DELETE@ statement, all deletions within the same partition key are applied atomically and in isolation.
 
+A @DELETE@ operation application can be conditioned using @IF@ like for @UPDATE@ and @INSERT@. But please not that as for the later, this will incur a non negligible performance cost (internally, Paxos will be used) and so should be used sparingly.
 
 
 h3(#batchStmt). BATCH
@@ -1149,6 +1157,12 @@ h2(#changes). Changes
 
 The following describes the addition/changes brought for each version of CQL.
 
+h3. 3.1.6
+
+* A new "@uuid@ method":#uuidFun has been added.
+* Support for @DELETE ... IF EXISTS@ syntax.
+
+
 h3. 3.1.5
 
 * It is now possible to group clustering columns in a relatiion, see "SELECT Where clauses":#selectWhere.

http://git-wip-us.apache.org/repos/asf/cassandra/blob/48d7e408/src/java/org/apache/cassandra/cql3/QueryProcessor.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/QueryProcessor.java b/src/java/org/apache/cassandra/cql3/QueryProcessor.java
index 64ea5e5..ab0ea40 100644
--- a/src/java/org/apache/cassandra/cql3/QueryProcessor.java
+++ b/src/java/org/apache/cassandra/cql3/QueryProcessor.java
@@ -43,7 +43,7 @@ import org.apache.cassandra.utils.SemanticVersion;
 
 public class QueryProcessor implements QueryHandler
 {
-    public static final SemanticVersion CQL_VERSION = new SemanticVersion("3.1.5");
+    public static final SemanticVersion CQL_VERSION = new SemanticVersion("3.1.6");
 
     public static final QueryProcessor instance = new QueryProcessor();