-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems with transaction #2529
Comments
Hi, sorry you are having trouble. Ultimately I don't think this module can possibly change the nature of Javascript itself and run both sections of the conditional. But I am happy to help debug. Can you include the DDL of the table and some sample data I can load it with that reproduces the issue you are experiencing? |
@dougwilson thanks for offering to help! It seems like the function is being called multiple times, and what I am seeing is simply the last run, which shows As to why it's running multiple times, is beyond me. Let me just double-check and I'll update this post. Thanks! |
Ah, gotcha. Yea, the callback from your query should only happen once if the verifyEmail function itself is only called once based on the code. I would love to make sure that isn't the case if you have a way to reproduce. I just spent some time making up a table good enough to run the query and ran though the two conditions and didn't see any duplicate calls or other issues, but I may just not have the right data. |
@dougwilson Again, thanks for your readiness to help. I started backtracking the code that calls this function and removing bit for bit. Not sure if something was cached or what not, but everything seems to work now. Been pulling my hair for the better part of 3 hours. PS: Is the approach for this transaction fine? Seems like an awful lot of code to just do a DELETE and UPDATE query. Just wanna make sure. |
I am running an express server where I am trying to execute a somewhat complex transaction. I am getting the expected changes in my database, but not the expected output from the function.
I am getting the following response from my DELETE query:
What is weird is that, despite getting
affectedRows: 0
, it still runs the UPDATE query below. How is this possible?Also, why am I getting status code 3? Is my transaction not written correctly?
Here's the full code:
The text was updated successfully, but these errors were encountered: