Registry / database / turtle-orm

turtle-orm

JSON →
library1.0.33jsnpmunverified

Turtle ORM is a Node.js ORM that abstracts over MongoDB (via Mongoose) and MySQL (via Sequelize) using a simple, agnostic API. Current version 1.0.33 (no release cadence documented). Key differentiators: unified interface for both relational and non-relational databases, lightweight abstraction. However, the project appears unmaintained with no recent updates, limited documentation, and potential incompatibilities with modern Node.js versions.

npm install turtle-orm
INSTALL
IMPORT
SIG · TURTLE-ORM
T
turtle-orm
databasejavascriptv1.0.33
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.

Database
const { Database } = require('turtle-orm')
import { Database } from 'turtle-orm'
Package uses CommonJS; ESM import may not work without bundler or esm wrapper.
ModelFactory
const { ModelFactory } = require('turtle-orm')
import ModelFactory from 'turtle-orm/ModelFactory'
ModelFactory is a named export, not default. Incorrect path causes module not found.
Types
const { Types } = require('turtle-orm')
const Types = require('turtle-orm').Types
Both work, but destructuring is preferred. Types is an enum-like object with STRING, OBJECT_ID, etc.

Demonstrates how to define a model, create a database connection, and persist a document using Turtle ORM with MongoDB.

const { Database, ModelFactory, Types } = require('turtle-orm'); let Users = ModelFactory.model('users', { username: { type: Types.STRING }, password: { type: Types.STRING }, clientId: { type: Types.OBJECT_ID } }); let database = Database.create({ dialect: 'mongodb', port: 27017, hostName: 'localhost', databaseName: 'test', username: 'db_username', password: process.env.DB_PASSWORD ?? '' }); database.connectAndSync().then(() => { let userInstance = Users.create({ username: 'test@gmail.com', password: 'pass' }); userInstance.save().then(resource => { console.log("I'm a mongo document", resource); }); });
Debug
Known issues
deprecatedTurtle ORM has not been updated for years and may not support modern Node.js versions or latest Mongoose/Sequelize.
fix
Consider migrating to Mongoose or Sequelize directly, or use a more modern ORM.
affects: all
gotchaThe package requires Node >=6.9.4, but may have compatibility issues with Node 12+.
fix
Use an older Node version or switch to a different ORM.
affects: >=12.0.0
gotchaModelFactory.model() uses strings for types; misspelling like 'STRINGG' instead of 'STRING' will silently fail.
fix
Always use Types.STRING instead of literal strings.
affects: all
Errors
Common errors & fixes
Cannot find module 'turtle-orm'
Package not installed or typo in import path.
fix
Run 'npm install turtle-orm' and verify import: const { Database } = require('turtle-orm');
TypeError: Database.create is not a function
Using wrong import (e.g., Database = require('turtle-orm').Database). Check destructuring.
fix
Use const { Database } = require('turtle-orm');
Error: connect ECONNREFUSED 127.0.0.1:27017
MongoDB not running or incorrect connection options.
fix
Start MongoDB service or provide correct host/port.
Upgrade
Version history
1.0.33latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
16 hits · last 30 days
node
12
Meta
2
Amazon
1
OpenAI (training)
1
Resources
turtle-orm — npm install turtle-orm · libregistry