-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for named parameters in queries #172
Comments
Thanks for raising the issue. You're right these don't work yet in Scassandra. Would you be up for trying to raise a PR? |
I'm really sorry, but I won't have time to create a fix :(. |
no problem i think @tolbertam will be fixing it very soon |
👍 I'll give this ago after #171 |
@tolbertam did this get fixed as of #171? |
It was not, but I can work on this next unless someone else wants to give it a shot. The code is in place to parse the protocol level stuff, so it's just a matter of parsing for |
@tolbertam was just wondering, due to your last comment :) I'm not proficient in scala, unfortunately |
@vroldanbet, no worries :). There is this and a few other follow ons i need to do after completing #171. I'll take a look at these next within in the next week or so. |
Hi,
I try to use a Cql query containing named parameters, such as "select * from person where first_name = :first and last_name = :last".
But when I try to set the parameters value using
boundQuery.setString("firstName", "foo").setString("last_name", "bar")
I got an error.The error is the following:
java.lang.IllegalArgumentException: first is not a column defined in this metadata at com.datastax.driver.core.ColumnDefinitions.getAllIdx(ColumnDefinitions.java:266) at com.datastax.driver.core.BoundStatement$DataWrapper.getAllIndexesOf(BoundStatement.java:1364) at com.datastax.driver.core.AbstractData.setString(AbstractData.java:254) at com.datastax.driver.core.BoundStatement.setString(BoundStatement.java:449) ....
It works if I use question marks for the parameters '?'.
Am I doing something wrong, or are the named parameters not supported by scassandra?
Thanks,
The text was updated successfully, but these errors were encountered: