addOnChangesListener method

void addOnChangesListener(
  1. Database database,
  2. TransactionRecordChangeListener<K, V> onChanges
)

Listen for changes on a given store.

Note that you can perform changes in the callback using the transaction provided. Also note that if you modify and already modified record, the callback will be called again.

To use with caution as it has a cost.

Like transaction, it can run multiple times, so limit your changes to the database.

Implementation

void addOnChangesListener(
    Database database, TransactionRecordChangeListener<K, V> onChanges) {
  (database as SembastDatabase).addOnChangesListener<K, V>(this, onChanges);
}