Squashed commit of the following:
commit 739f9c349031510e8ef010ba2445a2a1fdbec247 Author: Simon Cambier <simon.cambier@protonmail.com> Date: Sun Oct 16 16:57:03 2022 +0200 Code cleaning + README commit 85762bae592f3eafd34ba22b0cf1841bfbd91ca6 Author: Simon Cambier <simon.cambier@protonmail.com> Date: Sun Oct 16 14:59:01 2022 +0200 Cleaning deleted PDFs from cache commit 1a37bf38d3f64870d4b40df1b67d8106c893ab64 Author: Simon Cambier <simon.cambier@protonmail.com> Date: Sun Oct 16 13:18:06 2022 +0200 PDF cache saved to IndexedDB
This commit is contained in:
17
src/database.ts
Normal file
17
src/database.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import Dexie from 'dexie'
|
||||
|
||||
class OmnisearchCache extends Dexie {
|
||||
pdf!: Dexie.Table<
|
||||
{ path: string; hash: string; size: number; text: string },
|
||||
string
|
||||
>
|
||||
|
||||
constructor() {
|
||||
super(app.appId + '_omnisearch')
|
||||
this.version(1).stores({
|
||||
pdf: 'path, hash, size, text',
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
export const database = new OmnisearchCache()
|
||||
Reference in New Issue
Block a user