JSPM

objection

0.7.12
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 310052
  • Score
    100M100P100Q167071F
  • License MIT

An SQL-friendly ORM for Node.js

Package Exports

  • objection
  • objection/lib/model/inheritModel
  • objection/lib/queryBuilder/RelationExpression
  • objection/lib/queryBuilder/operations/QueryBuilderOperation

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (objection) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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.
  • Automatic database schema creation and migration. 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.

Objection.js uses Promises and coding practices that make it ready for the future. We use Well known OOP techniques and ES2015 compatible classes and inheritance in the codebase. You can use things like async/await using a transpiler such as Babel. Check out our ES2015 and ESNext example projects.

Shortcuts:

Blog posts and tutorials: