Ulises Vargas De Sousa Ulises Vargas De Sousa - 1 month ago 9x
Node.js Question

Node.js: How to use a Postgres Stored Procedure in Sequelize?

I'm recently learning all specs of this powerful ORM, like migrating tables, define schemas, define models, associations, inserts, etc.

My particular question is How manage Postgres Stored Procedures (SP) in sequelize?

I'm using Node.js for my server.

rsp rsp

You can use:

sequelize.query('CALL yourStoredProcedure();').then(data => {
    // success ...
  }).catch(error => {
    // error ...