mirror of
https://github.com/sqlite/sqlite.git
synced 2025-11-09 14:21:03 +03:00
Update the documentation on the sqlite3_changes() and sqlite3_total_changes()
functions. (CVS 6568) FossilOrigin-Name: 58c7bdb21c719bf06713ff8ffa7ee51cf1973712
This commit is contained in:
14
manifest
14
manifest
@@ -1,5 +1,5 @@
|
|||||||
C Fix\sa\scase\sin\swhere.c\swhere\sa\scrash\scan\sfollow\sa\smalloc\sfailure.\sAlso\smodify\stest\scode\sin\stest8.c\sto\scheck\sa\sreturn\scode\sthat\swas\sbeing\sdropped\s(causing\sa\stest\sin\svtab_err.test\sto\sfail).\s(CVS\s6567)
|
C Update\sthe\sdocumentation\son\sthe\ssqlite3_changes()\sand\ssqlite3_total_changes()\nfunctions.\s(CVS\s6568)
|
||||||
D 2009-04-29T11:50:54
|
D 2009-04-29T14:33:44
|
||||||
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
|
F Makefile.arm-wince-mingw32ce-gcc fcd5e9cd67fe88836360bb4f9ef4cb7f8e2fb5a0
|
||||||
F Makefile.in 583e87706abc3026960ed759aff6371faf84c211
|
F Makefile.in 583e87706abc3026960ed759aff6371faf84c211
|
||||||
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
|
F Makefile.linux-gcc d53183f4aa6a9192d249731c90dbdffbd2c68654
|
||||||
@@ -160,7 +160,7 @@ F src/resolve.c 094e44450371fb27869eb8bf679aacbe51fdc56d
|
|||||||
F src/rowset.c 14d12b5e81b5907b87d511f6f4219805f96a4b55
|
F src/rowset.c 14d12b5e81b5907b87d511f6f4219805f96a4b55
|
||||||
F src/select.c 40748e8044b79d41ba04ce1014ae45434ed452d3
|
F src/select.c 40748e8044b79d41ba04ce1014ae45434ed452d3
|
||||||
F src/shell.c 0a11f831603f17fea20ca97133c0f64e716af4a7
|
F src/shell.c 0a11f831603f17fea20ca97133c0f64e716af4a7
|
||||||
F src/sqlite.h.in 4028ba942fa43afa7f8ade88fa9acedaa024ddeb
|
F src/sqlite.h.in 2b7667d7912abe14af4ab84e7c4ed022e734f7ba
|
||||||
F src/sqlite3ext.h 1db7d63ab5de4b3e6b83dd03d1a4e64fef6d2a17
|
F src/sqlite3ext.h 1db7d63ab5de4b3e6b83dd03d1a4e64fef6d2a17
|
||||||
F src/sqliteInt.h 61be3597d7dce6b3d360a7185c760c3e4e968a59
|
F src/sqliteInt.h 61be3597d7dce6b3d360a7185c760c3e4e968a59
|
||||||
F src/sqliteLimit.h ffe93f5a0c4e7bd13e70cd7bf84cfb5c3465f45d
|
F src/sqliteLimit.h ffe93f5a0c4e7bd13e70cd7bf84cfb5c3465f45d
|
||||||
@@ -725,7 +725,7 @@ F tool/speedtest16.c c8a9c793df96db7e4933f0852abb7a03d48f2e81
|
|||||||
F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
|
F tool/speedtest2.tcl ee2149167303ba8e95af97873c575c3e0fab58ff
|
||||||
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
|
F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
|
||||||
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
|
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
|
||||||
P e8f7f7b787fe941093edaea44db4d361fad1e002
|
P 9664e2b6c69271a7ca55af7812a186773a7c6592
|
||||||
R 4de805b014550f062517076b8e0aa32b
|
R 8444b35afee909cdcb2c2ac18b099c09
|
||||||
U danielk1977
|
U drh
|
||||||
Z cc423cf5b9f2744841b886533297cfcf
|
Z b5d9513f3dd8602eb18f6166440d0146
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
9664e2b6c69271a7ca55af7812a186773a7c6592
|
58c7bdb21c719bf06713ff8ffa7ee51cf1973712
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
** the version number) and changes its name to "sqlite3.h" as
|
** the version number) and changes its name to "sqlite3.h" as
|
||||||
** part of the build process.
|
** part of the build process.
|
||||||
**
|
**
|
||||||
** @(#) $Id: sqlite.h.in,v 1.445 2009/04/28 04:46:42 drh Exp $
|
** @(#) $Id: sqlite.h.in,v 1.446 2009/04/29 14:33:44 drh Exp $
|
||||||
*/
|
*/
|
||||||
#ifndef _SQLITE3_H_
|
#ifndef _SQLITE3_H_
|
||||||
#define _SQLITE3_H_
|
#define _SQLITE3_H_
|
||||||
@@ -1223,14 +1223,18 @@ sqlite3_int64 sqlite3_last_insert_rowid(sqlite3*);
|
|||||||
** triggers are not counted. Use the [sqlite3_total_changes()] function
|
** triggers are not counted. Use the [sqlite3_total_changes()] function
|
||||||
** to find the total number of changes including changes caused by triggers.
|
** to find the total number of changes including changes caused by triggers.
|
||||||
**
|
**
|
||||||
|
** Changes to a view that are simulated by an [INSTEAD OF trigger]
|
||||||
|
** are not counted. Only real table changes are counted.
|
||||||
|
**
|
||||||
** A "row change" is a change to a single row of a single table
|
** A "row change" is a change to a single row of a single table
|
||||||
** caused by an INSERT, DELETE, or UPDATE statement. Rows that
|
** caused by an INSERT, DELETE, or UPDATE statement. Rows that
|
||||||
** are changed as side effects of REPLACE constraint resolution,
|
** are changed as side effects of [REPLACE] constraint resolution,
|
||||||
** rollback, ABORT processing, DROP TABLE, or by any other
|
** rollback, ABORT processing, [DROP TABLE], or by any other
|
||||||
** mechanisms do not count as direct row changes.
|
** mechanisms do not count as direct row changes.
|
||||||
**
|
**
|
||||||
** A "trigger context" is a scope of execution that begins and
|
** A "trigger context" is a scope of execution that begins and
|
||||||
** ends with the script of a trigger. Most SQL statements are
|
** ends with the script of a [CREATE TRIGGER | trigger].
|
||||||
|
** Most SQL statements are
|
||||||
** evaluated outside of any trigger. This is the "top level"
|
** evaluated outside of any trigger. This is the "top level"
|
||||||
** trigger context. If a trigger fires from the top level, a
|
** trigger context. If a trigger fires from the top level, a
|
||||||
** new trigger context is entered for the duration of that one
|
** new trigger context is entered for the duration of that one
|
||||||
@@ -1252,16 +1256,8 @@ sqlite3_int64 sqlite3_last_insert_rowid(sqlite3*);
|
|||||||
** However, the number returned does not include changes
|
** However, the number returned does not include changes
|
||||||
** caused by subtriggers since those have their own context.
|
** caused by subtriggers since those have their own context.
|
||||||
**
|
**
|
||||||
** SQLite implements the command "DELETE FROM table" without a WHERE clause
|
** See also the [sqlite3_total_changes()] interface and the
|
||||||
** by dropping and recreating the table. Doing so is much faster than going
|
** [count_changes pragma].
|
||||||
** through and deleting individual elements from the table. Because of this
|
|
||||||
** optimization, the deletions in "DELETE FROM table" are not row changes and
|
|
||||||
** will not be counted by the sqlite3_changes() or [sqlite3_total_changes()]
|
|
||||||
** functions, regardless of the number of elements that were originally
|
|
||||||
** in the table. To get an accurate count of the number of rows deleted, use
|
|
||||||
** "DELETE FROM table WHERE 1" instead. Or recompile using the
|
|
||||||
** [SQLITE_OMIT_TRUNCATE_OPTIMIZATION] compile-time option to disable the
|
|
||||||
** optimization on all queries.
|
|
||||||
**
|
**
|
||||||
** Requirements:
|
** Requirements:
|
||||||
** [H12241] [H12243]
|
** [H12241] [H12243]
|
||||||
@@ -1275,27 +1271,21 @@ int sqlite3_changes(sqlite3*);
|
|||||||
/*
|
/*
|
||||||
** CAPI3REF: Total Number Of Rows Modified {H12260} <S10600>
|
** CAPI3REF: Total Number Of Rows Modified {H12260} <S10600>
|
||||||
**
|
**
|
||||||
** This function returns the number of row changes caused by INSERT,
|
** This function returns the number of row changes caused by [INSERT],
|
||||||
** UPDATE or DELETE statements since the [database connection] was opened.
|
** [UPDATE] or [DELETE] statements since the [database connection] was opened.
|
||||||
** The count includes all changes from all trigger contexts. However,
|
** The count includes all changes from all
|
||||||
** the count does not include changes used to implement REPLACE constraints,
|
** [CREATE TRIGGER | trigger] contexts. However,
|
||||||
** do rollbacks or ABORT processing, or DROP table processing.
|
** the count does not include changes used to implement [REPLACE] constraints,
|
||||||
|
** do rollbacks or ABORT processing, or [DROP TABLE] processing. The
|
||||||
|
** count does not rows of views that fire an [INSTEAD OF trigger], though if
|
||||||
|
** the INSTEAD OF trigger makes changes of its own, those changes are
|
||||||
|
** counted.
|
||||||
** The changes are counted as soon as the statement that makes them is
|
** The changes are counted as soon as the statement that makes them is
|
||||||
** completed (when the statement handle is passed to [sqlite3_reset()] or
|
** completed (when the statement handle is passed to [sqlite3_reset()] or
|
||||||
** [sqlite3_finalize()]).
|
** [sqlite3_finalize()]).
|
||||||
**
|
**
|
||||||
** SQLite implements the command "DELETE FROM table" without a WHERE clause
|
** See also the [sqlite3_changes()] interface and the
|
||||||
** by dropping and recreating the table. (This is much faster than going
|
** [count_changes pragma].
|
||||||
** through and deleting individual elements from the table.) Because of this
|
|
||||||
** optimization, the deletions in "DELETE FROM table" are not row changes and
|
|
||||||
** will not be counted by the sqlite3_changes() or [sqlite3_total_changes()]
|
|
||||||
** functions, regardless of the number of elements that were originally
|
|
||||||
** in the table. To get an accurate count of the number of rows deleted, use
|
|
||||||
** "DELETE FROM table WHERE 1" instead. Or recompile using the
|
|
||||||
** [SQLITE_OMIT_TRUNCATE_OPTIMIZATION] compile-time option to disable the
|
|
||||||
** optimization on all queries.
|
|
||||||
**
|
|
||||||
** See also the [sqlite3_changes()] interface.
|
|
||||||
**
|
**
|
||||||
** Requirements:
|
** Requirements:
|
||||||
** [H12261] [H12263]
|
** [H12261] [H12263]
|
||||||
|
|||||||
Reference in New Issue
Block a user