[
https://issues.apache.org/jira/browse/CASSANDRA-2124?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12994900#comment-12994900
]
Eric Evans commented on CASSANDRA-2124:
---------------------------------------
bq. 1. BytesType (to be decoded as String ?)
These should be returned as-is (as ByteBuffers).
{quote}
1.a. AsciiType (to be decoded as String ?)
1.b. UTF8Type (to be decoded as String ?)
{quote}
As strings, yes. Values of type UTF8Type should be decoded using the utf8
charset.
bq. 2. IntegerType (to be decoded as Integer?)
java.math.BigInteger
{quote}
3. LexicalUUIDType (to be decoded as String ?)
5. TimeUUIDType (to be decoded as Date ?)
{quote}
java.util.UUID
bq. 4. LongType (to be decoded as Long ?)
Yes
bq. 6. LocalByPartionerType (Not sure)
You can disregard this one.
{quote}
While executing a cql query, we need to know it's column family name. So that
we can ask DefaultDecoder to return all column names with correct
decoding(mentioned above). Ways to retrieve this is :
1) Use CqlParser to get Statement and retrieve it from StatementType.(Same way
as it is done in QueryProcessor).
{quote}
This is pretty heavy-weight because it not only means including all of
{{o.a.c.cql}} in the drivers jar, but requiring its dependencies as well (antlr
at least).
bq. 2. Writing a logic to retrieve ColumnFamily name via substring of cql query
does not make any sense.
I don't think it's too bad. You're talking about a couple of very trivial,
pre-compiled regexes (one for {{USE}} to track the current keyspace, and one
for {{SELECT}} to get the columnfamily). For what it's worth, drivers written
in other languages are faced with solving the same problem, and utilizing the
node-side parser is not an option for them.
bq. 3. Is there a way to get ColumnFamily Name from CqlResult/CqlRow itself?.
This strikes as me as wasteful since the results will always correlate to a
single column family, (and we shouldn't need the node to tell us).
> JDBC driver for CQL
> -------------------
>
> Key: CASSANDRA-2124
> URL: https://issues.apache.org/jira/browse/CASSANDRA-2124
> Project: Cassandra
> Issue Type: New Feature
> Components: API
> Reporter: Eric Evans
> Assignee: Vivek Mishra
> Priority: Minor
> Labels: cql
> Attachments: Cassandra-2124_v1.0, cassandra-0.7.1-2124_v2.0,
> cassandra-0.7.1-2124_v2.1
>
>
> A simple connection class and corresponding pool was created for CQL as a
> part of CASSANDRA-1710, but a JDBC driver (either in addition to, or as a
> replacement for) would also be interesting.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira