Skeudenn / preload / DatabaseApi
Interface: DatabaseApi ​
Defined in: src/preload.ts:256
Where the database file lives, as window.tankobon.database.
Methods ​
cancelRestore() ​
cancelRestore():
Promise<void>
Defined in: src/preload.ts:274
Cancels a restoration that has not been applied yet.
Returns ​
Promise<void>
chooseLocation() ​
chooseLocation():
Promise<DatabaseLocationResult>
Defined in: src/preload.ts:260
Opens a native directory picker; the new location only takes effect on the next start.
Returns ​
Promise<DatabaseLocationResult>
createBackup() ​
createBackup():
Promise<BackupResult>
Defined in: src/preload.ts:270
Makes a copy of the database now (and deletes the ones beyond the number to keep).
Returns ​
Promise<BackupResult>
getLocation() ​
getLocation():
Promise<DatabaseLocation>
Defined in: src/preload.ts:258
Where the database file currently lives.
Returns ​
Promise<DatabaseLocation>
listBackups() ​
listBackups():
Promise<BackupList>
Defined in: src/preload.ts:268
The copies of the database kept beside it, most recent first, and the one waiting to be restored.
Returns ​
Promise<BackupList>
relaunch() ​
relaunch():
Promise<void>
Defined in: src/preload.ts:266
Restarts the app, e.g. to open the database from its new location.
Returns ​
Promise<void>
resetLocation() ​
resetLocation():
Promise<DatabaseLocation>
Defined in: src/preload.ts:262
Points the app back at the default location; takes effect on the next start.
Returns ​
Promise<DatabaseLocation>
restoreBackup() ​
restoreBackup(
name):Promise<RestoreBackupResult>
Defined in: src/preload.ts:272
Schedules the restoration of a copy (by its name): the database file is overwritten at the next start.
Parameters ​
name ​
string
Returns ​
Promise<RestoreBackupResult>
setFileName() ​
setFileName(
fileName):Promise<DatabaseLocationResult>
Defined in: src/preload.ts:264
Names the database file (.db is added when missing; null goes back to tankobon.db); an invalid name comes back as an error result. Like the folder, it takes effect on the next start and the existing file is not renamed.
Parameters ​
fileName ​
string | null
Returns ​
Promise<DatabaseLocationResult>