Registry / database / rerobe-js-orm

rerobe-js-orm

JSON →
library4.9.0jsnpmunverified

ReRobe is a JavaScript ORM framework (v4.9.0) that provides object-relational mapping for Node.js applications. It ships with TypeScript types and focuses on simplifying database interactions through model definitions and query building. The framework follows an active release cadence with breaking changes in major versions. Differentiators include its lightweight footprint and emphasis on factory-based object creation, though it has a smaller community compared to alternatives like Sequelize or TypeORM.

npm install rerobe-js-orm
INSTALL
IMPORT
SIG · REROBE-JS-ORM
R
rerobe-js-orm
databasejavascriptv4.9.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.

RibbnOrm
import { RibbnOrm } from 'rerobe-js-orm'
const RibbnOrm = require('rerobe-js-orm')
ESM-only since v4; older versions used CommonJS.
Model
import { Model } from 'rerobe-js-orm'
import Model from 'rerobe-js-orm'
Model is a named export, not default.
QueryBuilder
import { QueryBuilder } from 'rerobe-js-orm'
import { QueryBuilder } from 'rerobe-js-orm/query'
QueryBuilder is directly exported from the main package path.
types
import type { RibbnConfig } from 'rerobe-js-orm'
import { RibbnConfig } from 'rerobe-js-orm'
Use type import for TypeScript interfaces to avoid runtime overhead.
createConnection
import { createConnection } from 'rerobe-js-orm'
const { createConnection } = require('rerobe-js-orm')
ESM-only; require() will throw an error in v4+.

Shows how to initialize the ORM, define a model with fields, sync the schema, and perform a basic insert.

import { RibbnOrm, Model, DataTypes } from 'rerobe-js-orm'; const orm = new RibbnOrm({ dialect: 'postgres', host: process.env.DB_HOST ?? 'localhost', port: parseInt(process.env.DB_PORT ?? '5432'), username: process.env.DB_USER ?? 'user', password: process.env.DB_PASS ?? '', database: process.env.DB_NAME ?? 'test' }); class User extends Model { static fields = { id: { type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true }, name: { type: DataTypes.STRING, allowNull: false }, email: { type: DataTypes.STRING, unique: true } }; } orm.addModel(User); // Sync and query await orm.sync(); const user = await User.create({ name: 'John', email: 'john@example.com' }); console.log(user.id); await orm.close();
Debug
Known issues
breakingIn v4, the package switched to ESM-only. CommonJS require() will fail.
fix
Use import syntax or update to a CommonJS-compatible version (v3.x).
affects: >=4.0.0
breakingThe 'fields' property on models must use static getter syntax (not static fields) in v4.9.0.
fix
Use 'static get fields() { return { ... }; }' instead of 'static fields = { ... }'.
affects: >=4.5.0
deprecatedThe 'sync' method with force: true is deprecated; use 'migrate' instead.
fix
Use 'orm.migrate({ force: true })' instead of 'orm.sync({ force: true })'.
affects: >=4.8.0
Errors
Common errors & fixes
ERR_REQUIRE_ESM
Attempting to use require() on an ESM-only package.
fix
Use import syntax or set 'type': 'module' in package.json.
TypeError: (intermediate value).fields is not a function
Using static class field syntax instead of static getter for fields.
fix
Replace 'static fields = {...}' with 'static get fields() { return {...}; }'.
Upgrade
Version history
4.9.0latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Meta
1
Resources
rerobe-js-orm — npm install rerobe-js-orm · libregistry