Add Zotero.DB.quickCheck(), and speed up integrityCheck()
https://www.sqlite.org/pragma.html#pragma_quick_check And limit both checks to 1 error (e.g., integrity_check(1))
This commit is contained in:
parent
eab9252550
commit
b4320fbc4c
1 changed files with 7 additions and 1 deletions
|
@ -857,8 +857,14 @@ Zotero.DBConnection.prototype.info = Zotero.Promise.coroutine(function* () {
|
|||
});
|
||||
|
||||
|
||||
Zotero.DBConnection.prototype.quickCheck = async function () {
|
||||
var ok = await this.valueQueryAsync("PRAGMA quick_check(1)");
|
||||
return ok == 'ok';
|
||||
};
|
||||
|
||||
|
||||
Zotero.DBConnection.prototype.integrityCheck = Zotero.Promise.coroutine(function* () {
|
||||
var ok = yield this.valueQueryAsync("PRAGMA integrity_check");
|
||||
var ok = yield this.valueQueryAsync("PRAGMA integrity_check(1)");
|
||||
return ok == 'ok';
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue