Registry / database / calypso-postgres

calypso-postgres

JSON →
library0.1.0jsnpmunverified

PostgreSQL driver for the Calypso query engine, providing a session-based API to query PostgreSQL databases using Calypso's DSL. Current stable version is 0.1.0. The package is in early development with no recent updates. It differentiates by integrating Calypso's query system with Postgres, but has very limited usage and documentation.

npm install calypso-postgres
INSTALL
IMPORT
SIG · CALYPSO-POSTGRES
C
calypso-postgres
databasejavascriptv0.1.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.

PostgresDriver
var PostgresDriver = require('calypso-postgres');
var PostgresDriver = require('./driver');
The README shows requiring from a local path; the correct npm import is 'calypso-postgres'.
calypso
var calypso = require('calypso');
Calypso is a separate package that must be installed.
Query
var Query = calypso.Query;
var Query = require('calypso').Query;
While functionally similar, exports may differ; best practice is to require calypso first.

Shows how to configure the Calypso engine with the Postgres driver, create a session, and run a query.

var calypso = require('calypso'); var Query = calypso.Query; var PostgresDriver = require('calypso-postgres'); var engine = calypso.configure({ driver: PostgresDriver.create({ uri: 'postgres://mdobs@localhost/mdobs' }) }); engine.build(function(err, connection) { if (err) throw err; var session = connection.createSession(); var query = Query.of('foobar'); session.find(query, function(err, objs) { if (err) throw err; console.log(objs); }); });
Debug
Known issues
deprecatedPackage has not been updated since 2013 and appears abandoned.
fix
Consider using other PostgreSQL ORM/query builders like Sequelize, Knex, or TypeORM.
affects: 0.1.0
gotchaThe Calypso ecosystem is very niche and the API may break between versions. Ensure calypso version compatibility.
fix
Lock calypso version to a known compatible one.
affects: 0.1.0
gotchaThe driver expects a Postgres URI; missing or incorrect URI leads to connection errors.
fix
Provide valid URI: 'postgres://user:password@host:port/database'.
affects: 0.1.0
Errors
Common errors & fixes
Error: Cannot find module 'calypso-postgres'
Package not installed or not in node_modules.
fix
Run 'npm install calypso-postgres'.
Error: connect ECONNREFUSED
PostgreSQL server not running or unreachable at given URI.
fix
Ensure PostgreSQL is running and URI is correct (host, port, credentials).
Upgrade
Version history
0.1.0latest on npm
Audit
Dependencies
calypsorequiredRequired as the core query engine; the driver is a plugin for Calypso.
pgrequiredRequired to connect to PostgreSQL databases.
Agent activity
9 hits · last 30 days
node
8
OpenAI (training)
1
Resources
calypso-postgres — npm install calypso-postgres · libregistry