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

Michaël Figuière commented on CASSANDRA-4448:
---------------------------------------------

{quote}If you're writing application code, you should not be writing raw CQL; 
you should be using a higher-level, idiomatic API{quote}

Hibernate let users execute queries using either their their own SQL-ish query 
language (HQL) or their QueryBuilder API (Criteria). Actually as far as I can 
observe, most heavy-weight business applications that rely on Hibernate to 
execute many different kind of queries typically mostly use HQL as a proper 
String query often ends up being more readable and easier to maintain than a 
chain of methods. This different case might lead to different habits, but we 
should still consider CQL Language as a major API for applications.

{quote}There can be more than one such code, if only because a lot of people 
need to access their DB from multiple languages.{quote}

I think this is an important point: this feature allow for a central 
enforcement point for CL for applications that rely on default, thus 
simplifying the headache of changing the common CL.
Furthermore I guess some users will wish to decouple their application from CL 
configuration to allow them for some behavior or performance tuning over time. 
Typically I can imagine a DBA that want to trade some consistency for 
performance as a graceful degradation strategy will be happy to just have to 
push an {{ALTER}} command.
Not having it I guess many developers would follow the 
_parameterize-it-just-in-case_ strategy and this would lead to some additional 
properties in their {{.properties}} files, in the case of Java apps.
                
> CQL3: allow to define a per-cf default consistency level
> --------------------------------------------------------
>
>                 Key: CASSANDRA-4448
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4448
>             Project: Cassandra
>          Issue Type: New Feature
>            Reporter: Sylvain Lebresne
>              Labels: cql3
>             Fix For: 1.2
>
>
> One of the goal of CQL3 is that client library should not have to parse 
> queries to provide a good experience. In particular, that means such client 
> (that don't want to parse queries) won't be able to allow the user to define 
> a specific default read/write consistency level per-CF, forcing user to 
> specific the consistency level with every query, which is not very user 
> friendly.
> This ticket suggests the addition of per-cf default read/write consitency 
> level. Typically the syntax would be:
> {noformat}
> CREATE TABLE foo (...)
> WITH DEFAULT_READ_CONSISTENCY = QUORUM
>  AND DEFAULT_WRITE_CONSISTENCY = QUORUM
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to