Each object to be inserted, updated, or deleted is completely written to the database in a single transaction, so that the database won't be corrupted by object fragments if the operation fails. This safety measure can be extended to groups of objects.
Use the GROUP element to include more than one object in a single transaction with the database, so that the transaction will fail if any single insert, update, or delete within the group fails. Place GROUP before the first object to be included and END_GROUP after the last object. GROUP/END_GROUP pairs cannot be nested within each other, but can be used as many times as needed.
For example, when a case is created, the case record, condition record, activity log record, and time_bomb record must all be inserted, and the num_scheme table must be updated. This transaction should occur as a group, because if one of these objects fails to be inserted, the Clarify database would be corrupted by the missing data.
See Also |
Next |