Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Javascript node.js ORM that follows data-mapper pattern

I've been working with active record and data mapper implementations of ORM enough to know the problems with using active record implemented ORM in my large projects. Right now I'm thinking to migrate one of my projects to node.js and trying to find the similar tools Im using right now. After research I didn't found any node.js ORM that follows data mapper pattern. They all are active record. Maybe I missing something, and you can tell me is there is a good popular ORM for node.js that doesn't follow active record pattern?

The libraries Ive looked on:

  • http://docs.sequelizejs.com/
  • https://github.com/dresende/node-orm2
  • http://bookshelfjs.org/
  • some others
like image 448
pleerock Avatar asked Apr 11 '15 11:04

pleerock


People also ask

Is there an ORM for Node JS?

Sequelize is a modern TypeScript and Node. js ORM for Postgres, MySQL, MariaDB, SQLite and SQL Server, and more. Featuring solid transaction support, relations, eager and lazy loading, read replication and more.

Which ORM is best for Node JS?

Mongoose. If you plan on using MongoDB as your database, then Mongoose is likely going to be your ORM of choice. It's currently the most popular ORM library in the Node. js world.

Is an ORM a Data Mapper?

ORM is a special data mapping layer, which provides database access between the app and database, i.e. it facilitates the communication of an application with a database.

Is KNEX an ORM?

Sequelize is an ORM that includes some query builder stuff; Knex is just a query builder, not an ORM.


1 Answers

After lot of frustration of currently exist ORMs for JavaScript I have written my own ORM that supports TypeScript / ES6 / ES5 and follows data mapper patterns and all other best practices - TypeORM

like image 176
pleerock Avatar answered Sep 22 '22 06:09

pleerock