title: Predict next auto-inserted row id (SQLite)
body: <p>I'm trying to find if there is a reliable way (using <a href="http://en.wikipedia.org/wiki/SQLite" rel="noreferrer">SQLite</a>) to find the ID of the next row to be inserted, <em>before it gets inserted</em>. I need to use the id for another insert statement, but don't have the option of instantly inserting and getting the next row.</p>
  
  <p>Is predicting the next id as simple as getting the last id and adding one? Is that a guarantee?</p>
  
  <p>Edit: A little more reasoning...
  I can't insert immediately because the insert may end up being canceled by the user. User will make some changes, SQL statements will be stored, and from there the user can either save (inserting all the rows at once), or cancel (not changing anything). In the case of a program crash, the desired functionality is that nothing gets changed.</p>