Registry / database / jugglingdb-postgres-atlassian

jugglingdb-postgres-atlassian

JSON →
library0.1.0-atlassian-003jsnpmunverified

Legacy PostgreSQL adapter for JugglingDB ORM, forked from jugglingdb-postgres 0.1.0 with bug fixes by Atlassian. Version 0.1.0-atlassian-003, no longer maintained. Adds support for float data types, multi-column indexes, arbitrary where clauses, and 'or' operator. Requires jugglingdb@0.2.x. Very limited adoption outside original fork.

npm install jugglingdb-postgres-atlassian
INSTALL
IMPORT
SIG · JUGGLINGDB-POSTGRE
J
jugglingdb-postgres-atlassian
databasejavascriptv0.1.0-atlassian-003
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.

Schema
var Schema = require('jugglingdb').Schema;
import { Schema } from 'jugglingdb';
CommonJS only; no ESM support.
schema instance
var schema = new Schema('postgres-atlassian', options);
var schema = new Schema('postgres', options);
Must use exactly 'postgres-atlassian' as adapter name.
define method
var Model = schema.define('Model', {col: {type: Number}});
var Model = schema.define('Model', {col: Number});
Column type must be object with type property, not shorthand.

Shows how to connect, define a model with a float field, auto-upgrade schema, and create a record.

var Schema = require('jugglingdb').Schema; var schema = new Schema('postgres-atlassian', { database: process.env.PGDATABASE || 'myapp_test', username: process.env.PGUSER || 'postgres', password: process.env.PGPASSWORD || '', host: process.env.PGHOST || 'localhost', port: parseInt(process.env.PGPORT, 10) || 5432 }); var Post = schema.define('Post', { title: { type: String, length: 255 }, content: { type: String }, rating: { type: Number, dataType: 'float' } }); schema.autoupgrade(function(err) { if (err) { console.error(err); return; } Post.create({title: 'Hello', content: 'World', rating: 4.5}, function(err, post) { console.log(post); }); });
Debug
Known issues
deprecatedThis package is a fork with no upstream maintenance. Use jugglingdb-postgres or migrate to loopback-datasource-juggler.
fix
Replace with loopback-datasource-juggler and loopback-connector-postgresql.
affects: *
breakingAdapter name must be 'postgres-atlassian', not 'postgres'.
fix
Use 'postgres-atlassian' in Schema constructor.
affects: *
gotchaArbitrary where clauses may conflict with column names like 'arbitrary' or 'or'. Column values take precedence.
fix
Avoid column names 'arbitrary' or 'or' if using those features.
affects: *
gotchaFloat data type requires explicit {type: Number, dataType: 'float'} — not inferred from schema.
fix
Always specify dataType: 'float' for float columns.
affects: *
Errors
Common errors & fixes
Error: Cannot find module 'jugglingdb'
jugglingdb not installed or wrong version
fix
npm install jugglingdb@0.2.x
Error: Schema requires jugglingdb >= 0.2.0
Installed jugglingdb version too old
fix
npm install jugglingdb@0.2.x
TypeError: Cannot read property 'define' of undefined
Adapter not registered; schema creation failed
fix
Ensure 'postgres-atlassian' is spelled correctly and package is installed.
Upgrade
Version history
0.1.0-atlassian-003latest on npm
Audit
Dependencies
jugglingdbrequiredPeer dependency required at version 0.2.x
Agent activity
8 hits · last 30 days
node
6
Resources