Node.js + MySQL - handling transactions

前端 未结 5 1349
慢半拍i
慢半拍i 2021-02-07 22:27

I am building an app on node.js using express, and node-mysql driver. There is a couple of cases in my app when I need to make a series of database inserts/updates. I want them

5条回答
  •  有刺的猬
    2021-02-07 23:05

    Check out https://github.com/bminer/node-mysql-queues

    I implemented a little wrapper for node-mysql to support transactions and multiple statements. It has not been tested, and is NOT production ready... but it will be in a few days. :)

    UPDATE: I have tested this library pretty thoroughly now... should be good to go!

提交回复
热议问题