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

Sylvain Lebresne commented on CASSANDRA-4448:
---------------------------------------------

bq.  But if you're writing application code, you should not be writing raw CQL

I don't know, I don't think we should be the judge of that. If you are using a 
jdbc like driver, it makes perfect sense in my opinion to have most of your 
query being hardcoded prepared statements and maybe a few 
'stmt.executeQuery("SELECT * FROM Users")' here and there, because after all, 
that's fairly clean.

That is, I'm not pretending that everyone should do it this way, but I very 
much dislike the idea of forcing people to have a pycassa like API to have a 
decent experience. Especially considering that adding those default 
consistencies setting per-cf is fairly straightforward.

On top of that, I actually think that even for pycassa-like API it makes sense. 
I think that more often than not, tables have a natural default consistency 
settings (which doesn't mean no query will overwrite it btw), and so I think it 
is more convenient to set that once at the table creation rather that having to 
call setReadConsistencyLevel() and setWriteConsistencyLevel() every time you 
create your ColumnFamily object in the application code.
                
> 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