class

Diff

const class Diff : Obj

Diff encapsulates a set of changes to apply to a record.

constructors makeAdd

Make a Diff to add a new record into the database

make

Construct a modfication for an existing record

fields add

Flag bitmask for isAdd

oldMod

Timestamp version of oldRec or null if adding new record

oldRec

Original record or null if adding new record

transient

Flag bitmask for isTransient

changes

Changes applied to oldRec with resulting newRec

flags

Bitmask meta-data for diff

forceTransient

Flag bitmask for force and transient

newMod

Timestamp version of newRec or null

force

Flag bitmask for isForce

id

Target record id

newRec

Updated record which is null until after commit

remove

Flag bitmask for isRemove

methods toStr

String representation

getNew

Get tag value from new record or null

getOld

Get tag value from old record or null

isRemove

Flag indicating if remove an existing record from the project

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 oldRec version was read

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

add const static Int : add

Flag bitmask for isAdd

changes const Dict : changes

Changes applied to oldRec with resulting newRec

flags const Int : flags

Bitmask meta-data for diff

force const static Int : force

Flag bitmask for isForce

forceTransient const static Int : forceTransient

Flag bitmask for force and transient

getNew Obj? getNew(Str tag)

Get tag value from new record or null.

getOld Obj? getOld(Str tag)

Get tag value from old record or null.

id const Ref : id

Target record id

isAdd Bool isAdd()

Flag indicating if adding a new record to the project

isForce 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.

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)

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.

makeAdd new makeAdd(Obj? changes, Ref id)

Make a Diff to add a new record into the database.

newMod const DateTime? : newMod

Timestamp version of newRec or null

newRec const Dict? : newRec

Updated record which is null until after commit

oldMod const DateTime? : oldMod

Timestamp version of oldRec or null if adding new record

oldRec const Dict? : oldRec

Original record or null if adding new record

remove const static Int : remove

Flag bitmask for isRemove

toStr virtual Str toStr()

String representation

transient const static Int : transient

Flag bitmask for isTransient

Haxall 4.0.5 ∙ 24-Feb-2026 14:33 EST