dwyl / learn-postgresql

🐘 Learn how to use PostgreSQL and Structured Query Language (SQL) to store and query your relational data. 🔍
212 stars 23 forks source link

Skeleton #1

Closed naazy closed 5 years ago

naazy commented 8 years ago
des-des commented 8 years ago

@naazy have you looked at sequelize?

mantagen commented 8 years ago

@naazy http://www.sitepoint.com/3-javascript-orms-you-might-not-know/ (don't know which js ORMs you would know if you didn't know any of these)

naazy commented 8 years ago

@des-des no I haven't! Would you recommend?

Sent from my iPhone

On 5 Mar 2016, at 13:12, Eoin McCarthy notifications@github.com wrote:

@naazy have you looked at sequelize?

— Reply to this email directly or view it on GitHub.

nelsonic commented 8 years ago

@des-des six-months-later, would you still recommend using sequelize...? or have you had time to formulate a "if I could start over..." insight you can share with us...?

mantagen commented 8 years ago

Good question

des-des commented 8 years ago

@nelsonic I am not sure a good orm for node exist :(. I would try hard to find an alternative to sequelise if I started a new project, its bloated and painful to use. That said, unless you are working on a very small project, I do not think handwriting all your queries and schema is a good idea, I feel like there should be an abstraction above sql to work with. Something that was not too complex / big but abstracted some sql stuff away would be perfect.

des-des commented 8 years ago

http://knexjs.org/ would be the first thing I looked into

nelsonic commented 8 years ago

@des-des I had a look at Knex the other day. Code seemed OK to me and Docs decent, but what screamed of "unmaintained" was: npm version Build Status Coverage Status Dependencies Status Gitter chat

37 Open PRs at the time of writing going back 2 years. and reading through the features being added it's doing way too many things ... 😕

I'd be stoked to read your findings when you are able to investigate the available options! 👍

nelsonic commented 5 years ago

We've been using Ecto in the context of our Phoenix apps and pg with pg-escape in Node.js for an example of this see: https://github.com/nelsonic/time-mvp/blob/master/server/db.js#L46