Registry / database / arcane-middleware-orm

arcane-middleware-orm

JSON →
library1.1.5jsnpmunverified

Arcane ORM (v1.1.5) is a lightweight, schemaless ORM module for the arcane framework, designed for rapid prototyping and small-to-medium projects. It provides a simple model abstraction over databases with minimal configuration, supporting basic CRUD operations and relationship management. Unlike full-featured ORMs like Sequelize or TypeORM, it prioritizes simplicity over advanced features (migrations, complex joins). Release cadence is low, with infrequent updates.

npm install arcane-middleware-orm
INSTALL
IMPORT
SIG · ARCANE-MIDDLEWARE-
A
arcane-middleware-orm
databasejavascriptv1.1.5
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.

Model
import { Model } from 'arcane-middleware-orm'
const Model = require('arcane-middleware-orm').Model
ESM-only; no CommonJS support.
defineModel
import { defineModel } from 'arcane-middleware-orm'
import { defineModel } from 'arcane'
Exported from the ORM package, not from 'arcane'.
ArcaneORM
import { ArcaneORM } from 'arcane-middleware-orm'
import ArcaneORM from 'arcane-middleware-orm'
Named export only; no default export.

Creates a User model with schema, instantiates and saves a record, then fetches it by ID.

import { Model, defineModel } from 'arcane-middleware-orm'; const UserModel = defineModel('User', { schema: { name: String, email: String }, table: 'users' }); const user = new UserModel({ name: 'Alice', email: 'alice@example.com' }); await user.save(); const found = await UserModel.findById(1); console.log(found.name); // 'Alice'
Debug
Known issues
gotchaSchemaless design: no runtime validation unless explicitly added; malformed data will be persisted.
fix
Add manual validation before saving or use a validation library.
affects: >=1.0.0
deprecatedThe `find` method is deprecated in v1.1.0; use `findAll` instead.
fix
Replace `Model.find()` with `Model.findAll()`.
affects: >=1.1.0 <1.2.0
breakingIn v1.1.0, relationship syntax changed: `hasMany` now requires explicit foreign key.
fix
Update relationship definitions: `hasMany('Post', { foreignKey: 'userId' })`.
affects: >=1.1.0
gotchaPackage does not ship with TypeScript definitions; import as any if using TS.
fix
Declare module or use `// @ts-ignore`.
affects: >=1.0.0
Errors
Common errors & fixes
Cannot find module 'arcane-middleware-orm'
Package not installed or not in node_modules.
fix
Run `npm install arcane-middleware-orm`.
TypeError: Model.findById is not a function
Model not defined correctly; `defineModel` returns a constructor not a static class.
fix
Ensure you are calling `findById` on an instance? Actually, `findById` is a static method; check import: `import { defineModel } from 'arcane-middleware-orm'` then `const MyModel = defineModel(...)`.
Property 'save' does not exist on type 'UserModel'
TypeScript no definition file; model methods not typed.
fix
Use `any` or declare a module type: `declare module 'arcane-middleware-orm' { ... }`.
Upgrade
Version history
1.1.5latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
19 hits · last 30 days
node
14
OpenAI (training)
2
Resources
arcane-middleware-orm — npm install arcane-middleware-orm · libregistry