AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
Transaction< T > Class Template Reference

#include "Transaction.h"

Inheritance diagram for Transaction< T >:
TransactionBase

Public Member Functions

void Append (PreparedStatement< T > *statement)
 
void Append (std::string_view sql)
 
template<typename... Args>
void Append (std::string_view sql, Args &&... args)
 
- Public Member Functions inherited from TransactionBase
 TransactionBase ()=default
 
virtual ~TransactionBase ()
 
void Append (std::string_view sql)
 
template<typename... Args>
void Append (std::string_view sql, Args &&... args)
 
std::size_t GetSize () const
 

Additional Inherited Members

- Protected Member Functions inherited from TransactionBase
void AppendPreparedStatement (PreparedStatementBase *statement)
 
void Cleanup ()
 
- Protected Attributes inherited from TransactionBase
std::vector< SQLElementDatam_queries
 

Detailed Description

template<typename T>
class Transaction< T >

Member Function Documentation

◆ Append() [1/3]

template<typename T >
void Transaction< T >::Append ( PreparedStatement< T > *  statement)
inline
69 {
70 AppendPreparedStatement(statement);
71 }
void AppendPreparedStatement(PreparedStatementBase *statement)
Definition: Transaction.cpp:42

References TransactionBase::AppendPreparedStatement().

◆ Append() [2/3]

template<typename T >
void TransactionBase::Append ( std::string_view  sql)
34{
35 SQLElementData data = {};
36 data.type = SQL_ELEMENT_RAW;
37 data.element = std::string(sql);
38 m_queries.emplace_back(data);
39}
@ SQL_ELEMENT_RAW
Definition: SQLOperation.h:28
Definition: SQLOperation.h:34
std::variant< PreparedStatementBase *, std::string > element
Definition: SQLOperation.h:35
SQLElementDataType type
Definition: SQLOperation.h:36
std::vector< SQLElementData > m_queries
Definition: Transaction.h:56

References SQLElementData::element, TransactionBase::m_queries, SQL_ELEMENT_PREPARED, and SQLElementData::type.

◆ Append() [3/3]

template<typename T >
template<typename... Args>
void TransactionBase::Append ( std::string_view  sql,
Args &&...  args 
)
inline
47 {
48 Append(Acore::StringFormat(sql, std::forward<Args>(args)...));
49 }
std::string StringFormat(FormatString< Args... > fmt, Args &&... args)
Default AC string format function.
Definition: StringFormat.h:34
void Append(PreparedStatement< T > *statement)
Definition: Transaction.h:68