Change Sets¶
Change sets represent a transition from one state of a model to another. There is no change set base class, rather change sets are a collection of attributes representing the state change.
However, there are several assisting classes around them.
Interfaces¶
-
class
flaskbb.core.changesets.
ChangeSetHandler
[source]¶ Used to apply a changeset to a model.
-
apply_changeset
(model, changeset)[source]¶ Receives the current model and the changeset object, apply the changeset to the model and persist the model. May raise a
StopValidation
if the changeset could not be applied.
-
-
class
flaskbb.core.changesets.
ChangeSetValidator
[source]¶ Used to validate a change set is valid to apply against a model
-
validate
(model, changeset)[source]¶ May raise a
ValidationError
to signify that the changeset cannot be applied to the model. Or aStopValidation
to immediately halt all validation.
-