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

#include "DBUpdater.h"

Public Types

using Path = std::filesystem::path
 

Public Member Functions

std::string GetConfigEntry ()
 
std::string GetTableName ()
 
std::string GetSourceDirectory ()
 
std::string GetBaseFilesDirectory ()
 
bool IsEnabled (uint32 const updateMask)
 
std::string GetDBModuleName ()
 
std::string GetConfigEntry ()
 
std::string GetTableName ()
 
std::string GetSourceDirectory ()
 
std::string GetBaseFilesDirectory ()
 
bool IsEnabled (uint32 const updateMask)
 
std::string GetDBModuleName ()
 
std::string GetConfigEntry ()
 
std::string GetTableName ()
 
std::string GetSourceDirectory ()
 
std::string GetBaseFilesDirectory ()
 
bool IsEnabled (uint32 const updateMask)
 
std::string GetDBModuleName ()
 

Static Public Member Functions

static std::string GetConfigEntry ()
 
static std::string GetTableName ()
 
static std::string GetSourceDirectory ()
 
static std::string GetBaseFilesDirectory ()
 
static bool IsEnabled (uint32 const updateMask)
 
static BaseLocation GetBaseLocationType ()
 
static bool Create (DatabaseWorkerPool< T > &pool)
 
static bool Update (DatabaseWorkerPool< T > &pool, std::string_view modulesList={})
 
static bool Update (DatabaseWorkerPool< T > &pool, std::vector< std::string > const *setDirectories)
 
static bool Populate (DatabaseWorkerPool< T > &pool)
 
static std::string GetDBModuleName ()
 

Static Private Member Functions

static DBUpdaterInfo GetUpdaterInfo ()
 

Detailed Description

template<class T>
class DBUpdater< T >

Member Typedef Documentation

◆ Path

template<class T >
using DBUpdater< T >::Path = std::filesystem::path

Member Function Documentation

◆ Create()

template<class T >
bool DBUpdater< T >::Create ( DatabaseWorkerPool< T > &  pool)
static
608{
609 DatabaseWorkerPoolAdapter<T> adapter(pool);
610 return CreateDatabase(adapter);
611}
Definition DatabaseWorkerPoolAdapter.h:26

◆ GetBaseFilesDirectory() [1/4]

std::string DBUpdater< LoginDatabaseConnection >::GetBaseFilesDirectory ( )
112{
113 return DBUpdater<LoginDatabaseConnection>::GetSourceDirectory() + "/data/sql/base/db_auth/";
114}
static std::string GetSourceDirectory()

References DBUpdater< T >::GetSourceDirectory().

◆ GetBaseFilesDirectory() [2/4]

std::string DBUpdater< WorldDatabaseConnection >::GetBaseFilesDirectory ( )
151{
152 return DBUpdater<WorldDatabaseConnection>::GetSourceDirectory() + "/data/sql/base/db_world/";
153}

References DBUpdater< T >::GetSourceDirectory().

◆ GetBaseFilesDirectory() [3/4]

std::string DBUpdater< CharacterDatabaseConnection >::GetBaseFilesDirectory ( )
190{
191 return DBUpdater<CharacterDatabaseConnection>::GetSourceDirectory() + "/data/sql/base/db_characters/";
192}

References DBUpdater< T >::GetSourceDirectory().

◆ GetBaseFilesDirectory() [4/4]

template<class T >
static std::string DBUpdater< T >::GetBaseFilesDirectory ( )
static

◆ GetBaseLocationType()

template<class T >
BaseLocation DBUpdater< T >::GetBaseLocationType ( )
static
211{
212 return LOCATION_REPOSITORY;
213}
@ LOCATION_REPOSITORY
Definition DBUpdater.h:52

References LOCATION_REPOSITORY.

◆ GetConfigEntry() [1/4]

std::string DBUpdater< LoginDatabaseConnection >::GetConfigEntry ( )
94{
95 return "Updates.Auth";
96}

◆ GetConfigEntry() [2/4]

std::string DBUpdater< WorldDatabaseConnection >::GetConfigEntry ( )
133{
134 return "Updates.World";
135}

◆ GetConfigEntry() [3/4]

std::string DBUpdater< CharacterDatabaseConnection >::GetConfigEntry ( )
172{
173 return "Updates.Character";
174}

◆ GetConfigEntry() [4/4]

template<class T >
static std::string DBUpdater< T >::GetConfigEntry ( )
inlinestatic

◆ GetDBModuleName() [1/4]

std::string DBUpdater< LoginDatabaseConnection >::GetDBModuleName ( )
125{
126 // must be lowercase
127 return "auth";
128}

◆ GetDBModuleName() [2/4]

