RegisterForEvent function

Synopsis
bool UltraLite_Connection_iface::RegisterForEvent(
  const ULValue & event_name,
  const ULValue & object_name,
  const ULValue & queue_name,
  bool register_not_unreg
)
Parameters
  • event_name   system or user-defined event to register for

  • object_name   object to which event applies (like table name)

  • queue_name   NULL means default connection queue

  • register_not_unreg   true to register, false to unregister

Remarks

Register or unregister (a queue) to receive notifications of an event.

If no queue name is supplied, the default connection queue is implied, and created if required. Certain system events allow specification of an object name to which the event applies. For example, the TableModified event can specify the table name. Unlike SendNotification function, only the specific queue registered will receive notifications of the event - other queues with the same name on different connections will not (unless they are also explicit registered).

The predefined system events are:

Returns

True if the registration succeeded, false if the queue or event does not exist.

  • TableModified - triggered when rows in a table are inserted, updated, or deleted. One notification is sent per request, no matter how many rows were affected by the request. The object_name parameter specifies the table to monitor. A value of "*" means all tables in the database. This event has a parameter named 'table_name' whose value is the name of the modified table.
  • Commit - triggered after any commit completes. This event has no parameters.
  • SyncComplete - triggered after synchronization completes. This event has no parameters.

See also