via Vincit/moron.js · GitHub.
Moron.js is a Node.js ORM built around the wonderful SQL query builder knex. All databases supported by knex are supported by moron.js. SQLite3, Postgres and MySQL are fully tested.
What moron.js gives you:
What moron.js doesn’t give you:
- A custom query DSL. SQL is used everywhere
- Automatic database schema creation and migration. It is useful for the simple things, but usually just gets in your way when doing anything non-trivial. Moron.js leaves the schema related things to you. knex has a great migration tool that we recommend for this job.
via Introducing moron.js – a new ORM for Node.js | Vincit Oy.
A couple of weeks ago I released moron.js – the first public version of a new ORM forNode.js that Vincit has been using internally in various projects during the last year and a half. I started writing my own ORM after using basically all mature Node.js ORMs out there. While most of them do the basic stuff well, I repeatedly got frustrated with some things:
- Writing more complex SQL queries is difficult, ugly or impossible.
- Transaction support is either missing or error-prone. In most cases, you have to pass some kind of transaction object to each query you make. Forget one and bad things will happen to good queries.
- Database schema is usually automatically created based on the models. Again we are at the mercy of the ORM and cannot do everything SQL or the underlying database engine allows.