SQLite Forum

how can i identify the data is just inserted into the database or updated the existed item when i use upsert-clause
Login
Probably because the upserts turn into something like individual updates internally where needed.

There's also a total-changes api, the real name escapes me now and I'm not where I can easily check it, it might be sqlite3_total_changes().

I think it is connection/session based, so the idea is to check it before and after the query to establish the changes.

I did not test this or know it for sure, it's just what came to mind reading your question. If you do try it, kindly let us know whether it worked or not.