Registry /
database / jive-persistence-postgres
Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
default
✓ const persistence = require('jive-persistence-postgres');
✗ import persistence from 'jive-persistence-postgres';
Package is CJS-only, does not support ESM imports.
PostgresStore
✓ const { PostgresStore } = require('jive-persistence-postgres');
✗ const PostgresStore = require('jive-persistence-postgres').PostgresStore;
Named export available via destructuring.
Shows how to initialize a PostgresStore, execute a query, and cleanly close the connection.
const persistence = require('jive-persistence-postgres');
const config = {
host: 'localhost',
port: 5432,
database: 'test',
user: process.env.DB_USER ?? 'postgres',
password: process.env.DB_PASS ?? ''
};
async function example() {
const store = new persistence.PostgresStore(config);
await store.init();
const result = await store.execute('SELECT NOW()');
console.log(result.rows);
await store.close();
}
example().catch(console.error);
Errors
Common errors & fixes
Cannot find module 'jive-persistence-postgres'
Package missing or not installed
fixnpm install jive-persistence-postgres
TypeError: persistence.PostgresStore is not a constructor
Using default import instead of destructuring named export
fixUse const { PostgresStore } = require('jive-persistence-postgres'); Audit
Dependencies
pgrequiredPostgreSQL client for Node.js
generic-poolrequiredConnection pooling