-
Notifications
You must be signed in to change notification settings - Fork 132
Add support for pg-promise #162
Comments
currently Postgres support is using Sequelize, but I'm open to adding other methods e.g Bookshelf #151. I think as long as there is a default/preferred option highlighted so it doesn't cause information overload for people just wanting to get something up and running without having to research all the choices |
Sounds good! |
@petecoop if you decide to do that, I will help you (I'm the author of pg-promise) ;) |
I think the main difference is that at the moment I'm using ORM's for the models/DB integration. pg-promise looks like something you would run raw queries with, and use to build an ORM on top. Of course I'm happy to find a way to build some templates that use raw queries rather than an ORM if people want that, so maybe the options that are presented once selecting Postgres are something like:
What do you think @nitetrik ? |
@petecoop I think that would be great, as i use raw queries for some things. Its good to have choices. |
What do you use for the "M" in MVC @nitetrik ? Do you create a plain javascript object and put queries in there? or not bother with it at all? |
If you guys need an idea of what an app template with pg-promise might look like, have a look at pg-promise-demo.
@petecoop at the very core, yes, you are right. But it also features the best query formatting you can find in a library that's ultimately customizable. Custom Type Formatting, for example, allows developers extend formatting any way they like. And event extend allows extending the protocol with your own repositories - see the demo. Anyway, the point being, you wouldn't want to use pg-promise to implement an ORM on top of it, there is really no need, it is very self-sufficient. Not to mention it has the best support for transactions you can find, and that's a very high-level stuff, not just raw query formatting. See Tasks and Transactions. |
I think having choice on whether you want to use ORM like Sequelize, Bookshelf, Waterline, Caminte JS, etc or RAW queries. Cause for certain things raw queries are what all you need. |
Is it possible to replace the Node Postgres with PG-Promise?
The text was updated successfully, but these errors were encountered: