Registry / database / volos-pgsql

volos-pgsql

JSON →
library0.0.19jsnpmunverified

Volos PostgreSQL Connector (v0.0.19, last updated 2014) is a Node.js module from Apigee that exposes PostgreSQL queries as RESTful API endpoints. It allows mapping SQL queries to URL paths and query parameters via JSON configuration, enabling easy CRUD operations over HTTP. Release cadence is unknown and appears inactive. Differentiates by providing a simple REST-to-SQL mapping layer, but is outdated and not recommended for new projects. Use modern alternatives like PostgREST or direct database drivers.

npm install volos-pgsql
INSTALL
IMPORT
SIG · VOLOS-PGSQL
V
volos-pgsql
databasejavascriptv0.0.19
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.

PgConnector
const { PgConnector } = require('volos-pgsql');
import { PgConnector } from 'volos-pgsql'
Package uses CJS only; no ESM support.
pgConnector
const pgConnector = require('volos-pgsql');
import pgConnector from 'volos-pgsql'
Default import is not available; use require.
PgConnector (with new)
const connector = new PgConnector({profile, restMap});
const connector = new pgConnector({profile, restMap});
module.exports is an object containing PgConnector, not the constructor directly.

Creates an HTTP server that exposes PostgreSQL queries as RESTful endpoints using a JSON mapping configuration.

const pgConnector = require('volos-pgsql'); const http = require('http'); const profile = { username: 'volos', password: 'volos', host: 'localhost', port: '5432', database: 'volos' }; const restMap = { employees: { queryStringBasic: 'SELECT id_emp, emp_name FROM public.employees', queryStringExpanded: 'SELECT * FROM public.employees', idName: 'id_emp', queryParameters: { role: "id_role = '{role}'", hire_date: "hire_date = '{hire_date}'" } } }; const pgConnectorObject = new pgConnector.PgConnector({profile: profile, restMap: restMap}); const svr = http.createServer((req, resp) => { pgConnectorObject.dispatchRequest(req, resp); }); svr.listen(9089, () => { pgConnectorObject.initializePaths(restMap); console.log(pgConnectorObject.applicationName + ' node server is listening'); });
Debug
Known issues
deprecatedPackage is unmaintained since 2014.
fix
Migrate to a modern database connector pattern (e.g., direct pg usage, PostgREST, or an ORM).
affects: all
breakingvolos-pgsql is hardcoded to use Postgres module 'pg' version 1.x; newer 'pg' v8+ may break.
fix
Lock pg to version 1.x or use an alternative connector.
affects: >=0.0.19
breakingRestMap configuration must include exact paths; misconfiguration leads to silent failures.
fix
Validate restMap keys match expected routes.
affects: all
gotchaThe package does not support connection pooling; each request creates a new connection.
fix
Use a connection pool with node-postgres directly instead.
affects: all
gotchaNo built-in SQL injection protection; queries constructed via template strings.
fix
Sanitize user input and use parameterized queries.
affects: all
Errors
Common errors & fixes
Cannot find module 'volos-pgsql'
Package not installed or not in node_modules.
fix
Run 'npm install volos-pgsql' to install the package.
TypeError: pgConnector.PgConnector is not a constructor
Incorrect import of the constructor.
fix
Use 'const pgConnector = require('volos-pgsql'); const connector = new pgConnector.PgConnector(...);' or 'const { PgConnector } = require('volos-pgsql'); new PgConnector(...);'.
Error: connect ECONNREFUSED 127.0.0.1:5432
PostgreSQL server not running or connection settings wrong.
fix
Ensure PostgreSQL is running and the profile host/port are correct. Check firewall settings.
Cannot find module 'pg'
Peer dependency 'pg' is not installed.
fix
Run 'npm install pg' to install the PostgreSQL driver.
Upgrade
Version history
0.0.19latest on npm
Audit
Dependencies
pgrequiredPostgreSQL driver for Node.js
volos-quotaoptionalVolos quota management (likely unused)
Agent activity
21 hits · last 30 days
node
16
Meta
1
OpenAI (training)
1
Resources
volos-pgsql — npm install volos-pgsql · libregistry