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

Benjamin Lerer updated CASSANDRA-9632:
--------------------------------------
    Attachment: 9632-2.2.txt

{{OptionsWithNames}} is used for prepared statement with named parameters, but 
as specified in the native_protocol specifications the parameter names are 
optional. The java driver and the python driver for example do not return them.

[~thobbs] indicated me that we store the bound names in the 
{{ParsedStatement.Prepared}}. The patch retrieve the column specification from 
theres and make them available for any prepared statement through the  
{{QueryOptions.hasColumnSpecifications()}} and 
{{QueryOptions.getColumnSpecifications()}} methods.

* The results for the unit tests for 2.2 are 
[here|http://cassci.datastax.com/view/Dev/view/blerer/job/blerer-9636-2.0-testall/2/]
* The results for the dtests for 2.2 are 
[here|http://cassci.datastax.com/view/Dev/view/blerer/job/blerer-9636-2.0-dtest/2/]
* The results for the unit tests for 3.0 are 
[here|http://cassci.datastax.com/view/Dev/view/blerer/job/blerer-9632-3.0-testall/2/]
* The results for the unit tests for 3.0 are 
[here|http://cassci.datastax.com/view/Dev/view/blerer/job/blerer-9632-3.0-dtest/2/]

> Preserve the Names of Query Parameters in QueryOptions
> ------------------------------------------------------
>
>                 Key: CASSANDRA-9632
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-9632
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: stephen mallette
>            Assignee: Benjamin Lerer
>            Priority: Minor
>             Fix For: 2.2.x
>
>         Attachments: 9632-2.2.txt
>
>
> When writing a custom {{QueryHandler}} that processes named parameters, the 
> {{QueryOptions}} arrive to the various processing methods with the values 
> converted to positional arguments and the names unavailable.  A custom 
> {{QueryHandler}} might want to make use of the names themselves so it would 
> be helpful if they were preserved and exposed with their respective 
> {{ByteBuffer}} values.
> https://github.com/apache/cassandra/blob/cassandra-2.1/src/java/org/apache/cassandra/cql3/QueryOptions.java#L205



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

Reply via email to