type
constructors
make |
Construct a modfication for an existing record. |
---|---|
makeAdd |
Make a Diff to add a new record into the database. |
fields
add |
Flag bitmask for |
---|---|
changes | |
flags |
Bitmask meta-data for diff |
force |
Flag bitmask for |
forceTransient | |
id |
Target record id |
newMod |
Timestamp version of |
newRec |
Updated record which is null until after commit |
oldMod |
Timestamp version of |
oldRec |
Original record or null if adding new record |
remove |
Flag bitmask for |
transient |
Flag bitmask for |
methods
getNew |
Get tag value from new record or null. |
---|---|
getOld |
Get tag value from old record or null. |
isAdd |
Flag indicating if adding a new record to the project |
isForce |
Flag indicating that changes should be applied regardless of other concurrent changes which may be been applied after the |
isRemove |
Flag indicating if remove an existing record from the project |
isTransient |
Flag indicating that this diff should not be flushed to persistent storage (it may or may not be persisted). |
isUpdate |
Update diff - not an add nor a remove |
toStr |
String representation |
Slot Details
add
changes
flags
const Int flags
Bitmask meta-data for diff
force
forceTransient
getNew
getOld
id
const Ref id
Target record id
isAdd
Bool isAdd()
Flag indicating if adding a new record to the project
isForce
isRemove
Bool isRemove()
Flag indicating if remove an existing record from the project
isTransient
Bool isTransient()
Flag indicating that this diff should not be flushed to persistent storage (it may or may not be persisted).
isUpdate
Bool isUpdate()
Update diff - not an add nor a remove
make
new make(Dict? oldRec, Obj? changes, Int flags := 0)
Construct a modfication for an existing record. The oldRec should be the instance which was read from the project. Any tags to add/set/remove should be included in the changes dict. Use Remove.val
to indicate a tag should be removed. See makeAdd
to create a Diff for adding a new record to a project.
makeAdd
newMod
newRec
const Dict? newRec
Updated record which is null until after commit
oldMod
oldRec
const Dict? oldRec
Original record or null if adding new record
remove
toStr
virtual override Str toStr()
String representation
transient
const static Int transient := 4
Flag bitmask for isTransient