You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Blake Visin (JIRA)" <ji...@apache.org> on 2011/07/13 22:08:00 UTC

[jira] [Created] (CASSANDRA-2898) Escape characters in CQL

Escape characters in CQL
------------------------

                 Key: CASSANDRA-2898
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2898
             Project: Cassandra
          Issue Type: Bug
          Components: Drivers
            Reporter: Blake Visin


When trying to get all the columns named "fmd:" in cqlsh you can not escape : or ;

As per Jonathan Ellis:
You can escape quotes but I don't think you can escape semicolons.

Try:
sqlsh> select 'fmd:'..'fmd;' from feeds;

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CASSANDRA-2898) Escape characters in CQL

Posted by "Brandon Williams (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2898?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brandon Williams updated CASSANDRA-2898:
----------------------------------------

    Attachment: 2898.txt

Patch to allow escaping colons with a backslash.

> Escape characters in CQL
> ------------------------
>
>                 Key: CASSANDRA-2898
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2898
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Drivers
>            Reporter: Blake Visin
>            Assignee: Brandon Williams
>              Labels: cql
>         Attachments: 2898.txt
>
>
> When trying to get all the columns named "fmd:" in cqlsh you can not escape : or ;
> As per Jonathan Ellis:
> You can escape quotes but I don't think you can escape semicolons.
> Try:
> sqlsh> select 'fmd:'..'fmd;' from feeds;

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CASSANDRA-2898) Escape characters in CQL

Posted by "Brandon Williams (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2898?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brandon Williams updated CASSANDRA-2898:
----------------------------------------

    Attachment:     (was: 2898.txt)

> Escape characters in CQL
> ------------------------
>
>                 Key: CASSANDRA-2898
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2898
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Drivers
>            Reporter: Blake Visin
>            Assignee: Brandon Williams
>              Labels: cql
>         Attachments: 2898.txt
>
>
> When trying to get all the columns named "fmd:" in cqlsh you can not escape : or ;
> As per Jonathan Ellis:
> You can escape quotes but I don't think you can escape semicolons.
> Try:
> sqlsh> select 'fmd:'..'fmd;' from feeds;

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (CASSANDRA-2898) Escape characters in CQL

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2898?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis reassigned CASSANDRA-2898:
-----------------------------------------

    Assignee: Brandon Williams  (was: Pavel Yaskevich)

> Escape characters in CQL
> ------------------------
>
>                 Key: CASSANDRA-2898
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2898
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Drivers
>            Reporter: Blake Visin
>            Assignee: Brandon Williams
>              Labels: cql
>
> When trying to get all the columns named "fmd:" in cqlsh you can not escape : or ;
> As per Jonathan Ellis:
> You can escape quotes but I don't think you can escape semicolons.
> Try:
> sqlsh> select 'fmd:'..'fmd;' from feeds;

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-2898) Escape characters in CQL

Posted by "Blake Visin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2898?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13073617#comment-13073617 ] 

Blake Visin commented on CASSANDRA-2898:
----------------------------------------

I did not explain exactly.  

Try 

cqlsh> update foo set 'fmd:test' = 'foo' where key = 'test';
Unmatched named substitution: 'test' not given for update foo set 'fmd:test' = 'foo' where key = 'test';

You can not escape a colon.


> Escape characters in CQL
> ------------------------
>
>                 Key: CASSANDRA-2898
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2898
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Drivers
>            Reporter: Blake Visin
>            Assignee: Brandon Williams
>              Labels: cql
>
> When trying to get all the columns named "fmd:" in cqlsh you can not escape : or ;
> As per Jonathan Ellis:
> You can escape quotes but I don't think you can escape semicolons.
> Try:
> sqlsh> select 'fmd:'..'fmd;' from feeds;

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-2898) Escape characters in CQL

Posted by "Brandon Williams (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2898?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13072915#comment-13072915 ] 

Brandon Williams commented on CASSANDRA-2898:
---------------------------------------------

I don't see the problem:
{noformat}
cqlsh> create columnfamily foo (KEY text primary key);
cqlsh> update foo set 'fmd:' = 'foo' where key = 'test';
cqlsh> select * from foo where key = 'test';
  KEY | fmd: |
 test |  foo |

cqlsh> 
cqlsh> select 'fmd:' from foo where key = 'test';
 fmd: |
  foo |

cqlsh> update foo set 'fmd;' = 'foo' where key = 'test';
cqlsh> select 'fmd:'..'fmd;' from foo where key = 'test';
 fmd: | fmd; |
  foo |  foo |

cqlsh>
{noformat}

> Escape characters in CQL
> ------------------------
>
>                 Key: CASSANDRA-2898
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2898
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Drivers
>            Reporter: Blake Visin
>            Assignee: Brandon Williams
>              Labels: cql
>
> When trying to get all the columns named "fmd:" in cqlsh you can not escape : or ;
> As per Jonathan Ellis:
> You can escape quotes but I don't think you can escape semicolons.
> Try:
> sqlsh> select 'fmd:'..'fmd;' from feeds;

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CASSANDRA-2898) Escape characters in CQL

Posted by "Brandon Williams (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2898?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brandon Williams updated CASSANDRA-2898:
----------------------------------------

    Attachment: 2898.txt

> Escape characters in CQL
> ------------------------
>
>                 Key: CASSANDRA-2898
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2898
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Drivers
>            Reporter: Blake Visin
>            Assignee: Brandon Williams
>              Labels: cql
>         Attachments: 2898.txt
>
>
> When trying to get all the columns named "fmd:" in cqlsh you can not escape : or ;
> As per Jonathan Ellis:
> You can escape quotes but I don't think you can escape semicolons.
> Try:
> sqlsh> select 'fmd:'..'fmd;' from feeds;

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-2898) Escape characters in CQL

Posted by "Blake Visin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-2898?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13081275#comment-13081275 ] 

Blake Visin commented on CASSANDRA-2898:
----------------------------------------

Patch looks to have solved the problem.  I have been using it for about a week now, and have had no further problems.  You can escape colons by using \ (backslash).  

Thanks Brandon!

> Escape characters in CQL
> ------------------------
>
>                 Key: CASSANDRA-2898
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2898
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Drivers
>            Reporter: Blake Visin
>            Assignee: Brandon Williams
>              Labels: cql
>         Attachments: 2898.txt
>
>
> When trying to get all the columns named "fmd:" in cqlsh you can not escape : or ;
> As per Jonathan Ellis:
> You can escape quotes but I don't think you can escape semicolons.
> Try:
> sqlsh> select 'fmd:'..'fmd;' from feeds;

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (CASSANDRA-2898) Escape characters in CQL

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-2898?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis reassigned CASSANDRA-2898:
-----------------------------------------

    Assignee: Pavel Yaskevich

> Escape characters in CQL
> ------------------------
>
>                 Key: CASSANDRA-2898
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2898
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Drivers
>            Reporter: Blake Visin
>            Assignee: Pavel Yaskevich
>              Labels: cql
>
> When trying to get all the columns named "fmd:" in cqlsh you can not escape : or ;
> As per Jonathan Ellis:
> You can escape quotes but I don't think you can escape semicolons.
> Try:
> sqlsh> select 'fmd:'..'fmd;' from feeds;

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira