mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-18 03:15:41 +00:00
feat(Core/DBLayer): replace char const* to std::string_view (#10211)
* feat(Core/DBLayer): replace `char const*` to `std::string_view` * CString * 1 * chore(Core/Misc): code cleanup * cl * db fix * fmt style sql * to fmt * py * del old * 1 * 2 * 3 * 1 * 1
This commit is contained in:
@@ -20,13 +20,7 @@
|
||||
|
||||
#include "DatabaseEnvFwd.h"
|
||||
#include "Define.h"
|
||||
|
||||
//- Union that holds element data
|
||||
union SQLElementUnion
|
||||
{
|
||||
PreparedStatementBase* stmt;
|
||||
char const* query;
|
||||
};
|
||||
#include <variant>
|
||||
|
||||
//- Type specifier of our element data
|
||||
enum SQLElementDataType
|
||||
@@ -38,7 +32,7 @@ enum SQLElementDataType
|
||||
//- The element
|
||||
struct SQLElementData
|
||||
{
|
||||
SQLElementUnion element;
|
||||
std::variant<PreparedStatementBase*, std::string> element;
|
||||
SQLElementDataType type;
|
||||
};
|
||||
|
||||
@@ -55,6 +49,7 @@ public:
|
||||
Execute();
|
||||
return 0;
|
||||
}
|
||||
|
||||
virtual bool Execute() = 0;
|
||||
virtual void SetConnection(MySQLConnection* con) { m_conn = con; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user