xref: /netbsd-src/external/public-domain/sqlite/man/sqlite3_total_changes.3 (revision a24efa7dea9f1f56c3bdb15a927d3516792ace1c)
1.Dd $Mdocdate$
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 number of row changes caused by INSERT,
14UPDATE or DELETE statements since the database connection
15was opened.
16The count returned by sqlite3_total_changes() includes all changes
17from all  trigger contexts and changes made by foreign key actions.
18However, the count does not include changes used to implement REPLACE
19constraints, do rollbacks or ABORT processing, or DROP TABLE
20processing.
21The count does not include rows of views that fire an INSTEAD OF trigger,
22though if the INSTEAD OF trigger makes changes of its own, those changes
23are counted.
24The sqlite3_total_changes() function counts the changes as soon as
25the statement that makes them is completed (when the statement handle
26is passed to sqlite3_reset() or sqlite3_finalize()).
27.Pp
28See also the sqlite3_changes() interface, the count_changes pragma,
29and the total_changes() SQL function.
30.Pp
31If a separate thread makes changes on the same database connection
32while sqlite3_total_changes() is running then
33the value returned is unpredictable and not meaningful.
34.Sh SEE ALSO
35.Xr sqlite3 3 ,
36.Xr sqlite3_changes 3 ,
37.Xr sqlite3_finalize 3 ,
38.Xr sqlite3_reset 3 ,
39.Xr sqlite3_total_changes 3
40