Comparing version 0.2.3 to 0.2.4
@@ -63,2 +63,9 @@ | ||
* Fix issue in binary serialization, issue #1 | ||
* Fix issue in binary serialization, issue #1 | ||
0.2.4 / 2012-02-04 | ||
================== | ||
* Added binary support for strings in the serializer | ||
* Some serializer optimizations |
@@ -87,2 +87,10 @@ var UUID = require('../uuid'); | ||
Serializers.encodeUTF8 = function(val){ | ||
if(Buffer.isBuffer(val)){ | ||
return val; | ||
} | ||
if(val === undefined || val === null){ | ||
val = ''; | ||
} | ||
return new Buffer(val.toString(), 'utf8'); | ||
@@ -98,2 +106,10 @@ }; | ||
Serializers.encodeAscii = function(val){ | ||
if(Buffer.isBuffer(val)){ | ||
return val; | ||
} | ||
if(val === undefined || val === null){ | ||
val = ''; | ||
} | ||
return new Buffer(val.toString(), 'ascii'); | ||
@@ -133,9 +149,7 @@ }; | ||
Serializers.encodeBoolean = function(val){ | ||
var buf = new Buffer(1); | ||
if(val){ | ||
buf.write('\x01', 0); | ||
return new Buffer([0x01]); | ||
} else { | ||
buf.write('\x00', 0); | ||
return new Buffer([0x00]); | ||
} | ||
return buf; | ||
}; | ||
@@ -142,0 +156,0 @@ |
{ | ||
"name": "helenus" | ||
, "version": "0.2.3" | ||
, "version": "0.2.4" | ||
, "description": "NodeJS Bindings for Cassandra" | ||
@@ -5,0 +5,0 @@ , "keywords": ["cassandra"] |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
507665
12097