update pglite, use opfs

This commit is contained in:
duanfuxiang
2025-06-22 17:26:54 +08:00
parent a81d5b159e
commit 0df4e4edd3
6 changed files with 958 additions and 18 deletions

View File

@@ -16,6 +16,6 @@ export const createAndInitDb = async () => {
},
},
)
console.log('PGlite DB created')
console.log('PGlite DB created in opfs-ahp://infio-db')
return pg
}

View File

@@ -48,7 +48,7 @@ worker({
const { fsBundle, wasmModule, vectorExtensionBundlePath } =
await loadPGliteResources()
db = await PGlite.create('idb://infio-db', {
db = await PGlite.create('opfs-ahp://infio-db', {
relaxedDurability: true,
fsBundle: fsBundle,
wasmModule: wasmModule,