SQLITE3_TOTAL_CHANGES(3)

NAME
sqlite3_total_changes - Total Number Of Rows Modified

SYNOPSIS
#include <sqlite.h>
int
sqlite3_total_changes(sqlite3*);

DESCRIPTION
This function returns the total number of rows inserted, modified or deleted by all INSERT, UPDATE or DELETE statements completed since the database connection was opened, including those executed as part of trigger programs. Executing any other type of SQL statement does not affect the value returned by sqlite3_total_changes().

Changes made as part of foreign key actions are included in the count, but those made as part of REPLACE constraint resolution are not. Changes to a view that are intercepted by INSTEAD OF triggers are not counted.

The sqlite3_total_changes(D) interface only reports the number of rows that changed due to SQL statement run against database connection D. Any changes by other database connections are ignored. To detect changes against a database file from other database connections use the PRAGMA data_version command or the SQLITE_FCNTL_DATA_VERSION file control.

If a separate thread makes changes on the same database connection while sqlite3_total_changes() is running then the value returned is unpredictable and not meaningful.

IMPLEMENTATION NOTES
These declarations were extracted from the interface documentation at line 2358.

    SQLITE_API int sqlite3_total_changes(sqlite3*);

SEE ALSO
sqlite3_file_control(3), sqlite3_changes(3), sqlite3_total_changes(3), SQLITE_FCNTL_LOCKSTATE(3)