rollingback property

dynamic rollingback

A flag or a cause to indicate the access (aka., the transaction) shall be rolled back at the end.

By default, access rolls back only if an exception is thrown. To force it roll back, you can set this flag to true or a value other than false and null.

Note: access will still return the return value of the command function if a flag is set.

Note: if a value other than false and null is set, the callback passed to afterRollback will be called with this value.

Note: if null is assigned, false will be stored instead. In other words, it is never null. You can test if rollingback is set as follows:

if (access.rollingback != false)...

Implementation

get rollingback => _rollingback;
void rollingback=(dynamic rollingback)

Sets whether to roll back the access (aka., the transaction). *

  • Note: if null is assigned, false will be stored instead.

Implementation

set rollingback(rollingback) {
  _rollingback = rollingback ?? false;
}