Merge branch 'cassandra-2.2' into cassandra-3.0

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

Branch: refs/heads/trunk
Commit: 8d101fdd5c8a5ba1795b5c233b5e4bcdf5ddff19
Parents: a64ad4e 5e2d3d2
Author: Sylvain Lebresne <sylv...@datastax.com>
Authored: Thu Mar 17 10:21:46 2016 +0100
Committer: Sylvain Lebresne <sylv...@datastax.com>
Committed: Thu Mar 17 10:21:46 2016 +0100

----------------------------------------------------------------------
 doc/cql3/CQL.textile | 26 +++++++++++++++++---------
 1 file changed, 17 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/8d101fdd/doc/cql3/CQL.textile
----------------------------------------------------------------------
diff --cc doc/cql3/CQL.textile
index 68333ab,af584d0..059b195
--- a/doc/cql3/CQL.textile
+++ b/doc/cql3/CQL.textile
@@@ -875,11 -822,8 +879,11 @@@ bc(syntax).
  <where-clause> ::= <relation> ( AND <relation> )*
  
  <relation> ::= <identifier> '=' <term>
 -             | <identifier> IN '(' ( <term> ( ',' <term> )* )? ')'
 +             | '(' <identifier> (',' <identifier>)* ')' '=' <term-tuple>
 +             | <identifier> IN '(' ( <term> ( ',' <term>)* )? ')'
-              | <identifier> IN '?'
+              | <identifier> IN <variable>
 +             | '(' <identifier> (',' <identifier>)* ')' IN '(' ( <term-tuple> 
( ',' <term-tuple>)* )? ')'
-              | '(' <identifier> (',' <identifier>)* ')' IN '?'
++             | '(' <identifier> (',' <identifier>)* ')' IN <variable>
  
  <option> ::= TIMESTAMP <integer>
             | TTL <integer>
@@@ -895,11 -839,11 +899,11 @@@ WHERE movie = 'Serenity'
  
  UPDATE UserActions SET total = total + 2 WHERE user = 
B70DE1D0-9908-4AE3-BE34-5573E5B09F14 AND action = 'click';
  p. 
 -The @UPDATE@ statement writes one or more columns for a given row in a table. 
The @<where-clause>@ is used to select the row to update and must include all 
columns composing the @PRIMARY KEY@ (the @IN@ relation is only supported for 
the last column of the partition key). Other columns values are specified 
through @<assignment>@ after the @SET@ keyword.
 +The @UPDATE@ statement writes one or more columns for a given row in a table. 
The @<where-clause>@ is used to select the row to update and must include all 
columns composing the @PRIMARY KEY@. Other columns values are specified through 
@<assignment>@ after the @SET@ keyword.
  
- Note that unlike in SQL, @UPDATE@ does not check the prior existence of the 
row by default: the row is created if none existed before, and updated 
otherwise. Furthermore, there are no means to know whether a creation or update 
occurred.
 -Note that unlike in SQL, @UPDATE@ does not check the prior existence of the 
row by default (except through the use of @<condition>@, see below): the row is 
created if none existed before, and updated otherwise. Furthermore, there is no 
mean to know which of creation or update happened.
++Note that unlike in SQL, @UPDATE@ does not check the prior existence of the 
row by default (except through the use of @<condition>@, see below): the row is 
created if none existed before, and updated otherwise. Furthermore, there are 
no means to know whether a creation or update occurred.
  
 -It is however possible to use the conditions on some columns through @IF@, in 
which case the row will not be updated unless such condition are met. But 
please note that using @IF@ conditions will incur a non negligible performance 
cost (internally, Paxos will be used) so this should be used sparingly.
 +It is however possible to use the conditions on some columns through @IF@, in 
which case the row will not be updated unless the conditions are met. But, 
please note that using @IF@ conditions will incur a non-negligible performance 
cost (internally, Paxos will be used) so this should be used sparingly.
  
  In an @UPDATE@ statement, all updates within the same partition key are 
applied atomically and in isolation.
  
@@@ -929,16 -873,16 +933,20 @@@ bc(syntax).
  
  <where-clause> ::= <relation> ( AND <relation> )*
  
 -<relation> ::= <identifier> '=' <term>
 -             | <identifier> IN '(' ( <term> ( ',' <term> )* )? ')'
 +<relation> ::= <identifier> <op> <term>
 +             | '(' <identifier> (',' <identifier>)* ')' <op> <term-tuple>
 +             | <identifier> IN '(' ( <term> ( ',' <term>)* )? ')'
-              | <identifier> IN '?'
+              | <identifier> IN <variable>
 +             | '(' <identifier> (',' <identifier>)* ')' IN '(' ( <term-tuple> 
( ',' <term-tuple>)* )? ')'
-              | '(' <identifier> (',' <identifier>)* ')' IN '?'
++             | '(' <identifier> (',' <identifier>)* ')' IN <variable>
  
 -<condition> ::= <identifier> <op> <term>
 +<op> ::= '=' | '<' | '>' | '<=' | '>='
- <condition> ::= <identifier> '=' <term>
-               | <identifier> '[' <term> ']' '=' <term>
++
++<condition> ::= <identifier> (<op> | '!=') <term>
+               | <identifier> IN (<variable> | '(' ( <term> ( ',' <term> )* )? 
')')
 -              | <identifier> '[' <term> ']' <op> <term>
++              | <identifier> '[' <term> ']' (<op> | '!=') <term>
+               | <identifier> '[' <term> ']' IN <term>
+ 
 -<op> ::= '<' | '<=' | '=' | '!=' | '>=' | '>'
  p. 
  __Sample:__
  

Reply via email to