Implicit within each event is an operation that is either insert, update, delete, upsert, or safedelete.
"insert" means insert a record. It's a run-time error if there is already a record present with those keys.
"update" means update a record. It's a run-time error if there is no record present with those keys.
"delete" means delete a record. It's a run-time error if there is no record present with those keys.
"upsert" means insert a record if no record is present with those keys and update otherwise. This avoids the potential run-time error with "insert" or "update."
"safedelete" means delete a record if one is already present with those keys and ignore otherwise. This avoids the potential run-time error with "delete."
[ integer k; | string data;] v; v := [k=9;|]; print('opcode=', string(getOpcode(v)), '\n'); setOpcode(v,safedelete); print('opcode=', string(getOpcode(v)), '\n');
The operations within record events are used in streams and event caches. This is described in more detail in subsequent topics.