1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-15 23:00:36 +02:00

Better handling of items with same names

This commit is contained in:
Laurent Cozic
2017-07-10 20:47:01 +00:00
parent cb30035060
commit 5a434bb771
6 changed files with 39 additions and 11 deletions

View File

@ -96,6 +96,11 @@ class BaseModel {
return this.loadByField('id', id);
}
static loadByPartialId(partialId) {
return this.modelSelectOne('SELECT * FROM `' + this.tableName() + '` WHERE `id` LIKE ?', [partialId + '%']);
}
static applySqlOptions(options, sql, params = null) {
if (!options) options = {};