title: gorm exec return ID from insert transaction with raw sql
body: <p>I am using GORM to run SQL queries. I am trying to <code>Exec</code> an <code>INSERT</code> statement as a <code>TRANSACTION</code> because I need to be able to return the latest inserted ID.</p>
  <p>Here is a code snippet:</p>
  <pre><code>query := `
          START TRANSACTION;
              INSERT INTO something (a, b, c)
              VALUES (@arg1, @arg2, @arg3);
              SELECT LAST_INSERT_ID();
          COMMIT;`
      result := DB.Exec(
          query,
          sql.Named(&quot;arg1&quot;, &quot;aaa&quot;),
          sql.Named(&quot;arg2&quot;, &quot;bbb&quot;),
          sql.Named(&quot;arg3&quot;, &quot;ccc&quot;),
      )
  </code></pre>
  <p>I've read through the GORM transactions docs, but the examples are wildly different than my use case.</p>
  <p>My goal is to create an INSERT statement and finally return me the latest ID from that create. Using MySQL.</p>
  <p>Any ideas?</p>