| com.tencent.wcdb.database.SQLiteTrace |
Callback interface for SQLite trace events.
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| abstract void |
onConnectionObtained(SQLiteDatabase db, String sql, long waitTime, boolean isPrimary)
Called when database connection is successfully obtained by a thread.
| ||||||||||
| abstract void |
onConnectionPoolBusy(SQLiteDatabase db, String sql, List<String> requests, String message)
Called when connection pool is blocked by other statement execution
for a long time.
| ||||||||||
| abstract void |
onDatabaseCorrupted(SQLiteDatabase db)
Called on database corruption detected.
| ||||||||||
| abstract void |
onSQLExecuted(SQLiteDatabase db, String sql, int type, long time)
Called when a SQL statement finished execution.
| ||||||||||
Called when database connection is successfully obtained by a thread.
| db | database on which the connection was obtained |
|---|---|
| sql | statement about to be executed |
| waitTime | time spent on waiting for available connection, in milliseconds |
| isPrimary | whether the primary connection (write connection) is obtained |
Called when connection pool is blocked by other statement execution for a long time.
| db | database on which connection pool is blocked |
|---|---|
| sql | statement to be executed |
| requests | list of statement being executed |
| message | message generated by the connection pool |
Called on database corruption detected. This is valid on default error handler only.
See DatabaseErrorHandler
| db | the corrupted database |
|---|
Called when a SQL statement finished execution.
| db | database on which the statement was executed |
|---|---|
| sql | statement executed |
| type | type of the statement. See getSqlStatementType(String) |
| time | time spent on execution, in milliseconds |