1.Dd December 19, 2018 2.Dt SQLITE3_TOTAL_CHANGES 3 3.Os 4.Sh NAME 5.Nm sqlite3_total_changes 6.Nd Total Number Of Rows Modified 7.Sh SYNOPSIS 8.Ft int 9.Fo sqlite3_total_changes 10.Fa "sqlite3*" 11.Fc 12.Sh DESCRIPTION 13This function returns the total number of rows inserted, modified or 14deleted by all INSERT, UPDATE or DELETE statements 15completed since the database connection was opened, including those 16executed as part of trigger programs. 17Executing any other type of SQL statement does not affect the value 18returned by sqlite3_total_changes(). 19.Pp 20Changes made as part of foreign key actions are 21included in the count, but those made as part of REPLACE constraint 22resolution are not. 23Changes to a view that are intercepted by INSTEAD OF triggers are not 24counted. 25.Pp 26This the sqlite3_total_changes(D) interface 27only reports the number of rows that changed due to SQL statement run 28against database connection D. 29Any changes by other database connections are ignored. 30To detect changes against a database file from other database connections 31use the PRAGMA data_version command or the SQLITE_FCNTL_DATA_VERSION 32file control. 33.Pp 34If a separate thread makes changes on the same database connection 35while sqlite3_total_changes() is running then 36the value returned is unpredictable and not meaningful. 37.Pp 38.Sh SEE ALSO 39.Xr sqlite3_file_control 3 , 40.Xr sqlite3_changes 3 , 41.Xr sqlite3_total_changes 3 , 42.Xr SQLITE_FCNTL_LOCKSTATE 3 43