Yup, this approach will work. You can pass the client connection around. The connection itself is OK to share across your app.
What you don’t want to do is pass newTxn() objects around concurrently, as each txn has its own txn context.
Yup, this approach will work. You can pass the client connection around. The connection itself is OK to share across your app.
What you don’t want to do is pass newTxn() objects around concurrently, as each txn has its own txn context.