You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-06-12 22:57:38 +02:00
All: Improved support for Japanese, Chinese, Korean search queries (also applies to Goto Anything)
This commit is contained in:
@ -358,6 +358,20 @@ class Note extends BaseItem {
|
||||
return this.modelSelectOne('SELECT ' + this.previewFieldsSql(options.fields) + ' FROM notes WHERE is_conflict = 0 AND id = ?', [noteId]);
|
||||
}
|
||||
|
||||
static async search(options = null) {
|
||||
if (!options) options = {};
|
||||
if (!options.conditions) options.conditions = [];
|
||||
if (!options.conditionsParams) options.conditionsParams = [];
|
||||
|
||||
if (options.bodyPattern) {
|
||||
const pattern = options.bodyPattern.replace(/\*/g, '%');
|
||||
options.conditions.push('body LIKE ?');
|
||||
options.conditionsParams.push(pattern);
|
||||
}
|
||||
|
||||
return super.search(options);
|
||||
}
|
||||
|
||||
static conflictedNotes() {
|
||||
return this.modelSelectAll('SELECT * FROM notes WHERE is_conflict = 1');
|
||||
}
|
||||
|
Reference in New Issue
Block a user