1.8.6 CQL: Event Processing and History
CQL provides hooks for maintaining detailed history of data in the database.
The hook predicates are:
- cql:
cql_event_notification_table(+Schema, +TableName)
- cql:
cql_history_attribute(+Schema, +TableName, +ColumnName)
- cql:
cql_update_history_hook(+Schema, +TableName, +ColumnName, +PrimaryKeyColumnName, +PrimaryKeyValue, +ApplicationValueBefore, +ApplicationValueAfter, +AccessToken, +TransactionId, +TransactionTimestamp, +ThreadId, +Connection, +Goal)
. - cql:
process_database_events(+Events)
Event Processing and History recording can be suppressed for a particular update/insert/delete statement by including the _no_state_change_actions_9 directive.
For example
{[], update(se_lt_x, [f-'LILAC'] @ :: [a-'ELSTON_M'], no_state_change_actions, % Don't want history to record this change row_count(RowCount)}