Small. Fast. Reliable.
Choose any three.

SQLite C Interface

Allowed return values from [sqlite3_txn_state()]

#define SQLITE_TXN_NONE  0
#define SQLITE_TXN_READ  1
#define SQLITE_TXN_WRITE 2

These constants define the current transaction state of a database file. The sqlite3_txn_state(D,S) interface returns one of these constants in order to describe the transaction state of schema S in database connection D.

SQLITE_TXN_NONE
The SQLITE_TXN_NONE state means that no transaction is currently pending.

SQLITE_TXN_READ
The SQLITE_TXN_READ state means that the database is currently in a read transaction. Content has been read from the database file but nothing in the database file has changed. The transaction state will advanced to SQLITE_TXN_WRITE if any changes occur and there are no other conflicting concurrent write transactions. The transaction state will revert to SQLITE_TXN_NONE following a ROLLBACK or COMMIT.

SQLITE_TXN_WRITE
The SQLITE_TXN_WRITE state means that the database is currently in a write transaction. Content has been written to the database file but has not yet committed. The transaction state will change to to SQLITE_TXN_NONE at the next ROLLBACK or COMMIT.

See also lists of Objects, Constants, and Functions.