*** DRAFT ***

SQLite Requirement Matrix Details
update_hook.html

Index Summary Markup Original


R-21999-45122-31048-13446-02528-26470-06317-22169 tcl slt th3 src

The sqlite3_update_hook() interface registers a callback function with the database connection identified by the first argument to be invoked whenever a row is updated, inserted or deleted in a rowid table.

tcl/hook.test:132   th3/cov1/main15.test:121

/* IMP: R-21999-45122 */
# EVIDENCE-OF: R-21999-45122 The sqlite3_update_hook() interface
# registers a callback function with the database connection identified
# by the first argument to be invoked whenever a row is updated,
# inserted or deleted in a rowid table.

R-59246-48037-03158-25675-60102-33879-46651-46804 tcl slt th3 src

Any callback set by a previous call to this function for the same database connection is overridden.

th3/cov1/main15.test:135

/* IMP: R-59246-48037 */
# EVIDENCE-OF: R-59246-48037 Any callback set by a previous call to this
# function for the same database connection is overridden.

R-28265-37702-63167-40719-28674-33175-26294-56765 tcl slt th3 src

The second argument is a pointer to the function to invoke when a row is updated, inserted or deleted in a rowid table.

th3/cov1/main15.test:126

/* IMP: R-28265-37702 */
# EVIDENCE-OF: R-28265-37702 The second argument is a pointer to the
# function to invoke when a row is updated, inserted or deleted in a
# rowid table.

R-34837-12462-62420-33748-07267-00170-63881-53119 tcl slt th3 src

The first argument to the callback is a copy of the third argument to sqlite3_update_hook().

th3/cov1/main15.test:33

/* IMP: R-34837-12462 */
# EVIDENCE-OF: R-34837-12462 The first argument to the callback is a
# copy of the third argument to sqlite3_update_hook().

R-15506-57666-56346-10655-27907-33619-59147-37222 tcl slt th3 src

The second callback argument is one of SQLITE_INSERT, SQLITE_DELETE, or SQLITE_UPDATE, depending on the operation that caused the callback to be invoked.

tcl/hook.test:164   th3/cov1/main15.test:41

/* IMP: R-15506-57666 */
# EVIDENCE-OF: R-15506-57666 The second callback argument is one of
# SQLITE_INSERT, SQLITE_DELETE, or SQLITE_UPDATE, depending on the
# operation that caused the callback to be invoked.

R-29213-61195-54301-03299-01569-39638-01555-01215 tcl slt th3 src

The third and fourth arguments to the callback contain pointers to the database and table name containing the affected row.

tcl/hook.test:168   th3/cov1/main15.test:54

/* IMP: R-29213-61195 */
# EVIDENCE-OF: R-29213-61195 The third and fourth arguments to the
# callback contain pointers to the database and table name containing
# the affected row.

R-30809-57812-61495-62022-11490-25278-56613-15778 tcl slt th3 src

The final callback parameter is the rowid of the row.

tcl/hook.test:172   th3/cov1/main15.test:61

/* IMP: R-30809-57812 */
# EVIDENCE-OF: R-30809-57812 The final callback parameter is the rowid
# of the row.

R-26267-43414-63813-04870-32404-43287-64705-64465 tcl slt th3 src

In the case of an update, this is the rowid after the update takes place.

th3/cov1/main15.test:247

/* IMP: R-26267-43414 */
# EVIDENCE-OF: R-26267-43414 In the case of an update, this is the rowid
# after the update takes place.

R-24531-54682-59565-24630-56412-40369-07306-32819 tcl slt th3 src

The update hook is not invoked when internal system tables are modified (i.e. sqlite_sequence).

tcl/hook.test:146

/* IMP: R-24531-54682 */
# EVIDENCE-OF: R-24531-54682 The update hook is not invoked when
# internal system tables are modified (i.e. sqlite_sequence).

R-33257-44249-04384-28673-29527-48027-05174-23036 tcl slt th3 src

The update hook is not invoked when WITHOUT ROWID tables are modified.

tcl/hook.test:197

/* IMP: R-33257-44249 */
# EVIDENCE-OF: R-33257-44249 The update hook is not invoked when WITHOUT
# ROWID tables are modified.

R-60908-02162-62695-08898-00608-41143-47614-24139 tcl slt th3 src

In the current implementation, the update hook is not invoked when conflicting rows are deleted because of an ON CONFLICT REPLACE clause.

th3/cov1/main15.test:262

/* IMP: R-60908-02162 */
# EVIDENCE-OF: R-60908-02162 In the current implementation, the update
# hook is not invoked when conflicting rows are deleted because of an ON
# CONFLICT REPLACE clause.

R-35802-14059-47020-23527-06222-22948-08783-35470 tcl slt th3 src

Nor is the update hook invoked when rows are deleted using the truncate optimization.

th3/cov1/main15.test:272

/* IMP: R-35802-14059 */
# EVIDENCE-OF: R-35802-14059 Nor is the update hook invoked when rows
# are deleted using the truncate optimization.

R-42136-40354-42275-03158-50011-22774-46135-65161 tcl slt th3 src

The sqlite3_update_hook(D,C,P) function returns the P argument from the previous call on the same database connection D, or NULL for the first call on D.

th3/cov1/main15.test:141

/* IMP: R-42136-40354 */
# EVIDENCE-OF: R-42136-40354 The sqlite3_update_hook(D,C,P) function
# returns the P argument from the previous call on the same database
# connection D, or NULL for the first call on D.