helenus
Advanced tools
Comparing version 0.6.6 to 0.6.7
@@ -235,1 +235,6 @@ 0.0.1 / 2011-12-22 | ||
* Don't assume that just because it looks like a UUID, it is a UUID [ @azweb76 #122 ] | ||
0.6.7 / 2013-11-04 | ||
================== | ||
* Add support for tunable consistency on a per-query basis for CQL [ @mrvisser #130 ] |
@@ -190,3 +190,4 @@ | ||
/** | ||
* Consistency level for cql queries | ||
* Default consistency level for cql queries. Can be overriden by the | ||
* options in each cql query | ||
*/ | ||
@@ -430,3 +431,3 @@ this.consistencylevel = options.consistencylevel || DEFAULT_CONSISTENCYLEVEL; | ||
var cql, escaped = [], self = this; | ||
var cql, consistency_level, escaped = [], self = this; | ||
@@ -439,2 +440,5 @@ if(args){ | ||
// allow the query options to override the default consistency | ||
consistency_level = options.consistencyLevel || self.consistencylevel; | ||
function onReturn(err, res){ | ||
@@ -463,15 +467,15 @@ if (err){ | ||
zlib.deflate(cql, function(err, cqlz){ | ||
self.execute('execute_cql3_query', cqlz, ttype.Compression.GZIP, self.consistencylevel, onReturn); | ||
self.execute('execute_cql3_query', cqlz, ttype.Compression.GZIP, consistency_level, onReturn); | ||
}); | ||
} else { | ||
self.execute('execute_cql3_query', cql, ttype.Compression.NONE, self.consistencylevel, onReturn); | ||
self.execute('execute_cql3_query', cql, ttype.Compression.NONE, consistency_level, onReturn); | ||
} | ||
else | ||
if(options.gzip === true){ | ||
zlib.deflate(cql, function(err, cqlz){ | ||
self.execute('execute_cql_query', cqlz, ttype.Compression.GZIP, onReturn); | ||
}); | ||
} else { | ||
self.execute('execute_cql_query', cql, ttype.Compression.NONE, onReturn); | ||
} | ||
zlib.deflate(cql, function(err, cqlz){ | ||
self.execute('execute_cql_query', cqlz, ttype.Compression.GZIP, onReturn); | ||
}); | ||
} else { | ||
self.execute('execute_cql_query', cql, ttype.Compression.NONE, onReturn); | ||
} | ||
} | ||
@@ -478,0 +482,0 @@ |
{ | ||
"name": "helenus" | ||
, "version": "0.6.6" | ||
, "version": "0.6.7" | ||
, "description": "NodeJS Bindings for Cassandra" | ||
@@ -5,0 +5,0 @@ , "keywords": ["cassandra"] |
Sorry, the diff of this file is not supported yet
687328
15248