int sqlite3_txn_state(sqlite3*,const char *zSchema);
The sqlite3_txn_state(D,S) interface returns the current transaction state of schema S in database connection D. If S is NULL, then the highest transaction state of any schema on database connection D is returned. Transaction states are (in order of lowest to highest):
See also lists of Objects, Constants, and Functions.
SQLite is in the Public Domain.
https://sqlite.org/c3ref/txn_state.html