the-query-builder
Advanced tools
Comparing version 1.1.0 to 1.1.1
export declare class RawSQL { | ||
sql: string; | ||
constructor(sql: string, args?: Array<string | number>); | ||
constructor(sql: string, args: Array<string | number>); | ||
} |
@@ -5,7 +5,10 @@ "use strict"; | ||
const node_util_1 = require("node:util"); | ||
const string_1 = require("../util/string"); | ||
class RawSQL { | ||
constructor(sql, args) { | ||
this.sql = (args === null || args === void 0 ? void 0 : args.length) ? (0, node_util_1.format)(sql, ...args) : sql; | ||
this.sql = args.length | ||
? (0, node_util_1.format)(sql, ...args.map(v => (0, string_1.escapeString)(v))) | ||
: sql; | ||
} | ||
} | ||
exports.RawSQL = RawSQL; |
export { default } from './QueryBuilder'; | ||
export { escapeString } from './util/string'; |
@@ -6,4 +6,6 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = void 0; | ||
exports.escapeString = exports.default = void 0; | ||
var QueryBuilder_1 = require("./QueryBuilder"); | ||
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(QueryBuilder_1).default; } }); | ||
var string_1 = require("./util/string"); | ||
Object.defineProperty(exports, "escapeString", { enumerable: true, get: function () { return string_1.escapeString; } }); |
@@ -26,2 +26,5 @@ "use strict"; | ||
} | ||
if (!isNaN(val)) { | ||
return parseInt(val); | ||
} | ||
while ((match = CHARS_REGEXP.exec(val))) { | ||
@@ -28,0 +31,0 @@ escaped += val.slice(index, match.index) + CHARS_MAP[match[0]]; |
{ | ||
"name": "the-query-builder", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "SQL Query Builder", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
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
79679
35
1126