AzeorthCore 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 (size_t index, PreparedStatement< T > *stmt)
 
- Public Member Functions inherited from SQLQueryHolderBase
 SQLQueryHolderBase ()=default
 
virtual ~SQLQueryHolderBase ()
 
void SetSize (size_t size)
 
PreparedQueryResult GetPreparedResult (size_t index) const
 
void SetPreparedResult (size_t index, PreparedResultSet *result)
 

Additional Inherited Members

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

Detailed Description

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
GLOBAL_ACCOUNT_DATA 
TUTORIALS 
MAX_QUERIES 
1630 {
1632 TUTORIALS,
1633
1635 };
@ MAX_QUERIES
Definition: WorldSession.cpp:1634
@ TUTORIALS
Definition: WorldSession.cpp:1632
@ GLOBAL_ACCOUNT_DATA
Definition: WorldSession.cpp:1631

Constructor & Destructor Documentation

◆ AccountInfoQueryHolderPerRealm()

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

Member Function Documentation

◆ Initialize()

bool AccountInfoQueryHolderPerRealm::Initialize ( uint32  accountId)
inline
1640 {
1641 bool ok = true;
1642
1644 stmt->SetData(0, accountId);
1645 ok = SetPreparedQuery(GLOBAL_ACCOUNT_DATA, stmt) && ok;
1646
1647 stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_TUTORIALS);
1648 stmt->SetData(0, accountId);
1649 ok = SetPreparedQuery(TUTORIALS, stmt) && ok;
1650
1651 return ok;
1652 }
DatabaseWorkerPool< CharacterDatabaseConnection > CharacterDatabase
Accessor to the character database.
Definition: DatabaseEnv.cpp:21
@ CHAR_SEL_TUTORIALS
Definition: CharacterDatabase.h:205
@ CHAR_SEL_ACCOUNT_DATA
Definition: CharacterDatabase.h:198
Definition: PreparedStatement.h:158
bool SetPreparedQuery(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().