mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
clear chat connection
This commit is contained in:
@@ -25,4 +25,6 @@ export abstract class IDexieRepository<T, R, I = EntityTable<any, any>> {
|
||||
abstract findAll(): Promise<RepositoryResult<T[], T>>
|
||||
|
||||
abstract count(filter?: Object): Promise<RepositoryResult<number, T>>
|
||||
|
||||
abstract clear(): Promise<Result<any, any>>
|
||||
}
|
||||
|
||||
@@ -253,4 +253,13 @@ export class DexieRepository<T, R, I = EntityTable<any, any>> implements IDexieR
|
||||
}))
|
||||
}
|
||||
}
|
||||
|
||||
async clear() {
|
||||
try {
|
||||
const result = await this.table.clear()
|
||||
return ok(result)
|
||||
} catch (e) {
|
||||
return err(false)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user