mevn-orm
v3.2.1
Published
simple ORM for express js
Maintainers
Readme
Mevn ORM
Do not use This
When I started this, I had so much intertest in the JS ecosytem and ORMs. I still have some intertest in javascript bit not ORMs.
Mevn ORM is a lightweight ORM for Express.js and MySQL that provides a clean, fluent interface for building queries and managing models. It is under maintenance mode and receives security updates. Development is paused, but the core ORM functionality is complete and usable.
Getting Started
const { Model } = require('mevn-orm')
class User extends Model {}
const user = await User.create({
name: 'John Doe',
email: '[email protected]',
password: 'secret' // hash before storing
})Features
- Model-based abstraction
- Create, Read, Update, Delete support
- Chainable query builder (
where,first,all) - Timestamps
- Soft deletes
- SQLite support for testing
- Knex-based migration support
ORM Basics Checklist
- [x]
Modelbase class - [x]
.create,.find,.update,.delete - [x]
.where(),.first(),.all()chaining - [x] Table name inference
- [x] Timestamps
- [x] Soft deletes
- [x] Basic relationship hooks (
hasOne,hasMany,belongsTo) - [x] Raw queries
- [x] Knex passthrough
- [x] SQLite3 test DB
- [x] Uses
mysql2for production - [x]
dotenvsupport
Testing
This project uses Vitest for testing.
npm install
npm run migrate
npm run test