Wrap INSERTs in a transaction.