deleteRandom Transaction Format

About deleteRandom Transaction Format

deleterandom transaction format deletes an object from the specified bottom class.

Syntax

deleteRandom class-name {
(field1) = "str1" fd
(field2) = "str2" fd
...
(fieldN) = "strN" fd
[objectPtr pointer-name {
class = class-name fd
(field1) = "str1" fd
(field2) = "str2" fd
...
(fieldN) = "strN" fd
}]
...
}

Explanation

deleteRandom class-name {
(field1) = "str1" fd
(field2) = "str2" fd
...
(fieldN) = "strN" fd
}

For class-name, specify the name of the class in which the object you want to delete is located. The field values indicate the primary keys, and/or any other keys that together uniquely identify a single object to be deleted.

[objectPtr pointer-name {
class = class-name fd
(field1) = "str1" fd
(field2) = "str2" fd
...
(fieldN) = "strN" fd}]
...
}

You can use one or more objectPtr statements to specify values for any pointers that are available for the specified class. Use these pointers to supply values for primary keys that are also pointers, or to attempt to identify a single object if you cannot supply the full primary key. The class name points to the class of the object. The fields that follow the objectPtr keyword indicate the primary keys pointing to the object.

Example

This example deletes the user named John from the User class. The user name uniquely identifies an object in the User class.

deleteRandom s_usr_class {
s_usr_name = "John";
}