PreupdateHook

fun interface PreupdateHook(source)

Callback to use with DatabaseConnection.setPreupdateHook.

Functions

Link copied to clipboard
abstract fun PreupdateHookScope.apply(connection: DatabaseConnection, action: SqliteActionCode.RowChange, databaseName: String, tableName: String, oldRowid: Long, newRowid: Long)

Called before a row is inserted, updated or deleted in tableName of databaseName on connection. action identifies the kind of change. oldRowid is the rowid of the row before the change and newRowid the rowid it will have afterward, both are only meaningful for the action they apply to. The receiver PreupdateHookScope gives access to the old and new column values.