Registry / database / database-jones

database-jones

JSON →
library1.2.8jsnpmunverified

A Node.js database mapping framework (version 1.2.8) that provides a session-based API for CRUD operations, transactions, and query building. It offers flexible object-relational mapping with support for MySQL and MySQL Cluster (NDB), using Promises/A+ and connection pooling. The project appears to be in early development (sparse releases, incomplete docs) and is distinguished by its session abstraction and adherence to standard JavaScript objects. Notable version: 1.2.8 released 2014-10-06. Competing with Sequelize and Bookshelf, but less mature.

npm install database-jones
INSTALL
IMPORT
SIG · DATABASE-JONES
D
database-jones
databasejavascriptv1.2.8
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
const jones = require('database-jones');
import jones from 'database-jones';
Package uses CommonJS. No ESM exports available.
ConnectionProperties
const { ConnectionProperties } = require('database-jones');
import { ConnectionProperties } from 'database-jones';
CommonJS destructure. ESM not supported.
openSession
const { openSession } = require('database-jones');
const openSession = require('database-jones').openSession;
Both work but destructuring is preferred.

Opens a session, stores a simple object into a MySQL table, then closes all session factories.

const jones = require('database-jones'); const props = new jones.ConnectionProperties('mysql'); props.host = 'localhost'; props.port = 3306; props.user = 'root'; props.password = process.env.DB_PASSWORD ?? ''; props.database = 'test'; jones.openSession(props).then(session => { const user = { id: 1, name: 'Database Jones'}; return session.persist('user', user); }).then(() => { console.log('Persisted successfully'); jones.closeAllOpenSessionFactories(); }).catch(err => { console.error('Error:', err); jones.closeAllOpenSessionFactories(); });
Debug
Known issues
deprecatedPackage has not been updated since 2014 and uses old patterns (callbacks, no TypeScript).
fix
Consider using a modern ORM like Sequelize or Prisma.
affects: >=0.0.0
gotchaSession factories must be closed explicitly with closeAllOpenSessionFactories() to avoid hanging connections.
fix
Always call jones.closeAllOpenSessionFactories() after all sessions complete.
affects: >=0.0.0
gotchaThe mysql adapter requires the 'mysql' npm package as a peer dependency; not automatically installed.
fix
Run: npm install mysql
affects: >=0.0.0
Errors
Common errors & fixes
Error: Cannot find module 'mysql'
The mysql adapter is not installed.
fix
npm install mysql
TypeError: Cannot read property 'then' of undefined
Called openSession without providing ConnectionProperties or with invalid adapter name.
fix
Ensure you create a valid ConnectionProperties and pass it to openSession.
Upgrade
Version history
1.2.8latest on npm
Audit
Dependencies
mysqloptionalRequired for MySQL adapter (node-mysql)
Agent activity
4 hits · last 30 days
node
4
Resources
database-jones — npm install database-jones · libregistry