You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-12-02 22:49:09 +02:00
Improved handling of multiple sync targets
This commit is contained in:
@@ -49,8 +49,14 @@ class BaseModel {
|
||||
return fields.indexOf(name) >= 0;
|
||||
}
|
||||
|
||||
static fieldNames() {
|
||||
return this.db().tableFieldNames(this.tableName());
|
||||
static fieldNames(withPrefix = false) {
|
||||
let output = this.db().tableFieldNames(this.tableName());
|
||||
if (!withPrefix) return output;
|
||||
let temp = [];
|
||||
for (let i = 0; i < output.length; i++) {
|
||||
temp.push(this.tableName() + '.' + output[i]);
|
||||
}
|
||||
return temp;
|
||||
}
|
||||
|
||||
static fieldType(name) {
|
||||
@@ -228,6 +234,10 @@ class BaseModel {
|
||||
|
||||
queries.push(saveQuery);
|
||||
|
||||
if (options.nextQueries && options.nextQueries.length) {
|
||||
queries = queries.concat(options.nextQueries);
|
||||
}
|
||||
|
||||
return this.db().transactionExecBatch(queries).then(() => {
|
||||
o = Object.assign({}, o);
|
||||
o.id = modelId;
|
||||
|
||||
Reference in New Issue
Block a user