Transaction failing issue
Hey all,
I am trying to implement a transaction here
Adding a cartId to rows based on certian logic
I tried many combinations and even a raw sql version but I cannot determine why I am getting a rollback
I am hoping one of you can see what I am doing wrong here
https://github.com/Darkmift/pc-shopping-cart-limit-oversell/blob/6aaba73704774f151cb7c28ec4fd466678d8d540/src/api/product-inventory/product-inventory.service.ts#L83
GitHub
pc-shopping-cart-limit-oversell/src/api/product-inventory/product-i...
Contribute to Darkmift/pc-shopping-cart-limit-oversell development by creating an account on GitHub.
1 Reply
Hey all,
Bit of context,
I tried applying a transaction in mysql using the drizzle transaction api but kept getting rollback and errors that did not point me to a solution.
I ended up making a procedure instead.
My question is if someone can please show me how to convert this procedure to a working example using said drizzle api.
https://github.com/Darkmift/pc-shopping-cart-limit-oversell/blob/2fae76bca098d8c8dd32005f21f5ffa780be6043/src/common/drizzle/db/queries/addItemsToCart.ts#L4
This the alternative procedure used instead RN.
GitHub
pc-shopping-cart-limit-oversell/src/common/drizzle/db/queries/addIt...
Contribute to Darkmift/pc-shopping-cart-limit-oversell development by creating an account on GitHub.