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)

Definition at line 55 of file SqlOperations.h.

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

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)

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

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: