Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
SQLOperation.h
Go to the documentation of this file.
1/*
2* This file is part of Project SkyFire https://www.projectskyfire.org.
3* See LICENSE.md file for Copyright information
4*/
5
6#ifndef _SQLOPERATION_H
7#define _SQLOPERATION_H
8
9#include "QueryResult.h"
10
11//- Forward declare (don't include header to prevent circular includes)
13
14//- Union that holds element data
16{
18 const char* query;
19};
20
21//- Type specifier of our element data
27
28//- The element
34
35//- For ambigious resultsets
41
42class MySQLConnection;
43
45{
46public:
47 SQLOperation() : m_conn(NULL) { }
48 virtual int call()
49 {
50 Execute();
51 return 0;
52 }
53 virtual bool Execute() = 0;
54 virtual void SetConnection(MySQLConnection* con) { m_conn = con; }
55 virtual ~SQLOperation() { }
56
57 MySQLConnection* m_conn;
58private:
59 SQLOperation(SQLOperation const& right) = delete;
60 SQLOperation& operator=(SQLOperation const& right) = delete;
61};
62
63#endif
SQLElementDataType
@ SQL_ELEMENT_RAW
@ SQL_ELEMENT_PREPARED
virtual void SetConnection(MySQLConnection *con)
SQLOperation(SQLOperation const &right)=delete
virtual ~SQLOperation()
SQLOperation & operator=(SQLOperation const &right)=delete
MySQLConnection * m_conn
virtual int call()
virtual bool Execute()=0
SQLElementUnion element
SQLElementDataType type
const char * query
PreparedStatement * stmt
PreparedResultSet * presult
ResultSet * qresult