title: Yii2 get insert query before saving model
body: <p><b>Yii2 Question:</b> Is there any way to get the current <code>insert</code> query before executing save? for instance <code>$model-&gt;save()</code>. For the current situation, save is actually inserting a row in a table.<br><br>
  I know about executing <code>function beforeSave($insert)</code> but this $insert only refers whether the event is valid or not, and does extra computation before saving in database.<br><br>
  Misc stuff: Find query can be printed as <code>$FindResultVariable-&gt;prepare(Yii::$app-&gt;db-&gt;queryBuilder)-&gt;createCommand()-&gt;rawSql;</code> If someone can think in this direction too for solution?<br><br>Thanks.</p>