public interface

SQLiteChangeListener

com.tencent.wcdb.database.SQLiteChangeListener

Class Overview

Listener interface for database change notifications.

Summary

Public Methods
abstract void onChange(SQLiteDatabase db, String dbName, String table, long[] insertIds, long[] updateIds, long[] deleteIds)
Called when transactions are committed and some of rows in the database is inserted, updated or deleted.

Public Methods

public abstract void onChange (SQLiteDatabase db, String dbName, String table, long[] insertIds, long[] updateIds, long[] deleteIds)

Called when transactions are committed and some of rows in the database is inserted, updated or deleted. When a transaction modifies more than one table, this method will be called multiple times with different arguments. It's possible that multiple threads call this method concurrently, so the implementation must be thread-safe.

Parameters
db database object whose tables were changed
dbName attached database name of the changed table, "main" for the main database
table name of the changed table
insertIds array of rowIDs of the rows inserted, or null if rowID trace is disabled
updateIds array of rowIDs of the rows updated, or null if rowID trace is disabled
deleteIds array of rowIDs of the rows deleted, or null if rowID trace is disabled