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

Gary Dusbabek commented on CASSANDRA-2302:
------------------------------------------

Newest patch offers a ResultSetMetaData implementation that is more true to the 
JDBC spec.  The ResultSetMetaData interface is limited in that it only exposes 
type information for column values.  I've exposed CassandraResultSetMetaData to 
remedy this.  It can be accessed this way: 
{code}
ResultSet rs = stmt.executeQuery("select ...");
ResultSetMetaData md = rs.getMetaData();
CassandraResultSetMetaData cmd = md.unwrap(CassandraResultSetMetaData.class);
{code}
CassandraResultSetMetaData is a long name to type out. I'm not opposed to 
renaming it CassandraResultMetaData or something else shorter.

One aspect of CassandraResultSetMetaData that is different than the traditional 
ResultSetMetaData is that it answers questions about the *current row* and not 
the entire query (getColumnCount(), etc.), although type information (class 
names, etc.) will be constant for every row in a result set.

When the time comes, I think CassandraResultSetMetaData will be the appropriate 
place to expose decoded and typed row keys.

> JDBC driver needs ResultSet.getMetaData()
> -----------------------------------------
>
>                 Key: CASSANDRA-2302
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2302
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Gary Dusbabek
>            Assignee: Gary Dusbabek
>            Priority: Minor
>              Labels: cql
>             Fix For: 0.8
>
>         Attachments: v2-0001-implement-a-real-ResultSetMetaData.txt, 
> v2-0002-expose-CassandraResultSetMetaData-to-inspect-type-info.txt, 
> v2-0003-oh-yeah.-RSMD-column-index-all-need-to-be-off-by-one.txt, 
> v2-0004-cache-comparator-and-validator-in-the-resultset.txt
>
>


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

Reply via email to