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
You can check update hook https://sqlite.org/c3ref/update_hook.html

This will be notified on changes and will tell you about the type of change as well. There are some limitations so check the docs to see if it works for you.