objection
An SQL-friendly ORM for Node.js
Last updated 23 days ago by koskimas .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install objection 
SYNC missed versions from official npm registry.

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 still making the common stuff easy and enjoyable.

Even though ORM is the best commonly known acronym to describe objection, a more accurate description is to call it a relational query builder. You get all the benefits of an SQL query builder but also a powerful set of tools for working with relations.

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 fully object oriented view of your database With objection you don't work with entities. You work with queries. Objection doesn't try to wrap every concept with an object oriented equivalent. The best attempt to do that (IMO) is Hibernate, which is excellent, but it has 800k lines of code and a lot more concepts to learn than SQL itself. The point is, writing a good traditional ORM is borderline impossible. Objection attempts to provide a completely different way of working with SQL.
  • 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.

The best way to get started is to clone our example project and start playing with it. There's also a typescript version available.

Check out this issue to see who is using objection and what they think about it.

Shortcuts:

Current Tags

  • 2.2.0                                ...           latest (23 days ago)
  • 2.2.0                                ...           next (23 days ago)

161 Versions

  • 2.2.0                                ...           23 days ago
  • 2.1.6                                ...           a month ago
  • 2.1.5                                ...           a month ago
  • 2.1.4                                ...           a month ago
  • 2.1.3                                ...           4 months ago
  • 2.1.2                                ...           6 months ago
  • 2.1.1                                ...           6 months ago
  • 2.1.0                                ...           6 months ago
  • 2.0.10                                ...           6 months ago
  • 2.0.8                                ...           6 months ago
  • 2.0.7                                ...           7 months ago
  • 2.0.6                                ...           7 months ago
  • 2.0.5                                ...           7 months ago
  • 2.0.4                                ...           7 months ago
  • 2.0.3                                ...           7 months ago
  • 2.0.2                                ...           7 months ago
  • 2.0.1                                ...           7 months ago
  • 2.0.0                                ...           7 months ago
  • 2.0.0-rc.2                                ...           7 months ago
  • 2.0.0-rc.1                                ...           7 months ago
  • 2.0.0-alpha.10                                ...           8 months ago
  • 2.0.0-alpha.9                                ...           9 months ago
  • 2.0.0-alpha.8                                ...           9 months ago
  • 1.6.11                                ...           9 months ago
  • 2.0.0-alpha.7                                ...           10 months ago
  • 2.0.0-alpha.6                                ...           10 months ago
  • 2.0.0-alpha.5                                ...           10 months ago
  • 2.0.0-alpha.4                                ...           10 months ago
  • 2.0.0-alpha.3                                ...           10 months ago
  • 2.0.0-alpha.2                                ...           10 months ago
  • 2.0.0-alpha.1                                ...           10 months ago
  • 1.6.9                                ...           a year ago
  • 1.6.8                                ...           a year ago
  • 1.6.7                                ...           a year ago
  • 1.6.6                                ...           a year ago
  • 1.6.5                                ...           a year ago
  • 1.6.4                                ...           a year ago
  • 1.6.3                                ...           a year ago
  • 1.6.2                                ...           a year ago
  • 1.6.1                                ...           a year ago
  • 1.6.0                                ...           a year ago
  • 1.6.0-rc.1                                ...           a year ago
  • 1.5.3                                ...           a year ago
  • 1.5.2                                ...           a year ago
  • 1.5.1                                ...           a year ago
  • 1.5.0                                ...           a year ago
  • 1.5.0-rc.5                                ...           a year ago
  • 1.5.0-rc.4                                ...           a year ago
  • 1.5.0-rc.3                                ...           a year ago
  • 1.5.0-rc.1                                ...           2 years ago
  • 1.4.0                                ...           2 years ago
  • 1.3.0                                ...           2 years ago
  • 1.2.6                                ...           2 years ago
  • 1.2.5                                ...           2 years ago
  • 1.2.4                                ...           2 years ago
  • 1.2.3                                ...           2 years ago
  • 1.2.2                                ...           2 years ago
  • 1.2.1                                ...           2 years ago
  • 1.2.0                                ...           2 years ago
  • 1.1.10                                ...           2 years ago
  • 1.1.9                                ...           2 years ago
  • 1.1.8                                ...           2 years ago
  • 1.1.7                                ...           2 years ago
  • 1.1.6                                ...           2 years ago
  • 1.1.5                                ...           2 years ago
  • 1.1.4                                ...           2 years ago
  • 1.1.3                                ...           2 years ago
  • 1.1.2                                ...           2 years ago
  • 1.1.1                                ...           2 years ago
  • 1.1.0                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
  • 1.0.0-rc.13                                ...           2 years ago
  • 1.0.0-rc.12                                ...           2 years ago
  • 1.0.0-rc.11                                ...           2 years ago
  • 1.0.0-rc.10                                ...           2 years ago
  • 1.0.0-rc.9                                ...           2 years ago
  • 1.0.0-rc.7                                ...           2 years ago
  • 1.0.0-rc.6                                ...           2 years ago
  • 1.0.0-rc.5                                ...           2 years ago
  • 1.0.0-rc.4                                ...           2 years ago
  • 1.0.0-rc.3                                ...           2 years ago
  • 1.0.0-rc.2                                ...           2 years ago
  • 1.0.0-rc.1                                ...           2 years ago
  • 0.9.4                                ...           3 years ago
  • 0.9.3                                ...           3 years ago
  • 0.9.2                                ...           3 years ago
  • 0.9.1                                ...           3 years ago
  • 0.9.0                                ...           3 years ago
  • 0.8.9                                ...           3 years ago
  • 0.8.8                                ...           3 years ago
  • 0.8.7                                ...           3 years ago
  • 0.8.6                                ...           3 years ago
  • 0.8.5                                ...           3 years ago
  • 0.8.4                                ...           3 years ago
  • 0.8.3                                ...           3 years ago
  • 0.8.2                                ...           3 years ago
  • 0.8.1                                ...           3 years ago
  • 0.8.0                                ...           3 years ago
  • 0.8.0-rc.2                                ...           3 years ago
  • 0.8.0-rc.1                                ...           3 years ago
  • 0.7.12                                ...           3 years ago
  • 0.7.11                                ...           3 years ago
  • 0.7.10                                ...           3 years ago
  • 0.7.9                                ...           3 years ago
  • 0.7.8                                ...           3 years ago
  • 0.7.7 [deprecated]           ...           3 years ago
  • 0.7.6 [deprecated]           ...           3 years ago
  • 0.7.5                                ...           3 years ago
  • 0.7.4                                ...           3 years ago
  • 0.7.3                                ...           3 years ago
  • 0.7.2                                ...           3 years ago
  • 0.7.1                                ...           3 years ago
  • 0.7.0                                ...           3 years ago
  • 0.7.0-rc.3                                ...           3 years ago
  • 0.7.0-rc.2                                ...           3 years ago
  • 0.7.0-rc.1                                ...           4 years ago
  • 0.6.2                                ...           4 years ago
  • 0.6.1                                ...           4 years ago
  • 0.6.0                                ...           4 years ago
  • 0.6.0-rc.6                                ...           4 years ago
  • 0.6.0-rc.5                                ...           4 years ago
  • 0.6.0-rc.4                                ...           4 years ago
  • 0.6.0-rc.3                                ...           4 years ago
  • 0.6.0-rc.2                                ...           4 years ago
  • 0.6.0-rc.1                                ...           4 years ago
  • 0.6.0-alpha.2                                ...           4 years ago
  • 0.6.0-alpha.1                                ...           4 years ago
  • 0.5.5                                ...           4 years ago
  • 0.5.4                                ...           4 years ago
  • 0.5.3                                ...           4 years ago
  • 0.5.2                                ...           4 years ago
  • 0.5.1                                ...           4 years ago
  • 0.5.0                                ...           4 years ago
  • 0.5.0-rc.5                                ...           4 years ago
  • 0.5.0-rc.4                                ...           4 years ago
  • 0.5.0-rc.3                                ...           4 years ago
  • 0.5.0-rc.2                                ...           4 years ago
  • 0.5.0-rc.1                                ...           4 years ago
  • 0.5.0-alpha.2                                ...           4 years ago
  • 0.5.0-alpha.1                                ...           4 years ago
  • 0.5.0-alpha.0                                ...           4 years ago
  • 0.4.0                                ...           4 years ago
  • 0.4.0-rc.4                                ...           4 years ago
  • 0.4.0-rc.3                                ...           4 years ago
  • 0.4.0-rc.2                                ...           5 years ago
  • 0.4.0-rc.1                                ...           5 years ago
  • 0.3.3                                ...           5 years ago
  • 0.3.2                                ...           5 years ago
  • 0.3.1                                ...           5 years ago
  • 0.3.0                                ...           5 years ago
  • 0.2.8                                ...           5 years ago
  • 0.2.7                                ...           5 years ago
  • 0.2.6                                ...           5 years ago
  • 0.2.5                                ...           5 years ago
  • 0.2.4                                ...           5 years ago
  • 0.2.3                                ...           5 years ago
  • 0.2.2                                ...           5 years ago
  • 0.2.1                                ...           5 years ago
  • 0.2.0                                ...           5 years ago
  • 0.1.6                                ...           5 years ago
Maintainers (2)
Downloads
Today 0
This Week 171
This Month 27
Last Day 27
Last Week 216
Last Month 1,817
Dependencies (2)
Dev Dependencies (21)
Dependents (217)

Copyright 2014 - 2017 © taobao.org |