Skip to content
An SQL-friendly ORM for Node.js
Branch: master
Clone or download
Latest commit 07b51b8 Mar 21, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
doc
examples
lib clean up fetchStrategy implementation Mar 21, 2019
perf use destructuring imports Jan 11, 2019
resources
testUtils
tests clean up fetchStrategy implementation Mar 21, 2019
typings/objection
.eslintrc.json
.gitignore ignore lock files recursively Jan 11, 2018
.prettierrc.json
.travis.yml enable CI for node 11 Dec 27, 2018
LICENSE Initial commit Apr 14, 2015
README.md
docker-compose.yml
package.json
reproduction-template.js
setup-test-db.js add upsertGraph tests for extra properties Dec 28, 2018
tsconfig.json combine strict compiler options Mar 1, 2018

README.md

Build Status Coverage Status Join the chat at https://gitter.im/Vincit/objection.js

Objection.js

Objection.js is an ORM for Node.js that aims to stay out of your way and make it as easy as possible to use the full power of SQL and the underlying database engine while keeping magic to a minimum.

Objection.js is built on an SQL query builder called knex. All databases supported by knex are supported by objection.js. SQLite3, Postgres and MySQL are thoroughly tested.

What objection.js gives you:

What objection.js doesn't give you:

  • A custom query DSL. SQL is used as a query language. This doesn't mean you have to write SQL strings though. A query builder based on knex is used to build the SQL. However, if the query builder fails you for some reason, raw SQL strings can be easily written using the raw helper function.
  • Automatic database schema creation and migration from model definitions. For simple things it is useful that the database schema is automatically generated from the model definitions, but usually just gets in your way when doing anything non-trivial. Objection.js leaves the schema related things to you. knex has a great migration tool that we recommend for this job. Check out the example project.

Shortcuts:

You can’t perform that action at this time.