CreateOpfsPgwasmOptions
Defined in: packages/pgwasm/src/opfs/create.ts:17
Extends
Section titled “Extends”RepackedFilesystemOptions
Type Parameters
Section titled “Type Parameters”E extends Extensions = Record<never, never>
Properties
Section titled “Properties”
readonlybuild:PostgresBuild
Defined in: packages/pgwasm/src/opfs/create.ts:21
The Postgres build to run, e.g. cBuild from @pgxsinkit/pgwasm-c.
directory
Section titled “directory”
readonlydirectory:OpfsDirectoryHandle
Defined in: packages/pgwasm/src/opfs/create.ts:23
Dedicated directory owned in full by this store.
durability?
Section titled “durability?”
readonlyoptionaldurability?:RepackedDurability
Defined in: packages/pgwasm/src/opfs/opfs-repacked-fs.ts:15
Physical durability for this instance. Defaults to "relaxed".
Inherited from
Section titled “Inherited from”RepackedFilesystemOptions.durability
extentSize?
Section titled “extentSize?”
readonlyoptionalextentSize?:number
Defined in: packages/pgwasm/src/opfs/opfs-repacked-fs.ts:13
Creation extent size: 8 KiB–16 MiB in 8 KiB steps. Defaults to 64 KiB.
Inherited from
Section titled “Inherited from”RepackedFilesystemOptions.extentSize
onPhase?
Section titled “onPhase?”
readonlyoptionalonPhase?: (phase) =>void
Defined in: packages/pgwasm/src/opfs/create.ts:38
Optional progress callback for the two long, otherwise-invisible steps of an OPFS-repacked create. Called once per phase, in order, and only on the success path:
"store-opened"— the store’s sync access handles are acquired and the repacked filesystem is open. Everything before this is handle acquisition, which is where a create that never returns stalls."pgwasm-ready"— the database’s own boot (WASM instantiation, initdb or catalog open) has completed.
Diagnosability only: it carries no policy, must not throw, and a create’s outcome never depends on it. The host uses it to stamp a boot rail, so a stalled create is attributable to a phase rather than silent.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
pgwasm?
Section titled “pgwasm?”
readonlyoptionalpgwasm?:OpfsPgwasmHostOptions<E>
Defined in: packages/pgwasm/src/opfs/create.ts:25
Database options other than the store-owned build, dataDir, fs and relaxedDurability.