Comparing version 0.0.27 to 0.0.28
@@ -9,2 +9,3 @@ var SelectQuery = require("./Select").SelectQuery; | ||
exports.Comparators = Object.keys(Comparators); | ||
exports.Text = buildQueryType("text"); | ||
@@ -41,1 +42,16 @@ for (var comparator in Comparators) { | ||
} | ||
function buildQueryType(type) { | ||
return function (data) { | ||
var o = { data: data }; | ||
Object.defineProperty(o, "type", { | ||
value: function () { | ||
return type; | ||
}, | ||
enumerable: false | ||
}); | ||
return o; | ||
}; | ||
} |
@@ -195,2 +195,10 @@ var Where = require("./Where"); | ||
str += sql.from[i].select[j].c.map(function (el) { | ||
if (typeof el.type == "function") { | ||
switch (el.type()) { | ||
case "text": | ||
return Dialect.escapeVal(el.data); | ||
default: | ||
return el; | ||
} | ||
} | ||
if (typeof el != "string") { | ||
@@ -197,0 +205,0 @@ return el; |
@@ -9,3 +9,3 @@ { | ||
], | ||
"version": "0.0.27", | ||
"version": "0.0.28", | ||
"license": "MIT", | ||
@@ -12,0 +12,0 @@ "repository": { |
@@ -5,2 +5,3 @@ var common = exports; | ||
common.Query = Query; | ||
common.Text = Query.Text; | ||
@@ -7,0 +8,0 @@ common.Select = function () { |
Sorry, the diff of this file is not supported yet
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
37235
33
1285