On 22 Feb 2019, at 4:08pm, Constantine Yannakopoulos <alfasud...@gmail.com> 
wrote:

> I would like to find whether an upsert operation actually did an insert or an 
> update, preferably without having to execute extra SQL statements before or 
> after it.

Try

<https://sqlite.org/c3ref/total_changes.html>

int sqlite3_total_changes(sqlite3*);

However, note that this is sensitive to how you're structuring your 
transactions, and to whether another connection has changed the database.  Test 
it out for your use-pattern to see if it helps.

If not, then the cannonical method is probably

<https://sqlite.org/pragma.html#pragma_data_version>

which, of course, takes a SQL command.

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

Reply via email to