Registry / database / oracle-orm

oracle-orm

JSON →
library0.1.9jsnpmunverified

A minimal Oracle database ORM for Node.js, version 0.1.9, designed as a lightweight alternative to other Oracle ORMs. It automatically maps database tables to Model objects and provides basic CRUD operations with safety against SQL injections. This package requires manual installation of Oracle Instant Client and libaio, and does not support connection pooling, error recovery, or advanced features. It targets developers who need a simple, predictable ORM for Oracle without unexpected table name pluralization or invalid SQL generation. The project appears stable but with limited maintenance and community adoption.

npm install oracle-orm
INSTALL
IMPORT
SIG · ORACLE-ORM
O
oracle-orm
databasejavascriptv0.1.9
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.

default
const ORM = require('oracle-orm');
import ORM from 'oracle-orm';
Package uses CommonJS; ESM import is not supported (no default export). Use require().
ORM constructor
new ORM({driver: 'oracle', hostname: '...', ...}, debug, callback)
new ORM({driver: 'oracle', ...}, callback)
Callback is required as third argument; omitting debug parameter will cause undefined errors.
orm.getModels
orm.getModels(function(err, models) { ... })
const models = await orm.getModels()
API is callback-based only; promises/async/await not supported natively.

Connects to Oracle, retrieves all models (tables), and fetches all rows from USERS table ordered by USER_ID ascending.

const ORM = require('oracle-orm'); const config = { driver: 'oracle', hostname: process.env.DB_HOST ?? 'localhost', port: 1521, database: process.env.DB_SID ?? 'XE', user: process.env.DB_USER ?? 'user', password: process.env.DB_PASS ?? '' }; new ORM(config, false, function(err, orm) { if (err) return console.error(err); orm.getModels(function(err, models) { if (err) return console.error(err); if (models.USERS) { models.USERS.get({}, ['USER_ID ASC'], function(err, rows) { if (err) return console.error(err); console.log(rows); }); } }); });
Debug
Known issues
gotchaRequires Oracle Instant Client and libaio installed manually; npm install may prompt for sudo to set environment variables.
fix
Download instantclient-basic and instantclient-sdk, unzip into project/instantclient_12_1, and run source /etc/environment after install.
affects: >=0.0.0
breakingCallback is required as third argument to ORM constructor; omitting it will cause undefined is not a function error.
fix
Always pass a callback function as third argument: new ORM(config, debug, function(err, orm) {...})
affects: >=0.0.0
deprecatedAll API methods are callback-based; no promise or async/await support.
fix
Wrap callbacks in Promises or use util.promisify to use async/await.
affects: >=0.0.0
gotchaTable names are used as model keys exactly as they appear in the database (uppercase by default).
fix
Access models with the exact database table name, e.g., models.USERS (not models.Users).
affects: >=0.0.0
gotchaNo connection pooling; every ORM instance creates a single connection.
fix
Manage connection lifecycle manually; do not create multiple ORM instances concurrently.
affects: >=0.0.0
Errors
Common errors & fixes
Error: DPI-1047: Cannot locate a 64-bit Oracle Client library
Oracle Instant Client not installed or not in library path.
fix
Install instantclient-basic-linux.x64-12.1.*.zip and set LD_LIBRARY_PATH or use sudo npm install.
TypeError: orm.getModels is not a function
ORM constructor was not called correctly; missing callback argument.
fix
Ensure third argument is a callback function: new ORM(config, debug, function(err, orm) {...})
Error: ORA-12541: TNS:no listener
Oracle database host/port/SID incorrect or listener not running.
fix
Verify hostname, port, and database (SID) in connection config.
Error: ORA-00942: table or view does not exist
Attempting to access a table that doesn't exist or is not accessible.
fix
Check table name spelling and ensure user has SELECT privileges.
Upgrade
Version history
0.1.9latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
oracle-orm — npm install oracle-orm · libregistry