cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Jirsa (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-12718) typo in cql examples
Date Wed, 28 Sep 2016 03:37:21 GMT

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

Jeff Jirsa commented on CASSANDRA-12718:
----------------------------------------

{code}
CREATE TABLE images (
    name text PRIMARY KEY,
    owner text,
    tags set<text> // A set of text values
);


INSERT INTO images (name, owner, tags)
            VALUES ('cat.jpg', 'jsmith', { 'pet', 'cute' });

// Replace the existing set entirely
UPDATE images SET tags = { 'kitten', 'cat', 'lol' } WHERE id = 'jsmith';
{code}

{{jsmith}} is {{owner}}, not {{name}}, so in addition to changing {{id}} to {{name}}, we (you)
should also change {{jsmith}} to {{cat.jpg}}. 

> typo in cql examples 
> ---------------------
>
>                 Key: CASSANDRA-12718
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-12718
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Documentation and Website
>            Reporter: Jon Haddad
>            Assignee: Jeff Jirsa
>            Priority: Trivial
>
> select query on sets using the wrong field



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message