Android 12 Developer Preview is here! Try it out, and give us your feedback!

QueryCallback

interface QueryCallback
androidx.room.RoomDatabase.QueryCallback

Callback interface for when SQLite queries are executed.

Summary

Public methods
abstract Unit
onQuery(@NonNull sqlQuery: String, @NonNull bindArgs: MutableList<Any!>)

Called when a SQL query is executed.

Public methods

onQuery

abstract fun onQuery(
    @NonNull sqlQuery: String,
    @NonNull bindArgs: MutableList<Any!>
): Unit

Called when a SQL query is executed.

Parameters
sqlQuery String: The SQLite query statement.
bindArgs MutableList<Any!>: Arguments of the query if available, empty list otherwise.