converted most dynamic SQL queries into prepared statement to avoid excessive statement caching

This commit is contained in:
zadam
2020-06-20 23:24:34 +02:00
parent 969f31dde2
commit 5f699cc28c
6 changed files with 13 additions and 20 deletions

View File

@@ -50,11 +50,6 @@ function isEmptyOrWhitespace(str) {
return str === null || str.match(/^ *$/) !== null;
}
function sanitizeSql(str) {
// should be improved or usage eliminated
return str.replace(/'/g, "''");
}
function sanitizeSqlIdentifier(str) {
return str.replace(/[^A-Za-z0-9_]/g, "");
}
@@ -286,7 +281,6 @@ module.exports = {
isElectron,
hash,
isEmptyOrWhitespace,
sanitizeSql,
sanitizeSqlIdentifier,
prepareSqlForLike,
stopWatch,