Tuesday 6 June 2017

How can i handle nested queries with promises instead of callback?

how can i do the following with bluebird promises. modules i am using are bluebird, promise-mysql

  1. insert in table A and return a_id
  2. insert records in table B using a_id as foreign key
  3. insert records in table C using a_id as foreign key
  4. now response is send to user that all records are added.

I am using native queries.



via Khan

No comments:

Post a Comment