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

Allow exporting notes and notebooks

This commit is contained in:
Laurent Cozic
2017-08-20 16:29:18 +02:00
parent 1213819467
commit 671e8a3fc8
17 changed files with 273 additions and 23 deletions

View File

@ -133,6 +133,12 @@ class BaseModel {
return { sql: sql, params: params };
}
static async allIds(options = null) {
let q = this.applySqlOptions(options, 'SELECT id FROM `' + this.tableName() + '`');
const rows = await this.db().selectAll(q.sql, q.params);
return rows.map((r) => r.id);
}
static async all(options = null) {
let q = this.applySqlOptions(options, 'SELECT * FROM `' + this.tableName() + '`');
return this.modelSelectAll(q.sql);