Diff
const class Diff : Obj
Diff encapsulates a set of changes to apply to a record.
Make a Diff to add a new record into the database
Construct a modfication for an existing record
Flag bitmask for isAdd
Timestamp version of oldRec or null if adding new record
Original record or null if adding new record
Flag bitmask for isTransient
Bitmask meta-data for diff
Timestamp version of newRec or null
Flag bitmask for isForce
Target record id
Updated record which is null until after commit
Flag bitmask for isRemove
String representation
Get tag value from new record or null
Get tag value from old record or null
Flag indicating if remove an existing record from the project
Flag indicating if adding a new record to the project
Flag indicating that changes should be applied regardless of other concurrent changes which may be been applied after the oldRec version was read
Flag indicating that this diff should not be flushed to persistent storage (it may or may not be persisted)
Update diff - not an add nor a remove
const static Int : add
Flag bitmask for isAdd
const Dict : changes
const Int : flags
Bitmask meta-data for diff
const static Int : force
Flag bitmask for isForce
const static Int : forceTransient
Obj? getNew(Str tag)
Get tag value from new record or null.
Obj? getOld(Str tag)
Get tag value from old record or null.
const Ref : id
Target record id
Bool isAdd()
Flag indicating if adding a new record to the project
Bool isForce()
Flag indicating that changes should be applied regardless of other concurrent changes which may be been applied after the oldRec version was read.
Bool isRemove()
Flag indicating if remove an existing record from the project
Bool isTransient()
Flag indicating that this diff should not be flushed to persistent storage (it may or may not be persisted).
Bool isUpdate()
Update diff - not an add nor a remove
new make(Dict? oldRec, Obj? changes, Int flags)
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 None.val to indicate a tag should be removed. See makeAdd to create a Diff for adding a new record to a project.
new makeAdd(Obj? changes, Ref id)
Make a Diff to add a new record into the database.
const DateTime? : newMod
Timestamp version of newRec or null
const Dict? : newRec
Updated record which is null until after commit
const DateTime? : oldMod
Timestamp version of oldRec or null if adding new record
const Dict? : oldRec
Original record or null if adding new record
const static Int : remove
Flag bitmask for isRemove
virtual Str toStr()
String representation
const static Int : transient
Flag bitmask for isTransient