std::string DBUpdater< WorldDatabaseConnection >::GetDBModuleName ( )
164{
165 // must be lowercase
166 return "world";
167}

◆ GetDBModuleName() [3/4]

std::string DBUpdater< CharacterDatabaseConnection >::GetDBModuleName ( )
203{
204 // must be lowercase
205 return "characters";
206}

◆ GetDBModuleName() [4/4]

template<class T >
static std::string DBUpdater< T >::GetDBModuleName ( )
static

◆ GetSourceDirectory() [1/4]

std::string DBUpdater< LoginDatabaseConnection >::GetSourceDirectory ( )
106{
108}
AC_COMMON_API std::string GetSourceDirectory()
Definition BuiltInConfig.cpp:42

References BuiltInConfig::GetSourceDirectory().

◆ GetSourceDirectory() [2/4]

std::string DBUpdater< WorldDatabaseConnection >::GetSourceDirectory ( )

◆ GetSourceDirectory() [3/4]

std::string DBUpdater< CharacterDatabaseConnection >::GetSourceDirectory ( )

◆ GetSourceDirectory() [4/4]

template<class T >
static std::string DBUpdater< T >::GetSourceDirectory ( )
static

◆ GetTableName() [1/4]

std::string DBUpdater< LoginDatabaseConnection >::GetTableName ( )
100{
101 return "Auth";
102}

◆ GetTableName() [2/4]

std::string DBUpdater< WorldDatabaseConnection >::GetTableName ( )
139{
140 return "World";
141}

◆ GetTableName() [3/4]

std::string DBUpdater< CharacterDatabaseConnection >::GetTableName ( )
178{
179 return "Character";
180}

◆ GetTableName() [4/4]

template<class T >
static std::string DBUpdater< T >::GetTableName ( )
inlinestatic

◆ GetUpdaterInfo()

template<class T >
DBUpdaterInfo DBUpdater< T >::GetUpdaterInfo ( )
staticprivate
602{
604}
static std::string GetTableName()
static std::string GetBaseFilesDirectory()
static std::string GetDBModuleName()

References GetTableName().

◆ IsEnabled() [1/4]

bool DBUpdater< LoginDatabaseConnection >::IsEnabled ( uint32 const  updateMask)
118{
119 // This way silences warnings under msvc
120 return (updateMask & DatabaseLoader::DATABASE_LOGIN) ? true : false;
121}
@ DATABASE_LOGIN
Definition DatabaseLoader.h:48

References DatabaseLoader::DATABASE_LOGIN.

◆ IsEnabled() [2/4]

bool DBUpdater< WorldDatabaseConnection >::IsEnabled ( uint32 const  updateMask)
157{
158 // This way silences warnings under msvc
159 return (updateMask & DatabaseLoader::DATABASE_WORLD) ? true : false;
160}
@ DATABASE_WORLD
Definition DatabaseLoader.h:50

References DatabaseLoader::DATABASE_WORLD.

◆ IsEnabled() [3/4]

bool DBUpdater< CharacterDatabaseConnection >::IsEnabled ( uint32 const  updateMask)
196{
197 // This way silences warnings under msvc
198 return (updateMask & DatabaseLoader::DATABASE_CHARACTER) ? true : false;
199}
@ DATABASE_CHARACTER
Definition DatabaseLoader.h:49

References DatabaseLoader::DATABASE_CHARACTER.

◆ IsEnabled() [4/4]

template<class T >
static bool DBUpdater< T >::IsEnabled ( uint32 const  updateMask)
static

◆ Populate()

template<class T >
bool DBUpdater< T >::Populate ( DatabaseWorkerPool< T > &  pool)
static
629{
630 DatabaseWorkerPoolAdapter<T> adapter(pool);
631 return PopulateDatabase(adapter, GetUpdaterInfo());
632}
static DBUpdaterInfo GetUpdaterInfo()
Definition DBUpdater.cpp:601

◆ Update() [1/2]

template<class T >
bool DBUpdater< T >::Update ( DatabaseWorkerPool< T > &  pool,
std::string_view  modulesList = {} 
)
static
615{
616 DatabaseWorkerPoolAdapter<T> adapter(pool);
617 return UpdateDatabase(adapter, GetUpdaterInfo(), modulesList);
618}

◆ Update() [2/2]

template<class T >
bool DBUpdater< T >::Update ( DatabaseWorkerPool< T > &  pool,
std::vector< std::string > const *  setDirectories 
)
static
622{
623 DatabaseWorkerPoolAdapter<T> adapter(pool);
624 return UpdateDatabase(adapter, GetUpdaterInfo(), setDirectories);
625}

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