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

Public Member Functions

 HelloEvents (std::string name_arg)
void registerTableEventsDo (TableShare &table_share, EventObserverList &observers)
void registerSchemaEventsDo (const std::string &db, EventObserverList &observers)
void registerSessionEventsDo (Session &session, EventObserverList &observers)
bool observeEventDo (EventData &)
void enable ()
void disable ()
bool isEnabled () const
void setDatabasesOfInterest (const char *list)
const char * getDatabasesOfInterest ()
void setTablesOfInterest (const char *list)
const char * getTablesOfInterest ()
Public Member Functions inherited from drizzled::plugin::EventObserver
 EventObserver (std::string name_arg)
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

Private Member Functions

bool isDatabaseInteresting (const std::string &db_name)
bool isTableInteresting (const std::string &table_name)
bool isSessionInteresting (Session &)

Private Attributes

bool is_enabled
std::string db_list
std::string table_list

Additional Inherited Members

Public Types inherited from drizzled::plugin::EventObserver
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
Static Public Member Functions inherited from drizzled::plugin::EventObserver
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 31 of file hello_events.h.

Constructor & Destructor Documentation

◆ HelloEvents()

drizzled::plugin::HelloEvents::HelloEvents ( std::string name_arg)
inline

Definition at line 35 of file hello_events.h.

◆ ~HelloEvents()

HelloEvents::~HelloEvents ( )

Definition at line 197 of file hello_events.cc.

Member Function Documentation

◆ disable()

void drizzled::plugin::HelloEvents::disable ( )
inline

Definition at line 46 of file hello_events.h.

◆ enable()

void drizzled::plugin::HelloEvents::enable ( )
inline

Definition at line 45 of file hello_events.h.

◆ getDatabasesOfInterest()

const char * drizzled::plugin::HelloEvents::getDatabasesOfInterest ( )
inline

Definition at line 64 of file hello_events.h.

◆ getTablesOfInterest()

const char * drizzled::plugin::HelloEvents::getTablesOfInterest ( )
inline

Definition at line 90 of file hello_events.h.

◆ isDatabaseInteresting()

bool drizzled::plugin::HelloEvents::isDatabaseInteresting ( const std::string & db_name)
inlineprivate

Definition at line 70 of file hello_events.h.

◆ isEnabled()

bool drizzled::plugin::HelloEvents::isEnabled ( ) const
inline

Definition at line 47 of file hello_events.h.

◆ isSessionInteresting()

bool drizzled::plugin::HelloEvents::isSessionInteresting ( Session & )
inlineprivate

Definition at line 109 of file hello_events.h.

◆ isTableInteresting()

bool drizzled::plugin::HelloEvents::isTableInteresting ( const std::string & table_name)
inlineprivate

Definition at line 96 of file hello_events.h.

◆ observeEventDo()

bool HelloEvents::observeEventDo ( EventData & data)
virtual

Implements drizzled::plugin::EventObserver.

Definition at line 249 of file hello_events.cc.

◆ registerSchemaEventsDo()

void HelloEvents::registerSchemaEventsDo ( const std::string & db,
EventObserverList & observers )
virtual

Reimplemented from drizzled::plugin::EventObserver.

Definition at line 220 of file hello_events.cc.

◆ registerSessionEventsDo()

void HelloEvents::registerSessionEventsDo ( Session & session,
EventObserverList & observers )
virtual

Reimplemented from drizzled::plugin::EventObserver.

Definition at line 232 of file hello_events.cc.

◆ registerTableEventsDo()

void HelloEvents::registerTableEventsDo ( TableShare & table_share,
EventObserverList & observers )
virtual

Reimplemented from drizzled::plugin::EventObserver.

Definition at line 202 of file hello_events.cc.

◆ setDatabasesOfInterest()

void drizzled::plugin::HelloEvents::setDatabasesOfInterest ( const char * list)
inline

Definition at line 59 of file hello_events.h.

◆ setTablesOfInterest()

void drizzled::plugin::HelloEvents::setTablesOfInterest ( const char * list)
inline

Definition at line 85 of file hello_events.h.

Member Data Documentation

◆ db_list

std::string drizzled::plugin::HelloEvents::db_list
private

Definition at line 56 of file hello_events.h.

◆ is_enabled

bool drizzled::plugin::HelloEvents::is_enabled
private

Definition at line 54 of file hello_events.h.

◆ table_list

std::string drizzled::plugin::HelloEvents::table_list
private

Definition at line 82 of file hello_events.h.


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