mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-05-05 02:07:46 +00:00
57 lines
990 B
C
57 lines
990 B
C
![]() |
#ifndef SAPPHIRE_STATEMENT_H
|
||
|
#define SAPPHIRE_STATEMENT_H
|
||
|
|
||
|
#include <stdint.h>
|
||
|
#include <string>
|
||
|
#include "StatementBase.h"
|
||
|
|
||
|
namespace Core
|
||
|
{
|
||
|
namespace Db
|
||
|
{
|
||
|
class Connection;
|
||
|
class ResultSet;
|
||
|
|
||
|
class Statement : public StatementBase
|
||
|
{
|
||
|
protected:
|
||
|
Connection * m_pConnection;
|
||
|
|
||
|
void doQuery( const std::string& q );
|
||
|
|
||
|
uint64_t m_lastUpdateCount;
|
||
|
|
||
|
unsigned int m_warningsCount;
|
||
|
|
||
|
public:
|
||
|
Statement( Connection* conn );
|
||
|
|
||
|
virtual ~Statement() {};
|
||
|
|
||
|
Connection * getConnection() override;
|
||
|
|
||
|
bool execute( const std::string& sql ) override;
|
||
|
|
||
|
ResultSet * executeQuery( const std::string& sql ) override;
|
||
|
|
||
|
ResultSet * getResultSet() override;
|
||
|
|
||
|
uint64_t getUpdateCount() override;
|
||
|
|
||
|
uint32_t getWarningCount() override;
|
||
|
|
||
|
uint32_t errNo() override;
|
||
|
|
||
|
private:
|
||
|
/* Prevent use of these */
|
||
|
Statement( const Statement& );
|
||
|
void operator=( Statement& );
|
||
|
};
|
||
|
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
#endif //SAPPHIRE_STATEMENT_H
|