Can I .prepare() a transaction?

Surprisingly I can call prepare inside transaction callback but it doesn't make sense to me since we usually using prepare() as a variable out of block scope.

  await db.transaction(async (tx) => {
    const q1 = tx.update(...).set(...).where(...).prepare();
    const q2 = tx.insert(...).values(...).prepare();

    await q1.execute();
    await q2.execute();
  });
Was this page helpful?