You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by mi...@apache.org on 2014/09/01 21:21:16 UTC

[2/8] git commit: Allow triggers' names to be quoted identifiers

Allow triggers' names to be quoted identifiers

patch by Mikhail Stepura; reviewed by Sylvain Lebresne for CASSANDRA-7847


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

Branch: refs/heads/cassandra-2.1.0
Commit: 92a254a7266aaa6c64745997f5912c54617bcd21
Parents: ef89045
Author: Mikhail Stepura <mi...@apache.org>
Authored: Mon Sep 1 12:11:57 2014 -0700
Committer: Mikhail Stepura <mi...@apache.org>
Committed: Mon Sep 1 12:11:57 2014 -0700

----------------------------------------------------------------------
 NEWS.txt                                 | 3 +++
 src/java/org/apache/cassandra/cql3/Cql.g | 8 ++++----
 2 files changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/92a254a7/NEWS.txt
----------------------------------------------------------------------
diff --git a/NEWS.txt b/NEWS.txt
index 9b521e4..db34fd3 100644
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -47,6 +47,9 @@ New features
      longer a responsible for that range of keys.  
      If you want the old behavior (due to a lost node perhaps)
      you can set the following property (-Dcassandra.consistent.rangemovement=false)
+   - It is now possible to use quoted identifiers in triggers' names. 
+     WARNING: if you previously used triggers with capital letters in their 
+     names, then you must quote them from now on.
 
 Upgrading
 ---------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/92a254a7/src/java/org/apache/cassandra/cql3/Cql.g
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/cql3/Cql.g b/src/java/org/apache/cassandra/cql3/Cql.g
index 948cd5e..1ff6ab2 100644
--- a/src/java/org/apache/cassandra/cql3/Cql.g
+++ b/src/java/org/apache/cassandra/cql3/Cql.g
@@ -587,16 +587,16 @@ indexIdent returns [IndexTarget id]
  * CREATE TRIGGER triggerName ON columnFamily USING 'triggerClass';
  */
 createTriggerStatement returns [CreateTriggerStatement expr]
-    : K_CREATE K_TRIGGER (name=IDENT) K_ON cf=columnFamilyName K_USING cls=STRING_LITERAL
-      { $expr = new CreateTriggerStatement(cf, $name.text, $cls.text); }
+    : K_CREATE K_TRIGGER (name=cident) K_ON cf=columnFamilyName K_USING cls=STRING_LITERAL
+      { $expr = new CreateTriggerStatement(cf, name.toString(), $cls.text); }
     ;
 
 /**
  * DROP TRIGGER triggerName ON columnFamily;
  */
 dropTriggerStatement returns [DropTriggerStatement expr]
-    : K_DROP K_TRIGGER (name=IDENT) K_ON cf=columnFamilyName
-      { $expr = new DropTriggerStatement(cf, $name.text); }
+    : K_DROP K_TRIGGER (name=cident) K_ON cf=columnFamilyName
+      { $expr = new DropTriggerStatement(cf, name.toString()); }
     ;
 
 /**