drizzle
C++ MySQL-protocol-compatible database server
Loading...
Searching...
No Matches
drizzled::plugin::EventObserver Class Referenceabstract
Inheritance diagram for drizzled::plugin::EventObserver:
[legend]
Collaboration diagram for drizzled::plugin::EventObserver:
[legend]

Public Types

enum  EventType {
  BEFORE_CREATE_DATABASE , AFTER_CREATE_DATABASE , BEFORE_DROP_DATABASE , AFTER_DROP_DATABASE ,
  CONNECT_SESSION , DISCONNECT_SESSION , AFTER_STATEMENT , BEFORE_STATEMENT ,
  BEFORE_DROP_TABLE , AFTER_DROP_TABLE , BEFORE_RENAME_TABLE , AFTER_RENAME_TABLE ,
  BEFORE_INSERT_RECORD , AFTER_INSERT_RECORD , BEFORE_UPDATE_RECORD , AFTER_UPDATE_RECORD ,
  BEFORE_DELETE_RECORD , AFTER_DELETE_RECORD , MAX_EVENT_COUNT
}
Public Types inherited from drizzled::plugin::Plugin
typedef std::pair< const std::string, const std::string > map_key
typedef std::unique_ptr< plugin::Plugin, deleter_fn > owned_ptr
typedef std::map< const map_key, owned_ptr > map
typedef std::vector< Plugin * > vector

Public Member Functions

 EventObserver (std::string name_arg)
virtual void registerTableEventsDo (TableShare &, EventObserverList &)
virtual void registerSchemaEventsDo (const std::string &, EventObserverList &)
virtual void registerSessionEventsDo (Session &, EventObserverList &)
virtual bool observeEventDo (EventData &)=0
void registerEvent (EventObserverList &observers, EventType event, int32_t position=0)
Public Member Functions inherited from drizzled::plugin::Plugin
 Plugin (const std::string &name, const std::string &type_name)
virtual void shutdownPlugin ()
virtual void prime ()
virtual void startup (drizzled::Session &)
void activate ()
void deactivate ()
bool isActive () const
const std::string & getName () const
void setModule (module::Module *module)
const std::string & getTypeName () const
virtual bool removeLast () const
const std::string & getModuleName () const

Static Public Member Functions

static const char * eventName (EventType event)
static bool addPlugin (EventObserver &handler)
static void removePlugin (EventObserver &handler)
static void registerTableEvents (TableShare &table_share)
static void deregisterTableEvents (TableShare &table_share)
static void registerSchemaEvents (Session &session, const std::string &db)
static void deregisterSchemaEvents (EventObserverList *observers)
static void registerSessionEvents (Session &session)
static void deregisterSessionEvents (EventObserverList *observers)
static bool beforeDropTable (Session &session, const drizzled::identifier::Table &table)
static bool afterDropTable (Session &session, const drizzled::identifier::Table &table, int err)
static bool beforeRenameTable (Session &session, const drizzled::identifier::Table &from, const drizzled::identifier::Table &to)
static bool afterRenameTable (Session &session, const drizzled::identifier::Table &from, const drizzled::identifier::Table &to, int err)
static bool connectSession (Session &session)
static bool disconnectSession (Session &session)
static bool beforeStatement (Session &session)
static bool afterStatement (Session &session)
static bool beforeInsertRecord (Table &table, unsigned char *buf)
static bool afterInsertRecord (Table &table, const unsigned char *buf, int err)
static bool beforeDeleteRecord (Table &table, const unsigned char *buf)
static bool afterDeleteRecord (Table &table, const unsigned char *buf, int err)
static bool beforeUpdateRecord (Table &table, const unsigned char *old_data, unsigned char *new_data)
static bool afterUpdateRecord (Table &table, const unsigned char *old_data, unsigned char *new_data, int err)
static bool beforeCreateDatabase (Session &session, const std::string &db)
static bool afterCreateDatabase (Session &session, const std::string &db, int err)
static bool beforeDropDatabase (Session &session, const std::string &db)
static bool afterDropDatabase (Session &session, const std::string &db, int err)
static const EventObserverVector & getEventObservers (void)

Detailed Description

Definition at line 57 of file event_observer.h.

Member Enumeration Documentation

◆ EventType

enum drizzled::plugin::EventObserver::EventType

Definition at line 64 of file event_observer.h.

Constructor & Destructor Documentation

◆ EventObserver()

drizzled::plugin::EventObserver::EventObserver ( std::string name_arg)
inlineexplicit

Definition at line 60 of file event_observer.h.

Member Function Documentation

◆ addPlugin()

bool drizzled::plugin::EventObserver::addPlugin ( EventObserver & handler)
static

Definition at line 47 of file event_observer.cc.

◆ afterCreateDatabase()

bool drizzled::plugin::EventObserver::afterCreateDatabase ( Session & session,
const std::string & db,
int err )
static

Definition at line 536 of file event_observer.cc.

◆ afterDeleteRecord()

bool drizzled::plugin::EventObserver::afterDeleteRecord ( Table & table,
const unsigned char * buf,
int err )
static

Definition at line 494 of file event_observer.cc.

◆ afterDropDatabase()

bool drizzled::plugin::EventObserver::afterDropDatabase ( Session & session,
const std::string & db,
int err )
static

Definition at line 554 of file event_observer.cc.

◆ afterDropTable()

