ocilib::Event Class Reference

Subscription Event. More...

`#include <ocilib.hpp>`

Inherits ocilib::HandleHolder< OCI_Event *>.

## Public Types

enum | EventTypeValues { DatabaseStart = OCI_ENT_STARTUP, DatabaseShutdown = OCI_ENT_SHUTDOWN, DatabaseShutdownAny = OCI_ENT_SHUTDOWN_ANY, DatabaseDrop = OCI_ENT_DROP_DATABASE, Unregister = OCI_ENT_DEREGISTER, ObjectChanged = OCI_ENT_OBJECT_CHANGED }
| Event type enumerated values. More...
enum | ObjectEventValues { ObjectInserted = OCI_ONT_INSERT, ObjectUpdated = OCI_ONT_UPDATE, ObjectDeleted = OCI_ONT_DELETE, ObjectAltered = OCI_ONT_ALTER, ObjectDropped = OCI_ONT_DROP, ObjectGeneric = OCI_ONT_GENERIC }
| Object events enumerated values. More...
typedef Enum< EventTypeValues > | EventType
| Event type. More...
typedef Enum< ObjectEventValues > | ObjectEvent
| Object events. More...

## Public Member Functions

EventType | GetType () const
| Return the type of event reported by a notification.
ObjectEvent | GetObjectEvent () const
| Return the type of operation reported by a notification. More...
ostring | GetDatabaseName () const
| Return the name of the database that generated the event.
ostring | GetObjectName () const
| Return the name of the object that generated the event. More...
ostring | GetRowID () const
| Return the rowid of the altered database object row.
Subscription | GetSubscription () const
| Return the subscription that generated this event.

## Detailed Description

Subscription Event.

This class wraps the OCILIB object handle OCI_Event and its related methods

Warning
  Environment::Events flag must be passed to Environment::Initialize() to be able to use subscriptions

Definition at line 7093 of file ocilib.hpp.

## Member Typedef Documentation

## EventType

typedef Enum<EventTypeValues> ocilib::Event::EventType

Event type.

Possible values are Event::EventTypeValues

Definition at line 7128 of file ocilib.hpp.

## ObjectEvent

typedef Enum<ObjectEventValues> ocilib::Event::ObjectEvent

Object events.

Possible values are Event::ObjectEventValues

Definition at line 7158 of file ocilib.hpp.

## Member Enumeration Documentation

## EventTypeValues

enum ocilib::Event::EventTypeValues

Event type enumerated values.

Enumerator
DatabaseStart | A database has been started up
DatabaseShutdown | A database has been shut down
DatabaseShutdownAny | A database has been shut down (RAC)
DatabaseDrop | A database has been dropped
Unregister | The notification is timed out
ObjectChanged | A database object has been modified

Definition at line 7105 of file ocilib.hpp.

## ObjectEventValues

enum ocilib::Event::ObjectEventValues

Object events enumerated values.

Enumerator
ObjectInserted | An insert has been performed
ObjectUpdated | An update has been performed
ObjectDeleted | A delete has been performed
ObjectAltered | An alter has been performed
ObjectDropped | A drop has been performed
ObjectGeneric | Generic undefined action *

Definition at line 7135 of file ocilib.hpp.

## Member Function Documentation

## GetObjectEvent()

Event::ObjectEvent ocilib::Event::GetObjectEvent | ( |  | ) | const

inline

Return the type of operation reported by a notification.

Note
  This call is only valid when GetType() reports the event type Event::ObjectChanged

Definition at line 6537 of file ocilib_impl.hpp.

References ocilib::Check(), and OCI_EventGetOperation().

## GetObjectName()

ostring ocilib::Event::GetObjectName | ( |  | ) | const

inline

Return the name of the object that generated the event.

Note
  Database object name follows the pattern "[schema_name].object_name"

Definition at line 6547 of file ocilib_impl.hpp.

References ocilib::Check(), ocilib::MakeString(), and OCI_EventGetObject().