mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 03:16:11 +01:00
converted most dynamic SQL queries into prepared statement to avoid excessive statement caching
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user