knorm
A purely ES6 class-based ORM for Knex.js.
Supported environments
These environments are currently supported:
Environment | Value | Description |
---|---|---|
Node.js | Version >= 7.6. | knorm uses async/await |
Databases | PostgreSQL, MSSQL and Oracle | knorm uses the RETURNING clause |
Features
- Validation
- JSON fields validation (similar to Mongoose JS)
- Plugin support enabling full and easy customization
- Model field-name to database column-name transformations (e.g. snake-casing)
- Relations through SQL joins
- virtual fields (i.e. computed fields) with support for sync and async getters
- value casting before insert and update operations and after fetch operations
- custom error classes for database errors
- improved syntax for transactions
- good test coverage
NOTE: knorm does not create or run knex migrations
Documentation
View the documentation site
License
Credits
Knorm is inspired in part by the Mongoose JS and Bookshelf.js APIs.