Registry / database / mythix-orm-postgresql

mythix-orm-postgresql

JSON →
library1.13.0jsnpmunverified

PostgreSQL database driver for Mythix ORM (v1.13.0). Provides connection pooling, query generation, and model binding. Pairs with mythix-orm-sql-base. TypeScript types included. Released under MIT license. Differentiator: integrates seamlessly with Mythix ORM's query generator and model binding, supporting async/await and ESM/CJS. Requires Node >=18.0.0.

npm install mythix-orm-postgresql
INSTALL
IMPORT
SIG · MYTHIX-ORM-POSTGRE
M
mythix-orm-postgresql
databasejavascriptv1.13.0
harness data pending
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.

PostgreSQLConnection
import { PostgreSQLConnection } from 'mythix-orm-postgresql'
const PostgreSQLConnection = require('mythix-orm-postgresql')
Default export is not available; named import only. ESM works in Node>=18.
PostgreSQLModel
import { PostgreSQLModel } from 'mythix-orm-postgresql'
import PostgreSQLModel from 'mythix-orm-postgresql'
Named export, not default.
PostgreSQLQueryGenerator
import { PostgreSQLQueryGenerator } from 'mythix-orm-postgresql'
For custom query generation.

Creates a PostgreSQLConnection, starts it, then stops it. Demonstrates basic setup with env vars for credentials.

import { PostgreSQLConnection } from 'mythix-orm-postgresql'; const connection = new PostgreSQLConnection({ bindModels: true, models: [], logger: console, user: process.env.DB_USER ?? 'postgres', password: process.env.DB_PASS ?? '', database: 'test', host: '127.0.0.1', port: 5432, }); async function run() { await connection.start(); // ... use models ... await connection.stop(); } run().catch(console.error);
Debug
Known issues
breakingNode.js >=18.0.0 required; older versions throw engine check errors
fix
Upgrade Node.js to >=18.0.0
affects: <1.0.0
gotchaPostgreSQLConnection must be started before use; forgetting to call start() will cause errors
fix
Always await connection.start() before running queries
affects: >=1.0.0
deprecatedOld import pattern require('mythix-orm-postgresql').PostgreSQLConnection is still supported but not recommended
fix
Use ESM import { PostgreSQLConnection } from 'mythix-orm-postgresql'
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'mythix-orm-postgresql'
Package not installed or peer dependencies missing
fix
npm install mythix-orm-postgresql mythix-orm mythix-orm-sql-base
TypeError: connection.start is not a function
PostgreSQLConnection not imported correctly (likely used default import)
fix
Use named import: import { PostgreSQLConnection } from 'mythix-orm-postgresql'
Error: connect ECONNREFUSED 127.0.0.1:5432
PostgreSQL server not running or wrong host/port
fix
Start PostgreSQL server or correct connection options
Error: role "root" does not exist
Username or password incorrect
fix
Set correct user and password in connection options
Upgrade
Version history
1.13.0latest on npm
Audit
Dependencies
mythix-ormrequiredpeer dependency required for ORM functionality
mythix-orm-sql-baserequiredpeer dependency providing SQL base classes
Agent activity
4 hits · last 30 days
node
4
Resources
mythix-orm-postgresql — npm install mythix-orm-postgresql · libregistry