Prophet::ChangeSet
This class represents a single, atomic Prophet database update. It tracks some metadata about the changeset itself and contains a list of Prophet::Change entries which describe the actual records created, updated and deleted.
Instantiate a new, empty Prophet::ChangeSet object.
A string representing who created this changeset.
A string representing the ISO 8601 date and time when this changeset was created (UTC).
The changeset's sequence number (in subversion terms, revision #) on the replica sending us the changeset.
The uuid of the replica sending us the change.
The uuid of the replica where the change was authored.
The changeset's sequence number (in subversion terms, revision #) on the replica where the change was originally created.
A boolean value specifying whether this is a nullification changeset or not.
A boolean value specifying whether this is a conflict resolution changeset or not.
Returns an array of all the changes in the current changeset.
Returns true if this changeset has any changes.
Adds a new change to this changeset.
Returns a reference to a representation of this changeset as a hash, containing all the properties in the package variable @SERIALIZE_PROPS, as well as a changes key containing hash representations of each change in the changeset, keyed on UUID.
@SERIALIZE_PROPS
changes
Takes a reference to a hash representation of a changeset (such as is returned by "as_hash" or serialized json) and returns a new Prophet::ChangeSet representation of it.
Should be invoked as a class method, not an object method.
For example: Prophet::ChangeSet->new_from_hashref($ref_to_changeset_hash)
Prophet::ChangeSet->new_from_hashref($ref_to_changeset_hash)
Returns a single string representing the changes in this changeset.
If $args{header_callback} is defined, the string returned from passing $self to the callback is prepended to the changeset string before it is returned (instead of "description_as_string").
$args{header_callback}
$self
If $args{skip_empty} is defined, an empty string is returned if the changeset contains no changes.
$args{skip_empty}
The argument change_filter can be used to filter certain changes from the string representation; the function is passed a change and should return false if that change should be skipped.
change_filter
The change_header argument, if present, is passed to $change->to_string when individual changes are converted to strings.
change_header
$change->to_string
Returns a string representing a description of this changeset.
To install Prophet, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Prophet
CPAN shell
perl -MCPAN -e shell install Prophet
For more information on module installation, please visit the detailed CPAN module installation guide.