Fix "delete and restart" after database error
This commit is contained in:
parent
9c48a95eb5
commit
455820a9cf
3 changed files with 15 additions and 1 deletions
|
@ -22,6 +22,9 @@ export type WorkerRequest =
|
|||
| {
|
||||
readonly type: 'close';
|
||||
}
|
||||
| {
|
||||
readonly type: 'removeDB';
|
||||
}
|
||||
| {
|
||||
readonly type: 'sqlCall';
|
||||
readonly method: string;
|
||||
|
@ -117,6 +120,10 @@ export class MainSQL {
|
|||
await this.onExit;
|
||||
}
|
||||
|
||||
public async removeDB(): Promise<void> {
|
||||
await this.send({ type: 'removeDB' });
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
public async sqlCall(method: string, args: ReadonlyArray<any>): Promise<any> {
|
||||
if (this.onReady) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue