Is there a way to call a prepared statement from within a transaction?

I have a prepared statement called p1. Is it possible to call it from within a transaction?

Something like

await db.transaction(async (tx) => {
  p1(tx).execute()
})
Was this page helpful?