[ 
https://issues.apache.org/jira/browse/CASSANDRA-5576?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13681562#comment-13681562
 ] 

Aleksey Yeschenko commented on CASSANDRA-5576:
----------------------------------------------

Yep, that's the CQL3 syntax we want. I'll open a ticket for me to update CREATE 
CUSTOM INDEX to switch to USING as well.

I'm afraid that schema_triggers schema like this is not enough - won't allow 
options in the future (and changing this schema is gonna be *a lot* more 
painful than adding WITH to the CREATE statement).

Can't we use

{noformat}
CREATE TABLE schema_triggers (
  keyspace_name text,
  columnfamily_name text,
  trigger_name text,
  trigger_options map<text, text>,
  PRIMARY KEY (keyspace_name, columnfamily_name, trigger_name)
);
{noformat}
, as it was suggested in 
https://issues.apache.org/jira/browse/CASSANDRA-5576?focusedCommentId=13669381&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13669381
 initially?

Your example would translate to
keyspace_name=Keyspace1, column_family=Standard1, trigger_name=test2, 
trigger_options={class:org.apache.cassandra.triggers.InvertedIndex}

Will also need to update the cli syntax to something column_metadata-like

{noformat}
update column family Standard1 with triggers = [
{trigger_name: test2, class: org.apache.cassandra.triggers.InvertedIndex}
];
{noformat}
                
> CREATE/DROP TRIGGER in CQL
> --------------------------
>
>                 Key: CASSANDRA-5576
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-5576
>             Project: Cassandra
>          Issue Type: Bug
>          Components: API, Core
>            Reporter: Jonathan Ellis
>            Assignee: Vijay
>             Fix For: 2.0
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to