The Purge built-in persistent class method physically deletes the most recently accessed class record from the database.
The Purge method physically deletes all access paths to the class record, similar to the behavior when the Maint built-in ispec attribute is set to "PUR". This is not a logical delete, such as when the Maint built-in ispec attribute is set to "DEL". |
This physical record deletion is performed immediately, (but not committed until end-of-transaction). Logically, for the user performing the purge, the purge takes effect immediately. For example, if a LookUp logic statement follows a Purge method invocation within the same transaction, the record is not found. For other users, the record is locked.
The Purge method permanently breaks all physical and logical relationships with the records on which it operates. The disk space that was occupied is immediately available for use by other records of the ispec, when the transaction is completed.
To release the disk space for other uses, run the Database Management Utility (DMU).
Restrictions
The Purge method is invalid in Edit methods of copy ispecs and copy events.
Syntax
<<persistent class>>::Purge(void) : void
Owner
Any persistent class.
Examples
LookUp Every Debt If Debt.Bal = 0 Debt.Purge() End End