Event Types

The following eXtremeDB Event types are defined by enum MCO_EVENT_TYPE in mco.h:

 
    typedef enum MCO_EVENT_TYPE_E_
    {
        MCO_EVENT_NEW,         /* A new instance created */
        MCO_EVENT_UPDATE,      /* an existing instance was updated, applied to single field */
        MCO_EVENT_DELETE,      /* an existing instance was deleted */
        MCO_EVENT_DELETE_ALL,  /* delete_all operation was called for a class */
        MCO_EVENT_CHECKPOINT,  /* modifications applied to an instance were checked in */
        MCO_EVENT_CLASS_UPDATE /* an existing instance was updated, applied to any of the fields */
     
    } MCO_EVENT_TYPE;
     

 

MCO_EVENT_NEW

 

A new instance created

MCO_EVENT_UPDATE

 

An existing instance was updated, applied to single field

MCO_EVENT_DELETE

 

An existing instance was deleted

MCO_EVENT_DELETE_ALL

Delete_all operation was called for a class

MCO_EVENT_CHECKPOINT

Modifications applied to an instance were checked in

MCO_EVENT_CLASS_UPDATE

An existing instance was updated, applied to any of the fields

 

When an UPDATE event fires, the event handler will be called with a MCO_HANDLING_ORDER argument indicating whether the field or class content represents the object's state before or after the event. The possible values for MCO_HANDLING_ORDER are defined as follows in mco.h:

     
    typedef enum MCO_HANDLING_ORDER_E_
    {
        MCO_BEFORE_UPDATE, MCO_AFTER_UPDATE
     
    } MCO_HANDLING_ORDER;
     

 

MCO_BEFORE_UPDATE

The field or class content represents the object state before the update event.

MCO_AFTER_UPDATE

The field or class content represents the object state after the update event.