AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
AccountInfoQueryHolderPerRealm Class Reference
Inheritance diagram for AccountInfoQueryHolderPerRealm:
SQLQueryHolder< T > SQLQueryHolderBase

Public Types

enum  {
  GLOBAL_ACCOUNT_DATA = 0 ,
  TUTORIALS ,
  MAX_QUERIES
}
 

Public Member Functions

 AccountInfoQueryHolderPerRealm ()
 
bool Initialize (uint32 accountId)
 
- Public Member Functions inherited from SQLQueryHolder< T >
bool SetPreparedQuery (std::size_t index, PreparedStatement< T > *stmt)
 
- Public Member Functions inherited from SQLQueryHolderBase
 SQLQueryHolderBase ()=default
 
virtual ~SQLQueryHolderBase ()
 
void SetSize (std::size_t size)
 
PreparedQueryResult GetPreparedResult (std::size_t index) const
 
void SetPreparedResult (std::size_t index, PreparedResultSet *result)
 

Additional Inherited Members

- Protected Member Functions inherited from SQLQueryHolderBase
bool SetPreparedQueryImpl (std::size_t index, PreparedStatementBase *stmt)
 

Detailed Description

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
GLOBAL_ACCOUNT_DATA 
TUTORIALS 
MAX_QUERIES 
1634 {
1636 TUTORIALS,
1637
1639 };
@ MAX_QUERIES
Definition: WorldSession.cpp:1638
@ TUTORIALS
Definition: WorldSession.cpp:1636
@ GLOBAL_ACCOUNT_DATA
Definition: WorldSession.cpp:1635

Constructor & Destructor Documentation

◆ AccountInfoQueryHolderPerRealm()

AccountInfoQueryHolderPerRealm::AccountInfoQueryHolderPerRealm ( )
inline
1641{ SetSize(MAX_QUERIES); }
void SetSize(std::size_t size)
Definition: QueryHolder.cpp:69

Member Function Documentation

◆ Initialize()

bool AccountInfoQueryHolderPerRealm::Initialize ( uint32  accountId)
inline
1644 {
1645 bool ok = true;
1646
1648 stmt->SetData(0, accountId);
1649 ok = SetPreparedQuery(GLOBAL_ACCOUNT_DATA, stmt) && ok;
1650
1651 stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_TUTORIALS);
1652 stmt->SetData(0, accountId);
1653 ok = SetPreparedQuery(TUTORIALS, stmt) && ok;
1654
1655 return ok;
1656 }
@ CHAR_SEL_TUTORIALS
Definition: CharacterDatabase.h:205
@ CHAR_SEL_ACCOUNT_DATA
Definition: CharacterDatabase.h:198
DatabaseWorkerPool< CharacterDatabaseConnection > CharacterDatabase
Accessor to the character database.
Definition: DatabaseEnv.cpp:21
Definition: PreparedStatement.h:158
bool SetPreparedQuery(std::size_t index, PreparedStatement< T > *stmt)
Definition: QueryHolder.h:46
Acore::Types::is_default< T > SetData(const uint8 index, T value)
Definition: PreparedStatement.h:78

References CHAR_SEL_ACCOUNT_DATA, CHAR_SEL_TUTORIALS, CharacterDatabase, and PreparedStatementBase::SetData().