TrinityCore
Loading...
Searching...
No Matches
PreparedStatementBase Class Reference

#include <PreparedStatement.h>

Public Member Functions

 PreparedStatementBase (uint32 index, uint8 capacity)
 
virtual ~PreparedStatementBase ()
 
void setNull (const uint8 index)
 
void setBool (const uint8 index, const bool value)
 
void setUInt8 (const uint8 index, const uint8 value)
 
void setUInt16 (const uint8 index, const uint16 value)
 
void setUInt32 (const uint8 index, const uint32 value)
 
void setUInt64 (const uint8 index, const uint64 value)
 
void setInt8 (const uint8 index, const int8 value)
 
void setInt16 (const uint8 index, const int16 value)
 
void setInt32 (const uint8 index, const int32 value)
 
void setInt64 (const uint8 index, const int64 value)
 
void setFloat (const uint8 index, const float value)
 
void setDouble (const uint8 index, const double value)
 
void setString (const uint8 index, const std::string &value)
 
void setStringView (const uint8 index, const std::string_view value)
 
void setBinary (const uint8 index, const std::vector< uint8 > &value)
 
template<size_t Size>
void setBinary (const uint8 index, std::array< uint8, Size > const &value)
 
uint32 GetIndex () const
 
std::vector< PreparedStatementData > const & GetParameters () const
 

Protected Member Functions

 PreparedStatementBase (PreparedStatementBase const &right)=delete
 
PreparedStatementBaseoperator= (PreparedStatementBase const &right)=delete
 

Protected Attributes

uint32 m_index
 
std::vector< PreparedStatementDatastatement_data
 

Friends

class PreparedStatementTask
 

Constructor & Destructor Documentation

◆ PreparedStatementBase() [1/2]

PreparedStatementBase::PreparedStatementBase ( uint32  index,
uint8  capacity 
)
explicit
24 :
25 m_index(index), statement_data(capacity) { }
uint32 m_index
Definition: PreparedStatement.h:92
std::vector< PreparedStatementData > statement_data
Definition: PreparedStatement.h:95

◆ ~PreparedStatementBase()

PreparedStatementBase::~PreparedStatementBase ( )
virtual
27{ }

◆ PreparedStatementBase() [2/2]

PreparedStatementBase::PreparedStatementBase ( PreparedStatementBase const &  right)
protecteddelete

Member Function Documentation

◆ GetIndex()

uint32 PreparedStatementBase::GetIndex ( ) const
inline
88{ return m_index; }
+ Here is the caller graph for this function:

◆ GetParameters()

std::vector< PreparedStatementData > const & PreparedStatementBase::GetParameters ( ) const
inline
89{ return statement_data; }
+ Here is the caller graph for this function:

◆ operator=()

PreparedStatementBase & PreparedStatementBase::operator= ( PreparedStatementBase const &  right)
protecteddelete

◆ setBinary() [1/2]

void PreparedStatementBase::setBinary ( const uint8  index,
const std::vector< uint8 > &  value 
)
109{
110 ASSERT(index < statement_data.size());
111 statement_data[index].data = value;
112}
#define ASSERT
Definition: Errors.h:68
+ Here is the caller graph for this function:

◆ setBinary() [2/2]

template<size_t Size>
void PreparedStatementBase::setBinary ( const uint8  index,
std::array< uint8, Size > const &  value 
)
inline
83 {
84 std::vector<uint8> vec(value.begin(), value.end());
85 setBinary(index, vec);
86 }
void setBinary(const uint8 index, const std::vector< uint8 > &value)
Definition: PreparedStatement.cpp:108

◆ setBool()

void PreparedStatementBase::setBool ( const uint8  index,
const bool  value 
)
31{
32 ASSERT(index < statement_data.size());
33 statement_data[index].data = value;
34}
+ Here is the caller graph for this function:

◆ setDouble()

void PreparedStatementBase::setDouble ( const uint8  index,
const double  value 
)
91{
92 ASSERT(index < statement_data.size());
93 statement_data[index].data = value;
94}

◆ setFloat()

void PreparedStatementBase::setFloat ( const uint8  index,
const float  value 
)
85{
86 ASSERT(index < statement_data.size());
87 statement_data[index].data = value;
88}
+ Here is the caller graph for this function:

◆ setInt16()

void PreparedStatementBase::setInt16 ( const uint8  index,
const int16  value 
)
67{
68 ASSERT(index < statement_data.size());
69 statement_data[index].data = value;
70}
+ Here is the caller graph for this function:

◆ setInt32()

void PreparedStatementBase::setInt32 ( const uint8  index,
const int32  value 
)
73{
74 ASSERT(index < statement_data.size());
75 statement_data[index].data = value;
76}
+ Here is the caller graph for this function:

◆ setInt64()

void PreparedStatementBase::setInt64 ( const uint8  index,
const int64  value 
)
79{
80 ASSERT(index < statement_data.size());
81 statement_data[index].data = value;
82}
+ Here is the caller graph for this function:

◆ setInt8()

void PreparedStatementBase::setInt8 ( const uint8  index,
const int8  value 
)
61{
62 ASSERT(index < statement_data.size());
63 statement_data[index].data = value;
64}
+ Here is the caller graph for this function:

◆ setNull()

void PreparedStatementBase::setNull ( const uint8  index)
115{
116 ASSERT(index < statement_data.size());
117 statement_data[index].data = nullptr;
118}
+ Here is the caller graph for this function:

◆ setString()

void PreparedStatementBase::setString ( const uint8  index,
const std::string &  value 
)
97{
98 ASSERT(index < statement_data.size());
99 statement_data[index].data = value;
100}
+ Here is the caller graph for this function:

◆ setStringView()

void PreparedStatementBase::setStringView ( const uint8  index,
const std::string_view  value 
)
103{
104 ASSERT(index < statement_data.size());
105 statement_data[index].data.emplace<std::string>(value);
106}
+ Here is the caller graph for this function:

◆ setUInt16()

void PreparedStatementBase::setUInt16 ( const uint8  index,
const uint16  value 
)
43{
44 ASSERT(index < statement_data.size());
45 statement_data[index].data = value;
46}
+ Here is the caller graph for this function:

◆ setUInt32()

void PreparedStatementBase::setUInt32 ( const uint8  index,
const uint32  value 
)
49{
50 ASSERT(index < statement_data.size());
51 statement_data[index].data = value;
52}

◆ setUInt64()

void PreparedStatementBase::setUInt64 ( const uint8  index,
const uint64  value 
)
55{
56 ASSERT(index < statement_data.size());
57 statement_data[index].data = value;
58}

◆ setUInt8()

void PreparedStatementBase::setUInt8 ( const uint8  index,
const uint8  value 
)
37{
38 ASSERT(index < statement_data.size());
39 statement_data[index].data = value;
40}
+ Here is the caller graph for this function:

Friends And Related Function Documentation

◆ PreparedStatementTask

friend class PreparedStatementTask
friend

Member Data Documentation

◆ m_index

uint32 PreparedStatementBase::m_index
protected

◆ statement_data

std::vector<PreparedStatementData> PreparedStatementBase::statement_data
protected

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