Registry / database / orm-firebird

orm-firebird

JSON →
library0.1.1jsnpmunverified

ORM for Firebird databases with a Sequelize-inspired API (models, Op, include, hooks, scopes, transactions). Current version 0.1.1 is an early release with limited adoption. The library is Node.js-only (no browser support), requires node-firebird driver, ships TypeScript declarations, and focuses on providing a familiar ORM pattern for Firebird developers. Release cadence is unclear; major breaking changes may occur in minor versions. Differentiator: targeted Firebird support with sequelize-like syntax, unlike generic SQL query builders.

npm install orm-firebird
INSTALL
IMPORT
SIG · ORM-FIREBIRD
O
orm-firebird
databasejavascriptv0.1.1
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.

OrmFirebird
✓ import { OrmFirebird } from 'orm-firebird'
✗ const OrmFirebird = require('orm-firebird').OrmFirebird
Named export; default export does not exist. In CommonJS, use destructuring with .OrmFirebird.
Model
✓ import { Model } from 'orm-firebird'
✗ import Model from 'orm-firebird'
Model is a named export, not a default export. CommonJS: const { Model } = require('orm-firebird').
DataTypes
✓ import { DataTypes } from 'orm-firebird'
✗ import DataTypes from 'orm-firebird'
DataTypes is a named export. CommonJS: const { DataTypes } = require('orm-firebird').

Complete example: connect to Firebird, define a model with DataTypes, synchronize schema, and handle errors.

import { OrmFirebird, Model, DataTypes, syncOrmFirebird } from 'orm-firebird'; const orm = new OrmFirebird({ host: process.env.FB_HOST ?? '127.0.0.1', port: parseInt(process.env.FB_PORT ?? '3050'), database: process.env.FB_DATABASE ?? 'TEST', user: process.env.FB_USER ?? 'SYSDBA', password: process.env.FB_PASSWORD ?? 'masterkey', encoding: 'UTF8', maxPool: 5, logging: false }); class User extends Model {} User.init({ USER_ID: { type: DataTypes.BIGINT(), primaryKey: true, autoIncrement: true }, LOGIN: { type: DataTypes.STRING(60), allowNull: false }, EMAIL: { type: DataTypes.STRING(150), allowNull: true } }, { sequelize: orm, tableName: 'USERS' }); async function main() { await orm.authenticate(); console.log('Connected.'); const result = await syncOrmFirebird(orm, { logging: false }); console.log('Sync complete:', result.createdTables); await orm.close(); } main().catch(console.error);
Debug
Known issues
breakingOrmFirebird constructor options changed between 0.0.x and 0.1.0: 'poolSize' renamed to 'maxPool'.
fix
Use 'maxPool' instead of 'poolSize' in the constructor config.
affects: <0.1.0
deprecatedThe 'syncOrmFirebird' function's 'force' option may drop and recreate tables; use with caution in production.
fix
Use 'dryRun: true' to preview SQL before executing destructive operations.
affects: >=0.1.0
gotchaModel.init() requires a 'sequelize' key in the second options object (the ORM instance), not a direct parameter.
fix
Pass { sequelize: orm } as the second argument to Model.init() instead of passing orm as a separate argument.
affects: >=0.1.0
breakingDefault export removed in 0.1.0; all exports are now named (OrmFirebird, Model, DataTypes, etc.).
fix
Use named imports: import { OrmFirebird } from 'orm-firebird' instead of import OrmFirebird from 'orm-firebird'.
affects: >=0.1.0
Errors
Common errors & fixes
Error: Cannot find module 'node-firebird'
Missing required peer dependency 'node-firebird'.
fix
Run: npm install node-firebird
Error: Invalid database path or credentials
Incorrect host, port, database, user, or password in OrmFirebird constructor.
fix
Double-check Firebird server is running and credentials are correct. Use process.env variables for security.
Error: Model.init is not a function
Model imported incorrectly (likely default import instead of named).
fix
Use: import { Model } from 'orm-firebird' (not import Model from 'orm-firebird')
Error: Cannot read properties of undefined (reading 'BIGINT')
DataTypes imported incorrectly or used as default import.
fix
Use: import { DataTypes } from 'orm-firebird' then DataTypes.BIGINT()
Upgrade
Version history
0.1.1latest on npm
Audit
Dependencies
node-firebirdrequiredFirebird native driver; required at runtime to connect to Firebird database servers.
Agent activity
5 hits · last 30 days
node
4
Resources
orm-firebird — npm install orm-firebird · libregistry