1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-12 22:57:38 +02:00

Minor changes on CLI

This commit is contained in:
Laurent Cozic
2017-07-17 18:46:09 +00:00
parent 6673baee91
commit 15e95bb0ab
9 changed files with 2181 additions and 23 deletions

View File

@ -102,6 +102,10 @@ class BaseModel {
return this.loadByField('id', id);
}
static shortId(id) {
return id.substr(0, 4);
}
static loadByPartialId(partialId) {
return this.modelSelectOne('SELECT * FROM `' + this.tableName() + '` WHERE `id` LIKE ?', [partialId + '%']);
}