Merge branch 'cassandra-1.2' into cassandra-2.0.0

Conflicts:
	src/java/org/apache/cassandra/cql3/Cql.g
This commit is contained in:
Aleksey Yeschenko 2013-08-24 03:26:51 +03:00
commit 9a42e28d9f
2 changed files with 7 additions and 11 deletions

View File

@ -770,7 +770,7 @@ def update_indexbracket_completer(ctxt, cass):
syntax_rules += r'''
<deleteStatement> ::= "DELETE" ( <deleteSelector> ( "," <deleteSelector> )* )?
"FROM" cf=<columnFamilyName>
( "USING" [delopt]=<deleteOption> ( "AND" [delopt]=<deleteOption> )* )?
( "USING" [delopt]=<deleteOption> )?
"WHERE" <whereClause>
;
<deleteSelector> ::= delcol=<cident> ( memberbracket="[" memberselector=<term> "]" )?

View File

@ -306,19 +306,11 @@ insertStatement returns [UpdateStatement.ParsedInsert expr]
;
usingClause[Attributes.Raw attrs]
: K_USING usingClauseObjective[attrs] ( K_AND? usingClauseObjective[attrs] )*
;
usingClauseDelete[Attributes.Raw attrs]
: K_USING usingClauseDeleteObjective[attrs] ( K_AND? usingClauseDeleteObjective[attrs] )*
;
usingClauseDeleteObjective[Attributes.Raw attrs]
: K_TIMESTAMP ts=intValue { attrs.timestamp = ts; }
: K_USING usingClauseObjective[attrs] ( K_AND usingClauseObjective[attrs] )*
;
usingClauseObjective[Attributes.Raw attrs]
: usingClauseDeleteObjective[attrs]
: K_TIMESTAMP ts=intValue { attrs.timestamp = ts; }
| K_TTL t=intValue { attrs.timeToLive = t; }
;
@ -388,6 +380,10 @@ deleteOp returns [Operation.RawDeletion op]
| c=cident '[' t=term ']' { $op = new Operation.ElementDeletion(c, t); }
;
usingClauseDelete[Attributes.Raw attrs]
: K_USING K_TIMESTAMP ts=intValue { attrs.timestamp = ts; }
;
/**
* BEGIN BATCH
* UPDATE <CF> SET name1 = value1 WHERE KEY = keyname1;