mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 19:36:12 +01:00
converted most dynamic SQL queries into prepared statement to avoid excessive statement caching
This commit is contained in:
@@ -97,7 +97,7 @@ function getAttributeNames(type, nameLike) {
|
||||
FROM attributes
|
||||
WHERE isDeleted = 0
|
||||
AND type = ?
|
||||
AND name LIKE '%${utils.sanitizeSql(nameLike)}%'`, [type]);
|
||||
AND name LIKE ?`, [type, '%' + nameLike + '%']);
|
||||
|
||||
for (const attr of BUILTIN_ATTRIBUTES) {
|
||||
if (attr.type === type && attr.name.toLowerCase().includes(nameLike) && !names.includes(attr.name)) {
|
||||
|
||||
Reference in New Issue
Block a user