You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-06-15 23:00:36 +02:00
Search function for CLI
This commit is contained in:
@ -100,9 +100,18 @@ class Note extends BaseItem {
|
||||
options.conditions.push('is_conflict = 1');
|
||||
} else {
|
||||
options.conditions.push('is_conflict = 0');
|
||||
options.conditions.push('parent_id = ?');
|
||||
options.conditionsParams.push(parentId);
|
||||
}
|
||||
if (parentId) {
|
||||
options.conditions.push('parent_id = ?');
|
||||
options.conditionsParams.push(parentId);
|
||||
}
|
||||
}
|
||||
|
||||
if (options.anywherePattern) {
|
||||
let pattern = options.anywherePattern.replace(/\*/g, '%');
|
||||
options.conditions.push('(title LIKE ? OR body LIKE ?)');
|
||||
options.conditionsParams.push(pattern);
|
||||
options.conditionsParams.push(pattern);
|
||||
}
|
||||
|
||||
if (options.itemTypes && options.itemTypes.length) {
|
||||
if (options.itemTypes.indexOf('note') >= 0 && options.itemTypes.indexOf('todo') >= 0) {
|
||||
|
Reference in New Issue
Block a user