OregonCore  revision 80751cf-git
Your Favourite TBC server
SqlStatement Class Reference

#include <SqlOperations.h>

+ Inheritance diagram for SqlStatement:

Public Member Functions

 SqlStatement (const char *sql)
 
 ~SqlStatement ()
 
void Execute (Database *db)
 
- Public Member Functions inherited from SqlOperation
virtual void OnRemove ()
 
virtual ~SqlOperation ()
 

Private Attributes

const char * m_sql
 

Detailed Description

Definition at line 50 of file SqlOperations.h.

Constructor & Destructor Documentation

SqlStatement::SqlStatement ( const char *  sql)
inline

Definition at line 55 of file SqlOperations.h.

55 : m_sql(strdup(sql)) {}
const char * m_sql
Definition: SqlOperations.h:53
SqlStatement::~SqlStatement ( )
inline

Definition at line 56 of file SqlOperations.h.

References SqlOperation::Execute().

57  {
58  void* tofree = const_cast<char*>(m_sql);
59  free(tofree);
60  }
const char * m_sql
Definition: SqlOperations.h:53

Member Function Documentation

void SqlStatement::Execute ( Database db)
virtual

Implements SqlOperation.

Definition at line 25 of file SqlOperations.cpp.

References Database::DirectExecute(), and m_sql.

26 {
27  // just do it
28  db->DirectExecute(m_sql);
29 }
bool bool DirectExecute(const char *sql)
Definition: Database.h:115
const char * m_sql
Definition: SqlOperations.h:53

Member Data Documentation

const char* SqlStatement::m_sql
private

Definition at line 53 of file SqlOperations.h.

Referenced by Execute(), and SqlQuery::Execute().


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