Javascript node.js ORM that follows data-mapper template

I worked with active implementations of ORM maps and data cards to know the problems with using active records implemented by ORM in my large projects. Now I'm going to port one of my projects to node.js and try to find similar Im tools that are using right now. After researching, I did not find the ORM node.js that follows the data map template. All of them are active. Maybe I missed something, and you can tell me that there is a good popular ORM for node.js that does not match the active writing scheme?

Ive libraries looked:

+7
javascript orm datamapper typeorm
source share
3 answers

After many disappointments with existing ORMs for JavaScript, I wrote my own ORM that supports TypeScript / ES6 / ES5 and follows data card templates and all other best practices - TypeORM

+11
source share

I wrote an ORM for Node.js called node-data-mapper; it is available here: https://www.npmjs.com/package/node-data-mapper . This is an ORM for Node.js that uses the data-mapper template. When reading and writing to the database, the developer uses plain old JavaScript objects. The relationships between the tables are not rigidly defined, which makes the join very flexible - in my opinion, in any case - albeit somewhat detailed. The actual data matching algorithm is fast and short, and the complexity is linear (the conversion from the table data of the database into a normalized JavaScript object is performed in one cycle).

I also did my best to make it pretty error resistant. There is 100% coverage of the code, and although I know that it does not prove the absence of defects, I tried to check as carefully as possible.

I modeled the interface very weakly after Doctrine 1. (I used LINQ, Doctrine 1 and 2, and Hibernate quite widely, and of those ORMs, I like the interface for Doctrine 1. node-data-mapper is not a Doctrine JavaScript port by any means, and the interface is essentially differs.) The request interface returns promises using deferred .

I modeled conditions (e.g. WHERE and ON clauses) after MongoDB conditions. We hope that this makes several intuitive conditions, providing the ability to make multiple queries (in particular, complex SELECT queries that can be filtered safely in different ways). Conditions are treated as a domain-specific language and are lexed, analyzed, and compiled.

In any case, the module is what I use in my personal projects, but I would like to receive feedback from other developers in the community! I tried to provide many examples to quickly and quickly launch people. Currently, the module only supports MySQL, but I am working on adding support for MSSQL.

+1
source share

The difference between the data-mapper template and the active record does not really make sense in a dynamic language such as JavaScript. Typically, a dataperper is lighter in a typed language, but in JS it really doesn't matter. From head to toe, I can mention two very popular projects that you probably don't know:

Waterline.js is the abbreviation for Sails, which works well on top of many database systems.

If you consider MongoDB for your database - Mongoose.js .

-5
source share

All Articles