You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 2, 2021. It is now read-only.
I'm currently also using the node-mysql lib in combination with Hapi. I like the way you wrote wrapper to handle the connection on every query. My question is, how would you deal with transactions? There are operations that require multiple inserts and if one of them fails I need to be able to rollback to prevent corrupt data. Although you can add some functionality to handle transactions on every query I don't see how you could handle transactions over multiple queries with your example and I would very much like to see how you would solve it. Since you are clearly more advanced at it than me. For reference I wrote https://github.com/Salesflare/hapi-plugin-mysql to deal with the connections. I basicly handle them per request. But this causes me to use the same connection for auth and such and I always have to use a transaction.
Any help is appreciated!
The text was updated successfully, but these errors were encountered:
AdriVanHoudt
changed the title
[QUESTION] Deal with large queries
[QUESTION] Deal with large queries/transactions
Jan 26, 2015
I'm currently also using the node-mysql lib in combination with Hapi. I like the way you wrote wrapper to handle the connection on every query. My question is, how would you deal with transactions? There are operations that require multiple inserts and if one of them fails I need to be able to rollback to prevent corrupt data. Although you can add some functionality to handle transactions on every query I don't see how you could handle transactions over multiple queries with your example and I would very much like to see how you would solve it. Since you are clearly more advanced at it than me. For reference I wrote https://github.com/Salesflare/hapi-plugin-mysql to deal with the connections. I basicly handle them per request. But this causes me to use the same connection for auth and such and I always have to use a transaction.
Any help is appreciated!
The text was updated successfully, but these errors were encountered: