1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-08-07 02:42:48 +03:00

Update sqlite3_changes() to match the documentation and add

sqlite3_total_changes(). (CVS 1645)

FossilOrigin-Name: ae2f4a0943854fedbbb6fab1dc3aaf972722ed95
This commit is contained in:
danielk1977
2004-06-21 06:50:26 +00:00
parent d664d9a2bb
commit b28af71a22
20 changed files with 279 additions and 216 deletions

View File

@@ -14,7 +14,7 @@
** other files are for internal use by SQLite and should not be
** accessed by users of the library.
**
** $Id: main.c,v 1.230 2004/06/19 09:35:37 danielk1977 Exp $
** $Id: main.c,v 1.231 2004/06/21 06:50:28 danielk1977 Exp $
*/
#include "sqliteInt.h"
#include "os.h"
@@ -448,13 +448,10 @@ int sqlite3_changes(sqlite *db){
}
/*
** Return the number of changes produced by the last INSERT, UPDATE, or
** DELETE statement to complete execution. The count does not include
** changes due to SQL statements executed in trigger programs that were
** triggered by that statement
** Return the number of changes since the database handle was opened.
*/
int sqlite3_last_statement_changes(sqlite *db){
return db->lsChange;
int sqlite3_total_changes(sqlite3 *db){
return db->nTotalChange;
}
/*
@@ -952,7 +949,6 @@ int sqlite3_prepare(
goto prepare_out;
}
if( db->pVdbe==0 ){ db->nChange = 0; }
memset(&sParse, 0, sizeof(sParse));
sParse.db = db;
sqlite3RunParser(&sParse, zSql, &zErrMsg);