nesting db calls in transactions without using the callback argument
What is the point of the trx argument when calling db.transaction()?
when using raw sql, a transaction looks something like
so the queries don't really have to "know" that they are inside a transaction, so my question is, is this possible?
if this is not possible: is there any way of nesting inserts without passing the trx argument around? I'd rather keep those things outside functions like insertPlaceDetails, which would now need to "know" about its context. Thanks!
when using raw sql, a transaction looks something like
so the queries don't really have to "know" that they are inside a transaction, so my question is, is this possible?
if this is not possible: is there any way of nesting inserts without passing the trx argument around? I'd rather keep those things outside functions like insertPlaceDetails, which would now need to "know" about its context. Thanks!