bool drizzled::plugin::EventObserver::afterDropTable ( Session & session,
const drizzled::identifier::Table & table,
int err )
static

Definition at line 434 of file event_observer.cc.

◆ afterInsertRecord()

bool drizzled::plugin::EventObserver::afterInsertRecord ( Table & table,
const unsigned char * buf,
int err )
static

Definition at line 476 of file event_observer.cc.

◆ afterRenameTable()

bool drizzled::plugin::EventObserver::afterRenameTable ( Session & session,
const drizzled::identifier::Table & from,
const drizzled::identifier::Table & to,
int err )
static

Definition at line 452 of file event_observer.cc.

◆ afterStatement()

bool drizzled::plugin::EventObserver::afterStatement ( Session & session)
static

Definition at line 590 of file event_observer.cc.

◆ afterUpdateRecord()

bool drizzled::plugin::EventObserver::afterUpdateRecord ( Table & table,
const unsigned char * old_data,
unsigned char * new_data,
int err )
static

Definition at line 512 of file event_observer.cc.

◆ beforeCreateDatabase()

bool drizzled::plugin::EventObserver::beforeCreateDatabase ( Session & session,
const std::string & db )
static

Definition at line 527 of file event_observer.cc.

◆ beforeDeleteRecord()

bool drizzled::plugin::EventObserver::beforeDeleteRecord ( Table & table,
const unsigned char * buf )
static

Definition at line 485 of file event_observer.cc.

◆ beforeDropDatabase()

bool drizzled::plugin::EventObserver::beforeDropDatabase ( Session & session,
const std::string & db )
static

Definition at line 545 of file event_observer.cc.

◆ beforeDropTable()

bool drizzled::plugin::EventObserver::beforeDropTable ( Session & session,
const drizzled::identifier::Table & table )
static

Definition at line 425 of file event_observer.cc.

◆ beforeInsertRecord()

bool drizzled::plugin::EventObserver::beforeInsertRecord ( Table & table,
unsigned char * buf )
static

Definition at line 467 of file event_observer.cc.

◆ beforeRenameTable()

bool drizzled::plugin::EventObserver::beforeRenameTable ( Session & session,
const drizzled::identifier::Table & from,
const drizzled::identifier::Table & to )
static

Definition at line 443 of file event_observer.cc.

◆ beforeStatement()

bool drizzled::plugin::EventObserver::beforeStatement ( Session & session)
static

Definition at line 581 of file event_observer.cc.

◆ beforeUpdateRecord()

bool drizzled::plugin::EventObserver::beforeUpdateRecord ( Table & table,
const unsigned char * old_data,
unsigned char * new_data )
static

Definition at line 503 of file event_observer.cc.

◆ connectSession()

bool drizzled::plugin::EventObserver::connectSession ( Session & session)
static

Definition at line 563 of file event_observer.cc.

◆ deregisterSchemaEvents()

void drizzled::plugin::EventObserver::deregisterSchemaEvents ( EventObserverList * observers)
static

Definition at line 263 of file event_observer.cc.

◆ deregisterSessionEvents()

void drizzled::plugin::EventObserver::deregisterSessionEvents ( EventObserverList * observers)
static

Definition at line 319 of file event_observer.cc.

◆ deregisterTableEvents()

void drizzled::plugin::EventObserver::deregisterTableEvents ( TableShare & table_share)
static

Definition at line 205 of file event_observer.cc.

◆ disconnectSession()

bool drizzled::plugin::EventObserver::disconnectSession ( Session & session)
static

Definition at line 572 of file event_observer.cc.

◆ eventName()

const char * drizzled::plugin::EventObserver::eventName ( EventType event)
inlinestatic

Definition at line 86 of file event_observer.h.

◆ getEventObservers()

const EventObserverVector & drizzled::plugin::EventObserver::getEventObservers ( void )
static

Definition at line 42 of file event_observer.cc.

◆ registerEvent()

void drizzled::plugin::EventObserver::registerEvent ( EventObserverList & observers,
EventType event,
int32_t position = 0 )

Definition at line 145 of file event_observer.cc.

◆ registerSchemaEvents()

void drizzled::plugin::EventObserver::registerSchemaEvents ( Session & session,
const std::string & db )
static

Definition at line 248 of file event_observer.cc.

◆ registerSchemaEventsDo()

virtual void drizzled::plugin::EventObserver::registerSchemaEventsDo ( const std::string & ,
EventObserverList &  )
inlinevirtual

Definition at line 156 of file event_observer.h.

◆ registerSessionEvents()

void drizzled::plugin::EventObserver::registerSessionEvents ( Session & session)
static

Definition at line 294 of file event_observer.cc.

◆ registerSessionEventsDo()

virtual void drizzled::plugin::EventObserver::registerSessionEventsDo ( Session & ,
EventObserverList &  )
inlinevirtual

Definition at line 157 of file event_observer.h.

◆ registerTableEvents()

void drizzled::plugin::EventObserver::registerTableEvents ( TableShare & table_share)
static

Definition at line 177 of file event_observer.cc.

◆ registerTableEventsDo()

virtual void drizzled::plugin::EventObserver::registerTableEventsDo ( TableShare & ,
EventObserverList &  )
inlinevirtual

Definition at line 155 of file event_observer.h.

◆ removePlugin()

void drizzled::plugin::EventObserver::removePlugin ( EventObserver & handler)
static

Definition at line 53 of file event_observer.cc.


The documentation for this class was generated from the following files: