Permalink
Browse files

removed un-needed escaping [ closes #45 ]

  • Loading branch information...
1 parent a972941 commit d30c777a165af5334b399aa97871cdecc4700fc5 @devdazed devdazed committed May 11, 2012
Showing with 8 additions and 13 deletions.
  1. +5 −0 History.md
  2. +2 −12 lib/connection.js
  3. +1 −1 package.json
View
@@ -133,3 +133,8 @@
==================
* Set column timestamps in microseconds
+
+0.5.2 / 2012-05-11
+==================
+
+ * Removed unneeded escaping
View
@@ -114,18 +114,8 @@ function escapeCQL(val) {
val = (typeof val.toISOString === 'function') ? val.toISOString() : val.toString();
}
- val = val.replace(/[\0\n\r\b\t\\\'\"\x1a]/g, function(s) {
- switch(s) {
- case "\0": return "\\0";
- case "\n": return "\\n";
- case "\r": return "\\r";
- case "\b": return "\\b";
- case "\t": return "\\t";
- case "\x1a": return "\\Z";
- case "'": return "''";
- default: return "\\"+s;
- }
- });
+ val = val.replace(/\'/img, '\'\'');
+
return "'"+val+"'";
}
View
@@ -1,6 +1,6 @@
{
"name": "helenus"
- , "version": "0.5.1"
+ , "version": "0.5.2"
, "description": "NodeJS Bindings for Cassandra"
, "keywords": ["cassandra"]
, "author": "Russell Bradberry <rbradberry@gmail.com>"

0 comments on commit d30c777

Please sign in to comment.