On Mon, 6 May 2013 20:55:01 +0300
Mikael <mikael.tr...@gmail.com> wrote:

> Currently in the absence of a sqlite3_reset_last_insert_rowid(), the
> closest you can do to figure out what ID was actually inserted by the
> most recent SQLite query is:
> 
>  * Lock mutex
>  * Get sqlite*'s last insert row ID
>  * Perform the query
>  * Get number of changed rows
>  * Get sqlite*'s last insert row ID
>  * Unlock mutex

I don't understand.  The process doing the insert presumably knows
which data it inserted.  Why not turn around and SELECT the ids for the
inserted values?  No mutex and no guesswork.  

Your process seems to imply that the the inserted values don't
constitute a key, or that you want to compute the row IDs for
performance.  Those don't strike me as  sufficient reason to perturb
the API.  

--jkl

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to