Skip to content

DML_Builder.DatabaseOperation ​

Class · Group: DML

Learn it: Fast Start - DML and DML guide

apex
global enum DML_Builder.DatabaseOperation

Enum to specify the type of DML operation for external use.


Inner Classes ​

ClassDescription
DML_DELETERemove records that already exist, found by their Id.
DML_INSERTCreate records that are not in the database yet.
DML_UNDELETEBring back records that were deleted, found by their Id.
DML_UPDATESave changes to records that already exist.
DML_UPSERTCreate each record that does not exist yet and update each one that does.

Value Details ​

DML_DELETE ​

apex
global DML_DELETE

Remove records that already exist, found by their Id. DML_UNDELETE can bring them back.

DML_INSERT ​

apex
global DML_INSERT

Create records that are not in the database yet.

DML_UNDELETE ​

apex
global DML_UNDELETE

Bring back records that were deleted, found by their Id.

DML_UPDATE ​

apex
global DML_UPDATE

Save changes to records that already exist. Each record is found by its Id.

DML_UPSERT ​

apex
global DML_UPSERT

Create each record that does not exist yet and update each one that does. Records are matched by Id, or by an external ID field when one is given.