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

Jonathan Ellis edited comment on CASSANDRA-3647 at 6/11/12 7:59 PM:
--------------------------------------------------------------------

Sorry, brainstorming again...

Could we do this instead of put/set?  (Do we want to?)

{noformat}
UPDATE foo SET M[ocd] = 1 WHERE ... ;
UPDATE foo SET L[0] = 1 WHERE ... ;
{noformat}

UNQL uses dot notation ({{SET M.odc = 1}}) but gives no examples of similar 
sugar for arrays, which leads me to infer that arrays can only be modified as 
an entire literal at once.

bq. add_all

What if we introduced the convention that using the + operator updates the 
list/set/map?  That is,

{noformat}
SET L = L + [2, 3]
SET S = S + {4, 5}
SET M = M + {'asdf': 6, 'fdsa': 7}
{noformat}

If we combined this with the [] syntax for setting a single item, that would 
just leave us with discard to solve and we wouldn't need this somewhat clunky 
"method call" syntax.

Maybe some extension to DELETE?
                
      was (Author: jbellis):
    Sorry, brainstorming again...

Could we do this instead of put/set?  (Do we want to?)

{noformat}
UPDATE foo SET M[ocd] = 1 WHERE ... ;
UPDATE foo SET L[0] = 1 WHERE ... ;
{noformat}

UNQL uses dot notation -- {{SET M.odc = 1}} -- but gives no examples of similar 
sugar for arrays, which leads me to infer that arrays can only be modified as 
an entire literal at once.

bq. add_all

What if we introduced the convention that using the + operator updates the 
list/set/map?  That is,

{noformat}
SET L = L + [2, 3]
SET S = S + {4, 5}
SET M = M + {'asdf': 6, 'fdsa': 7}
{noformat}

If we combined this with the [] syntax for setting a single item, that would 
just leave us with discard to solve and we wouldn't need this somewhat clunky 
"method call" syntax.

Maybe some extension to DELETE?
                  
> Support set and map value types in CQL
> --------------------------------------
>
>                 Key: CASSANDRA-3647
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3647
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: API, Core
>            Reporter: Jonathan Ellis
>            Assignee: Sylvain Lebresne
>              Labels: cql
>             Fix For: 1.2
>
>
> Composite columns introduce the ability to have arbitrarily nested data in a 
> Cassandra row.  We should expose this through CQL.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to