DEV Community

Discussion on: Objection + Knex = Painless PostgreSQL in your Node App

Collapse
 
antjanus profile image
Antonin J. (they/them)

This is really cool! I actually use Postgres/Knex/Objection at work in production, and have for about a year and a half and it's an amazing tool. One of my favorite features of Objection is the use of the get and set in the class which you mentioned.

Combined with lodash, it's really easy to do something like:

res.send(_.pick(post, [
  ...post,
  computedProperty,
  computedProperty2,
  whateverElse
]);

I wanted to ask, why did you end up trying out Objection over, let's say, Bookshelf which was built by the same author as Knex and at around the same time as Knex? We migrated from Bookshelf to Objection so I think Objection is the right choice, just wondering though.

Collapse
 
aspittel profile image
Ali Spittel

Ah awesome! I had a friend recommend Objection, so that's why I went with that one! I hadn't heard great things about Bookshelf.