Permalink
Browse files

Change .escapeId to allow people to forbid qualified identifiers (#342)

  • Loading branch information...
1 parent 4d7fb69 commit 6bbcc8d6f52eb11b93a87421a7c8d4c61f9f4511 @dresende dresende committed Nov 27, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/protocol/SqlString.js
@@ -1,6 +1,9 @@
var SqlString = exports;
-SqlString.escapeId = function (val) {
+SqlString.escapeId = function (val, forbidQualified) {
+ if (forbidQualified) {
+ return '`' + val.replace(/`/g, '``') + '`';
+ }
return '`' + val.replace(/`/g, '``').replace(/\./g, '`.`') + '`';
};

0 comments on commit 6bbcc8d

Please sign in to comment.