1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-05-07 03:07:45 +00:00
sapphire/src/common/Database/Operation.h

42 lines
705 B
C
Raw Normal View History

#ifndef SAPPHIRE_OPERATION_H
#define SAPPHIRE_OPERATION_H
namespace Mysql
{
class Connection;
}
namespace Core
{
namespace Db
{
class DbConnection;
class PreparedStatement;
class Operation
{
public:
Operation() : m_pConn( nullptr ) { }
virtual ~Operation() { }
virtual int call()
{
execute();
return 0;
}
virtual bool execute() = 0;
virtual void setConnection( DbConnection* pCon ) { m_pConn = pCon; }
DbConnection* m_pConn;
private:
Operation( Operation const& right ) = delete;
Operation& operator=( Operation const& right ) = delete;
};
}
}
#endif //SAPPHIRE_OPERATION_H