PostgreSQL storage adapters for the Consequent event sourcing framework. Current version is 2.0.3 (ESM-only, requires Node >=18, PostgreSQL >=12). Provides actor (snapshot), event, and search storage implementations backed by PostgreSQL, with TypeScript type declarations included. Key differentiators: designed specifically for Consequent's event sourcing model, supports JSONB-based queries, ID mapping between system and aggregate IDs, and does not support siblings (optimized for microservice architectures).
npm install consequent-postgresNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates initializing the PostgreSQL adapter, creating an actor store, storing and retrieving an actor snapshot, and closing the connection.
Use import syntax and ensure your project is configured for ESM (e.g., type: module in package.json or .mjs extension).
Use const adapter = await initialize(config);
Use `fetchByLastEventId` with the appropriate event ID instead.
Ensure your domain model does not require siblings; route writes by aggregate ID consistently.
Always include a vector string that matches the expected format (e.g., incrementing a version counter).
Add "type": "module" to your package.json or rename file to .mjs.
Ensure PostgreSQL is started and connectionString points to the correct host/port (e.g., localhost:5432).
Make sure to await the initialize() call: const adapter = await initialize(config);
No dependency data recorded yet.