Registry / database / noflo-pg

noflo-pg

JSON →
library0.0.14jsnpmunverified

A NoFlo component wrapper around node-postgres for PostgreSQL database operations. Version 0.0.14 is the latest release. It provides a graph-based interface for executing SQL queries with template placeholders and grouping support for asynchronous responses. Note: SQL templates are not sanitized; only placeholder values are sanitized. Suitable for Node.js >=0.6.0.

npm install noflo-pg
INSTALL
IMPORT
SIG · NOFLO-PG
N
noflo-pg
databasejavascriptv0.0.14
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.

Postgres
const Postgres = require('noflo-pg/components/Postgres')
import Postgres from 'noflo-pg'
NoFlo components are loaded as individual files; the package does not provide a main entry point for direct import.
Group
const Group = require('noflo-pg/components/Group')
const { Group } = require('noflo-pg')
Group component is separate. Import via full path.
Placeholder
const Placeholder = require('noflo-pg/components/Placeholder')
import { Placeholder } from 'noflo-pg'
Placeholder component is separate. Use CommonJS require with full path.

Sets up a NoFlo graph to connect to a PostgreSQL database and execute a parameterized query using Group and Placeholder components.

const noflo = require('noflo'); const Postgres = require('noflo-pg/components/Postgres'); const Group = require('noflo-pg/components/Group'); const Placeholder = require('noflo-pg/components/Placeholder'); const network = noflo.createNetwork(); // Define graph const graph = new noflo.Graph('pg-example'); graph.addNode('pg', 'Postgres'); graph.addNode('group', 'Group'); graph.addNode('placeholder', 'Placeholder'); graph.addEdge('placeholder', 'out', 'pg', 'template'); graph.addEdge('group', 'out', 'pg', 'in'); graph.addInitial('tcp://localhost:5432/postgres', 'pg', 'server'); graph.addInitial('SELECT * FROM &table', 'placeholder', 'template'); graph.addInitial('table', 'group', 'group'); graph.addInitial('users', 'group', 'in'); network.load(graph, () => { console.log('Graph started'); });
Debug
Known issues
gotchaTemplate strings are not sanitized for SQL injection; only placeholder values are sanitized.
fix
Avoid constructing SQL templates from user input; use parameterized queries via placeholders.
affects: >=0.0.0
gotchaEach component must be required individually by its full file path; no main export exists.
fix
Use require('noflo-pg/components/ComponentName') instead of require('noflo-pg').
affects: >=0.0.0
breakingNo guarantees about compatibility with newer Node.js versions due to lack of maintenance and old engine requirement.
fix
Use a more maintained NoFlo PostgreSQL component set for modern environments.
affects: >=0.0.0
deprecatednoflo-pg has not been updated since 2016; consider using alternatives.
fix
Switch to actively maintained packages like noflo-database or noflo-pgplus.
affects: >=0.0.0
Errors
Common errors & fixes
Cannot find module 'noflo-pg'
Package does not export a main index.js; components are in subfolders.
fix
Import specific components: require('noflo-pg/components/Postgres')
Error: connect ECONNREFUSED 127.0.0.1:5432
PostgreSQL server is not running or connection string is incorrect.
fix
Ensure PostgreSQL is running and use correct connection URI: 'tcp://user:pass@localhost:5432/db'
TypeError: Cannot read properties of undefined (reading 'table')
Placeholder template contains '&table' but no Group input with group 'table' was provided.
fix
Pass a value grouped by the placeholder name (e.g., 'table') to the Postgres component.
Upgrade
Version history
0.0.14latest on npm
Audit
Dependencies
noflorequiredCore NoFlo runtime required to use components and graphs
pgrequiredNode-postgres library for PostgreSQL connectivity
Agent activity
7 hits · last 30 days
node
6
Resources
noflo-pg — npm install noflo-pg · libregistry