You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Sam Tunnicliffe (JIRA)" <ji...@apache.org> on 2016/04/01 15:48:25 UTC

[jira] [Updated] (CASSANDRA-11456) support for PreparedStatement with LIKE

     [ https://issues.apache.org/jira/browse/CASSANDRA-11456?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sam Tunnicliffe updated CASSANDRA-11456:
----------------------------------------
    Resolution: Fixed
        Status: Resolved  (was: Patch Available)

Thanks, committed to trunk in {{bdae4520c5bd19caf607ed92eea3e8c02a694bd0}} with a couple of minor changes:

* Moved the new utest from {{SelectTest}} to {{SecondaryIndexTest}}
* The {{Operator::isLike()}} I'd added wasn't necessary (& was unused in the patch), so I've removed that


> support for PreparedStatement with LIKE
> ---------------------------------------
>
>                 Key: CASSANDRA-11456
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-11456
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: CQL
>            Reporter: Pavel Yaskevich
>            Assignee: Sam Tunnicliffe
>            Priority: Minor
>             Fix For: 3.6
>
>
> Using the Java driver for example:
> {code}
> PreparedStatement pst = session.prepare("select * from test.users where first_name LIKE ?");
> BoundStatement bs = pst.bind("Jon%");
> {code}
> The first line fails with {{SyntaxError: line 1:47 mismatched input '?' expecting STRING_LITERAL}} (which makes sense since it's how it's declared in the grammar). Other operators declare the right-hand side value as a {{Term.Raw}}, which can also be a bind marker.
> I think users will expect to be able to bind the argument this way.



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