Skip to content

PgwasmOptions

Defined in: packages/pgwasm/src/interface.ts:110

E extends Extensions = Extensions

readonly build: PostgresBuild

Defined in: packages/pgwasm/src/interface.ts:112

The Postgres build to run, e.g. cBuild from @pgxsinkit/pgwasm-c.


readonly optional database?: string

Defined in: packages/pgwasm/src/interface.ts:136

The database to connect to. Defaults to postgres.


readonly optional dataDir?: string

Defined in: packages/pgwasm/src/interface.ts:117

Where the data directory lives: memory:// (the default), idb://<name> (IndexedDB) or file://<path> (a directory, on Bun). A scheme is required. Exclusive with fs.


readonly optional debug?: DebugLevel

Defined in: packages/pgwasm/src/interface.ts:141


readonly optional extensions?: E & Readonly<Record<string, ServerExtension | Extension<unknown>>>

Defined in: packages/pgwasm/src/interface.ts:127

Client extensions (such as live) and the build’s server extensions, by key. Typed as the inferred E intersected with Extensions: E carries each extension’s namespace onto the database, and the intersection gives an extension written inline its setup(pg: Pgwasm) type.


readonly optional fs?: BaseFilesystem

Defined in: packages/pgwasm/src/interface.ts:119

A filesystem to mount as the data directory instead of dataDir.


readonly optional loadDataDir?: Blob | File

Defined in: packages/pgwasm/src/interface.ts:121

A Store backup (dumpDataDir() output) to create the data directory from.


readonly optional parsers?: ParserOptions

Defined in: packages/pgwasm/src/interface.ts:139


readonly optional relaxedDurability?: boolean

Defined in: packages/pgwasm/src/interface.ts:132

Return from a statement before its storage persist completes. The persist runs in the background, and a failure is reported by the next statement.


readonly optional serializers?: SerializerOptions

Defined in: packages/pgwasm/src/interface.ts:140


readonly optional settings?: Readonly<Record<string, string>>

Defined in: packages/pgwasm/src/interface.ts:138

Server settings (GUCs), e.g. { application_name: "app" }.


readonly optional username?: string

Defined in: packages/pgwasm/src/interface.ts:134

Run as this role (SET ROLE) once started.