Managing Transactions
Different adapters handle transactions differently; many choose to auto-commit each executed query. However, some adapters define multiple Transaction Modes that allow you to fine-tune the transaction handling of the commands you run in Harlequin.
Switching Transaction Modes
If the adapter supports multiple transaction modes, you should see a button labeled “Tx: [Mode Name]” in the Run Query bar in Harlequin. For example, this button is shown when the SQLite adapter is in Autocommit mode:
![Screenshot of the Run Query bar with transaction mode support enabled.](/_app/immutable/assets/tx-auto.BHmR5z2w.png)
Clicking “Tx: [Mode Name]” button will toggle to the adapter’s next transaction mode. For SQLite, clicking the button above toggles to “Tx: Manual”, and the UI grows two new buttons:
![Screenshot of the Run Query bar with manual transaction mode enabled.](/_app/immutable/assets/tx-manual.DZ-J9Y7-.png)
Committing Transactions
If supported by the adapter and appropriate for the transaction mode, next to the “Tx: [Mode Name]” button will appear a button labeled ”🡅“. Clicking this button will commit the current open transaction.
Rolling Back Transactions
As with committing, if supported by the adapter and appropriate for the transaction mode, next to the “Tx: [Mode Name]” button will appear a button labeled ”⮌“. Clicking this button will roll back the current open transaction.