mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-31 13:16:39 +00:00
[Strings] Refactor Strings Usage (#2305)
* Initial commit checkpoint * More functions converted * Commify * More functions * Fin * Sort declarations * Split functions between files * Bots * Update strings.h * Split * Revert find replaces * Repository template * Money * Misc function * Update CMakeLists.txt * Saylink * Update strings.cpp * Swap Strings::Saylink for Saylink::Create since saylink is coupled to zone database * API casings
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
#define EQEMU_AA_ABILITY_REPOSITORY_H
|
||||
|
||||
#include "../database.h"
|
||||
#include "../string_util.h"
|
||||
#include "../strings.h"
|
||||
#include "base/base_aa_ability_repository.h"
|
||||
|
||||
class AaAbilityRepository: public BaseAaAbilityRepository {
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#define EQEMU_AA_RANK_EFFECTS_REPOSITORY_H
|
||||
|
||||
#include "../database.h"
|
||||
#include "../string_util.h"
|
||||
#include "../strings.h"
|
||||
#include "base/base_aa_rank_effects_repository.h"
|
||||
|
||||
class AaRankEffectsRepository: public BaseAaRankEffectsRepository {
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#define EQEMU_AA_RANK_PREREQS_REPOSITORY_H
|
||||
|
||||
#include "../database.h"
|
||||
#include "../string_util.h"
|
||||
#include "../strings.h"
|
||||
#include "base/base_aa_rank_prereqs_repository.h"
|
||||
|
||||
class AaRankPrereqsRepository: public BaseAaRankPrereqsRepository {
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#define EQEMU_AA_RANKS_REPOSITORY_H
|
||||
|
||||
#include "../database.h"
|
||||
#include "../string_util.h"
|
||||
#include "../strings.h"
|
||||
#include "base/base_aa_ranks_repository.h"
|
||||
|
||||
class AaRanksRepository: public BaseAaRanksRepository {
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#define EQEMU_ACCOUNT_FLAGS_REPOSITORY_H
|
||||
|
||||
#include "../database.h"
|
||||
#include "../string_util.h"
|
||||
#include "../strings.h"
|
||||
#include "base/base_account_flags_repository.h"
|
||||
|
||||
class AccountFlagsRepository: public BaseAccountFlagsRepository {
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#define EQEMU_ACCOUNT_IP_REPOSITORY_H
|
||||
|
||||
#include "../database.h"
|
||||
#include "../string_util.h"
|
||||
#include "../strings.h"
|
||||
#include "base/base_account_ip_repository.h"
|
||||
|
||||
class AccountIpRepository: public BaseAccountIpRepository {
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#define EQEMU_ACCOUNT_REPOSITORY_H
|
||||
|
||||
#include "../database.h"
|
||||
#include "../string_util.h"
|
||||
#include "../strings.h"
|
||||
#include "base/base_account_repository.h"
|
||||
|
||||
class AccountRepository: public BaseAccountRepository {
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#define EQEMU_ACCOUNT_REWARDS_REPOSITORY_H
|
||||
|
||||
#include "../database.h"
|
||||
#include "../string_util.h"
|
||||
#include "../strings.h"
|
||||
#include "base/base_account_rewards_repository.h"
|
||||
|
||||
class AccountRewardsRepository: public BaseAccountRewardsRepository {
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#define EQEMU_ADVENTURE_DETAILS_REPOSITORY_H
|
||||
|
||||
#include "../database.h"
|
||||
#include "../string_util.h"
|
||||
#include "../strings.h"
|
||||
#include "base/base_adventure_details_repository.h"
|
||||
|
||||
class AdventureDetailsRepository: public BaseAdventureDetailsRepository {
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#define EQEMU_ADVENTURE_MEMBERS_REPOSITORY_H
|
||||
|
||||
#include "../database.h"
|
||||
#include "../string_util.h"
|
||||
#include "../strings.h"
|
||||
#include "base/base_adventure_members_repository.h"
|
||||
|
||||
class AdventureMembersRepository: public BaseAdventureMembersRepository {
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#define EQEMU_ADVENTURE_STATS_REPOSITORY_H
|
||||
|
||||
#include "../database.h"
|
||||
#include "../string_util.h"
|
||||
#include "../strings.h"
|
||||
#include "base/base_adventure_stats_repository.h"
|
||||
|
||||
class AdventureStatsRepository: public BaseAdventureStatsRepository {
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#define EQEMU_ADVENTURE_TEMPLATE_ENTRY_FLAVOR_REPOSITORY_H
|
||||
|
||||
#include "../database.h"
|
||||
#include "../string_util.h"
|
||||
#include "../strings.h"
|
||||
#include "base/base_adventure_template_entry_flavor_repository.h"
|
||||
|
||||
class AdventureTemplateEntryFlavorRepository: public BaseAdventureTemplateEntryFlavorRepository {
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#define EQEMU_ADVENTURE_TEMPLATE_ENTRY_REPOSITORY_H
|
||||
|
||||
#include "../database.h"
|
||||
#include "../string_util.h"
|
||||
#include "../strings.h"
|
||||
#include "base/base_adventure_template_entry_repository.h"
|
||||
|
||||
class AdventureTemplateEntryRepository: public BaseAdventureTemplateEntryRepository {
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#define EQEMU_ADVENTURE_TEMPLATE_REPOSITORY_H
|
||||
|
||||
#include "../database.h"
|
||||
#include "../string_util.h"
|
||||
#include "../strings.h"
|
||||
#include "base/base_adventure_template_repository.h"
|
||||
|
||||
class AdventureTemplateRepository: public BaseAdventureTemplateRepository {
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#define EQEMU_ALTERNATE_CURRENCY_REPOSITORY_H
|
||||
|
||||
#include "../database.h"
|
||||
#include "../string_util.h"
|
||||
#include "../strings.h"
|
||||
#include "base/base_alternate_currency_repository.h"
|
||||
|
||||
class AlternateCurrencyRepository: public BaseAlternateCurrencyRepository {
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#define EQEMU_AURAS_REPOSITORY_H
|
||||
|
||||
#include "../database.h"
|
||||
#include "../string_util.h"
|
||||
#include "../strings.h"
|
||||
#include "base/base_auras_repository.h"
|
||||
|
||||
class AurasRepository: public BaseAurasRepository {
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_AA_ABILITY_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseAaAbilityRepository {
|
||||
@@ -82,12 +82,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -214,7 +214,7 @@ public:
|
||||
auto columns = Columns();
|
||||
|
||||
update_values.push_back(columns[0] + " = " + std::to_string(aa_ability_entry.id));
|
||||
update_values.push_back(columns[1] + " = '" + EscapeString(aa_ability_entry.name) + "'");
|
||||
update_values.push_back(columns[1] + " = '" + Strings::Escape(aa_ability_entry.name) + "'");
|
||||
update_values.push_back(columns[2] + " = " + std::to_string(aa_ability_entry.category));
|
||||
update_values.push_back(columns[3] + " = " + std::to_string(aa_ability_entry.classes));
|
||||
update_values.push_back(columns[4] + " = " + std::to_string(aa_ability_entry.races));
|
||||
@@ -232,7 +232,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
aa_ability_entry.id
|
||||
)
|
||||
@@ -249,7 +249,7 @@ public:
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
insert_values.push_back(std::to_string(aa_ability_entry.id));
|
||||
insert_values.push_back("'" + EscapeString(aa_ability_entry.name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(aa_ability_entry.name) + "'");
|
||||
insert_values.push_back(std::to_string(aa_ability_entry.category));
|
||||
insert_values.push_back(std::to_string(aa_ability_entry.classes));
|
||||
insert_values.push_back(std::to_string(aa_ability_entry.races));
|
||||
@@ -267,7 +267,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -292,7 +292,7 @@ public:
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
insert_values.push_back(std::to_string(aa_ability_entry.id));
|
||||
insert_values.push_back("'" + EscapeString(aa_ability_entry.name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(aa_ability_entry.name) + "'");
|
||||
insert_values.push_back(std::to_string(aa_ability_entry.category));
|
||||
insert_values.push_back(std::to_string(aa_ability_entry.classes));
|
||||
insert_values.push_back(std::to_string(aa_ability_entry.races));
|
||||
@@ -306,7 +306,7 @@ public:
|
||||
insert_values.push_back(std::to_string(aa_ability_entry.enabled));
|
||||
insert_values.push_back(std::to_string(aa_ability_entry.reset_on_death));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -315,7 +315,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_AA_RANK_EFFECTS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseAaRankEffectsRepository {
|
||||
@@ -55,12 +55,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -178,7 +178,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
aa_rank_effects_entry.rank_id
|
||||
)
|
||||
@@ -204,7 +204,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -234,7 +234,7 @@ public:
|
||||
insert_values.push_back(std::to_string(aa_rank_effects_entry.base1));
|
||||
insert_values.push_back(std::to_string(aa_rank_effects_entry.base2));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -243,7 +243,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_AA_RANK_PREREQS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseAaRankPrereqsRepository {
|
||||
@@ -49,12 +49,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -166,7 +166,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
aa_rank_prereqs_entry.rank_id
|
||||
)
|
||||
@@ -190,7 +190,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -218,7 +218,7 @@ public:
|
||||
insert_values.push_back(std::to_string(aa_rank_prereqs_entry.aa_id));
|
||||
insert_values.push_back(std::to_string(aa_rank_prereqs_entry.points));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -227,7 +227,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_AA_RANKS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseAaRanksRepository {
|
||||
@@ -79,12 +79,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -226,7 +226,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
aa_ranks_entry.id
|
||||
)
|
||||
@@ -260,7 +260,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -298,7 +298,7 @@ public:
|
||||
insert_values.push_back(std::to_string(aa_ranks_entry.prev_id));
|
||||
insert_values.push_back(std::to_string(aa_ranks_entry.next_id));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -307,7 +307,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_ACCOUNT_FLAGS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseAccountFlagsRepository {
|
||||
@@ -49,12 +49,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -159,14 +159,14 @@ public:
|
||||
auto columns = Columns();
|
||||
|
||||
update_values.push_back(columns[0] + " = " + std::to_string(account_flags_entry.p_accid));
|
||||
update_values.push_back(columns[1] + " = '" + EscapeString(account_flags_entry.p_flag) + "'");
|
||||
update_values.push_back(columns[2] + " = '" + EscapeString(account_flags_entry.p_value) + "'");
|
||||
update_values.push_back(columns[1] + " = '" + Strings::Escape(account_flags_entry.p_flag) + "'");
|
||||
update_values.push_back(columns[2] + " = '" + Strings::Escape(account_flags_entry.p_value) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
account_flags_entry.p_accid
|
||||
)
|
||||
@@ -183,14 +183,14 @@ public:
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
insert_values.push_back(std::to_string(account_flags_entry.p_accid));
|
||||
insert_values.push_back("'" + EscapeString(account_flags_entry.p_flag) + "'");
|
||||
insert_values.push_back("'" + EscapeString(account_flags_entry.p_value) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(account_flags_entry.p_flag) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(account_flags_entry.p_value) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -215,10 +215,10 @@ public:
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
insert_values.push_back(std::to_string(account_flags_entry.p_accid));
|
||||
insert_values.push_back("'" + EscapeString(account_flags_entry.p_flag) + "'");
|
||||
insert_values.push_back("'" + EscapeString(account_flags_entry.p_value) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(account_flags_entry.p_flag) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(account_flags_entry.p_value) + "'");
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -227,7 +227,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_ACCOUNT_IP_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseAccountIpRepository {
|
||||
@@ -52,12 +52,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -164,15 +164,15 @@ public:
|
||||
auto columns = Columns();
|
||||
|
||||
update_values.push_back(columns[0] + " = " + std::to_string(account_ip_entry.accid));
|
||||
update_values.push_back(columns[1] + " = '" + EscapeString(account_ip_entry.ip) + "'");
|
||||
update_values.push_back(columns[1] + " = '" + Strings::Escape(account_ip_entry.ip) + "'");
|
||||
update_values.push_back(columns[2] + " = " + std::to_string(account_ip_entry.count));
|
||||
update_values.push_back(columns[3] + " = '" + EscapeString(account_ip_entry.lastused) + "'");
|
||||
update_values.push_back(columns[3] + " = '" + Strings::Escape(account_ip_entry.lastused) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
account_ip_entry.accid
|
||||
)
|
||||
@@ -189,15 +189,15 @@ public:
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
insert_values.push_back(std::to_string(account_ip_entry.accid));
|
||||
insert_values.push_back("'" + EscapeString(account_ip_entry.ip) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(account_ip_entry.ip) + "'");
|
||||
insert_values.push_back(std::to_string(account_ip_entry.count));
|
||||
insert_values.push_back("'" + EscapeString(account_ip_entry.lastused) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(account_ip_entry.lastused) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -222,11 +222,11 @@ public:
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
insert_values.push_back(std::to_string(account_ip_entry.accid));
|
||||
insert_values.push_back("'" + EscapeString(account_ip_entry.ip) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(account_ip_entry.ip) + "'");
|
||||
insert_values.push_back(std::to_string(account_ip_entry.count));
|
||||
insert_values.push_back("'" + EscapeString(account_ip_entry.lastused) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(account_ip_entry.lastused) + "'");
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -235,7 +235,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_ACCOUNT_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseAccountRepository {
|
||||
@@ -106,12 +106,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -253,33 +253,33 @@ public:
|
||||
|
||||
auto columns = Columns();
|
||||
|
||||
update_values.push_back(columns[1] + " = '" + EscapeString(account_entry.name) + "'");
|
||||
update_values.push_back(columns[2] + " = '" + EscapeString(account_entry.charname) + "'");
|
||||
update_values.push_back(columns[1] + " = '" + Strings::Escape(account_entry.name) + "'");
|
||||
update_values.push_back(columns[2] + " = '" + Strings::Escape(account_entry.charname) + "'");
|
||||
update_values.push_back(columns[3] + " = " + std::to_string(account_entry.sharedplat));
|
||||
update_values.push_back(columns[4] + " = '" + EscapeString(account_entry.password) + "'");
|
||||
update_values.push_back(columns[4] + " = '" + Strings::Escape(account_entry.password) + "'");
|
||||
update_values.push_back(columns[5] + " = " + std::to_string(account_entry.status));
|
||||
update_values.push_back(columns[6] + " = '" + EscapeString(account_entry.ls_id) + "'");
|
||||
update_values.push_back(columns[6] + " = '" + Strings::Escape(account_entry.ls_id) + "'");
|
||||
update_values.push_back(columns[7] + " = " + std::to_string(account_entry.lsaccount_id));
|
||||
update_values.push_back(columns[8] + " = " + std::to_string(account_entry.gmspeed));
|
||||
update_values.push_back(columns[9] + " = " + std::to_string(account_entry.revoked));
|
||||
update_values.push_back(columns[10] + " = " + std::to_string(account_entry.karma));
|
||||
update_values.push_back(columns[11] + " = '" + EscapeString(account_entry.minilogin_ip) + "'");
|
||||
update_values.push_back(columns[11] + " = '" + Strings::Escape(account_entry.minilogin_ip) + "'");
|
||||
update_values.push_back(columns[12] + " = " + std::to_string(account_entry.hideme));
|
||||
update_values.push_back(columns[13] + " = " + std::to_string(account_entry.rulesflag));
|
||||
update_values.push_back(columns[14] + " = FROM_UNIXTIME(" + (account_entry.suspendeduntil > 0 ? std::to_string(account_entry.suspendeduntil) : "null") + ")");
|
||||
update_values.push_back(columns[15] + " = " + std::to_string(account_entry.time_creation));
|
||||
update_values.push_back(columns[16] + " = " + std::to_string(account_entry.expansion));
|
||||
update_values.push_back(columns[17] + " = '" + EscapeString(account_entry.ban_reason) + "'");
|
||||
update_values.push_back(columns[18] + " = '" + EscapeString(account_entry.suspend_reason) + "'");
|
||||
update_values.push_back(columns[19] + " = '" + EscapeString(account_entry.crc_eqgame) + "'");
|
||||
update_values.push_back(columns[20] + " = '" + EscapeString(account_entry.crc_skillcaps) + "'");
|
||||
update_values.push_back(columns[21] + " = '" + EscapeString(account_entry.crc_basedata) + "'");
|
||||
update_values.push_back(columns[17] + " = '" + Strings::Escape(account_entry.ban_reason) + "'");
|
||||
update_values.push_back(columns[18] + " = '" + Strings::Escape(account_entry.suspend_reason) + "'");
|
||||
update_values.push_back(columns[19] + " = '" + Strings::Escape(account_entry.crc_eqgame) + "'");
|
||||
update_values.push_back(columns[20] + " = '" + Strings::Escape(account_entry.crc_skillcaps) + "'");
|
||||
update_values.push_back(columns[21] + " = '" + Strings::Escape(account_entry.crc_basedata) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
account_entry.id
|
||||
)
|
||||
@@ -296,33 +296,33 @@ public:
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
insert_values.push_back(std::to_string(account_entry.id));
|
||||
insert_values.push_back("'" + EscapeString(account_entry.name) + "'");
|
||||
insert_values.push_back("'" + EscapeString(account_entry.charname) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(account_entry.name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(account_entry.charname) + "'");
|
||||
insert_values.push_back(std::to_string(account_entry.sharedplat));
|
||||
insert_values.push_back("'" + EscapeString(account_entry.password) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(account_entry.password) + "'");
|
||||
insert_values.push_back(std::to_string(account_entry.status));
|
||||
insert_values.push_back("'" + EscapeString(account_entry.ls_id) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(account_entry.ls_id) + "'");
|
||||
insert_values.push_back(std::to_string(account_entry.lsaccount_id));
|
||||
insert_values.push_back(std::to_string(account_entry.gmspeed));
|
||||
insert_values.push_back(std::to_string(account_entry.revoked));
|
||||
insert_values.push_back(std::to_string(account_entry.karma));
|
||||
insert_values.push_back("'" + EscapeString(account_entry.minilogin_ip) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(account_entry.minilogin_ip) + "'");
|
||||
insert_values.push_back(std::to_string(account_entry.hideme));
|
||||
insert_values.push_back(std::to_string(account_entry.rulesflag));
|
||||
insert_values.push_back("FROM_UNIXTIME(" + (account_entry.suspendeduntil > 0 ? std::to_string(account_entry.suspendeduntil) : "null") + ")");
|
||||
insert_values.push_back(std::to_string(account_entry.time_creation));
|
||||
insert_values.push_back(std::to_string(account_entry.expansion));
|
||||
insert_values.push_back("'" + EscapeString(account_entry.ban_reason) + "'");
|
||||
insert_values.push_back("'" + EscapeString(account_entry.suspend_reason) + "'");
|
||||
insert_values.push_back("'" + EscapeString(account_entry.crc_eqgame) + "'");
|
||||
insert_values.push_back("'" + EscapeString(account_entry.crc_skillcaps) + "'");
|
||||
insert_values.push_back("'" + EscapeString(account_entry.crc_basedata) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(account_entry.ban_reason) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(account_entry.suspend_reason) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(account_entry.crc_eqgame) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(account_entry.crc_skillcaps) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(account_entry.crc_basedata) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -347,29 +347,29 @@ public:
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
insert_values.push_back(std::to_string(account_entry.id));
|
||||
insert_values.push_back("'" + EscapeString(account_entry.name) + "'");
|
||||
insert_values.push_back("'" + EscapeString(account_entry.charname) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(account_entry.name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(account_entry.charname) + "'");
|
||||
insert_values.push_back(std::to_string(account_entry.sharedplat));
|
||||
insert_values.push_back("'" + EscapeString(account_entry.password) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(account_entry.password) + "'");
|
||||
insert_values.push_back(std::to_string(account_entry.status));
|
||||
insert_values.push_back("'" + EscapeString(account_entry.ls_id) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(account_entry.ls_id) + "'");
|
||||
insert_values.push_back(std::to_string(account_entry.lsaccount_id));
|
||||
insert_values.push_back(std::to_string(account_entry.gmspeed));
|
||||
insert_values.push_back(std::to_string(account_entry.revoked));
|
||||
insert_values.push_back(std::to_string(account_entry.karma));
|
||||
insert_values.push_back("'" + EscapeString(account_entry.minilogin_ip) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(account_entry.minilogin_ip) + "'");
|
||||
insert_values.push_back(std::to_string(account_entry.hideme));
|
||||
insert_values.push_back(std::to_string(account_entry.rulesflag));
|
||||
insert_values.push_back("FROM_UNIXTIME(" + (account_entry.suspendeduntil > 0 ? std::to_string(account_entry.suspendeduntil) : "null") + ")");
|
||||
insert_values.push_back(std::to_string(account_entry.time_creation));
|
||||
insert_values.push_back(std::to_string(account_entry.expansion));
|
||||
insert_values.push_back("'" + EscapeString(account_entry.ban_reason) + "'");
|
||||
insert_values.push_back("'" + EscapeString(account_entry.suspend_reason) + "'");
|
||||
insert_values.push_back("'" + EscapeString(account_entry.crc_eqgame) + "'");
|
||||
insert_values.push_back("'" + EscapeString(account_entry.crc_skillcaps) + "'");
|
||||
insert_values.push_back("'" + EscapeString(account_entry.crc_basedata) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(account_entry.ban_reason) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(account_entry.suspend_reason) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(account_entry.crc_eqgame) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(account_entry.crc_skillcaps) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(account_entry.crc_basedata) + "'");
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -378,7 +378,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_ACCOUNT_REWARDS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseAccountRewardsRepository {
|
||||
@@ -49,12 +49,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -166,7 +166,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
account_rewards_entry.account_id
|
||||
)
|
||||
@@ -190,7 +190,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -218,7 +218,7 @@ public:
|
||||
insert_values.push_back(std::to_string(account_rewards_entry.reward_id));
|
||||
insert_values.push_back(std::to_string(account_rewards_entry.amount));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -227,7 +227,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_ADVENTURE_DETAILS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseAdventureDetailsRepository {
|
||||
@@ -67,12 +67,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -201,7 +201,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
adventure_details_entry.id
|
||||
)
|
||||
@@ -231,7 +231,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -265,7 +265,7 @@ public:
|
||||
insert_values.push_back(std::to_string(adventure_details_entry.time_zoned));
|
||||
insert_values.push_back(std::to_string(adventure_details_entry.time_completed));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -274,7 +274,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_ADVENTURE_MEMBERS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseAdventureMembersRepository {
|
||||
@@ -46,12 +46,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -160,7 +160,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
adventure_members_entry.charid
|
||||
)
|
||||
@@ -183,7 +183,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -210,7 +210,7 @@ public:
|
||||
insert_values.push_back(std::to_string(adventure_members_entry.id));
|
||||
insert_values.push_back(std::to_string(adventure_members_entry.charid));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -219,7 +219,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_ADVENTURE_STATS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseAdventureStatsRepository {
|
||||
@@ -73,12 +73,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -214,7 +214,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
adventure_stats_entry.player_id
|
||||
)
|
||||
@@ -246,7 +246,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -282,7 +282,7 @@ public:
|
||||
insert_values.push_back(std::to_string(adventure_stats_entry.ruj_losses));
|
||||
insert_values.push_back(std::to_string(adventure_stats_entry.tak_losses));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -291,7 +291,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_ADVENTURE_TEMPLATE_ENTRY_FLAVOR_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseAdventureTemplateEntryFlavorRepository {
|
||||
@@ -46,12 +46,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -154,13 +154,13 @@ public:
|
||||
auto columns = Columns();
|
||||
|
||||
update_values.push_back(columns[0] + " = " + std::to_string(adventure_template_entry_flavor_entry.id));
|
||||
update_values.push_back(columns[1] + " = '" + EscapeString(adventure_template_entry_flavor_entry.text) + "'");
|
||||
update_values.push_back(columns[1] + " = '" + Strings::Escape(adventure_template_entry_flavor_entry.text) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
adventure_template_entry_flavor_entry.id
|
||||
)
|
||||
@@ -177,13 +177,13 @@ public:
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
insert_values.push_back(std::to_string(adventure_template_entry_flavor_entry.id));
|
||||
insert_values.push_back("'" + EscapeString(adventure_template_entry_flavor_entry.text) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(adventure_template_entry_flavor_entry.text) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -208,9 +208,9 @@ public:
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
insert_values.push_back(std::to_string(adventure_template_entry_flavor_entry.id));
|
||||
insert_values.push_back("'" + EscapeString(adventure_template_entry_flavor_entry.text) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(adventure_template_entry_flavor_entry.text) + "'");
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -219,7 +219,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_ADVENTURE_TEMPLATE_ENTRY_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseAdventureTemplateEntryRepository {
|
||||
@@ -46,12 +46,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -160,7 +160,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
adventure_template_entry_entry.id
|
||||
)
|
||||
@@ -183,7 +183,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -210,7 +210,7 @@ public:
|
||||
insert_values.push_back(std::to_string(adventure_template_entry_entry.id));
|
||||
insert_values.push_back(std::to_string(adventure_template_entry_entry.template_id));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -219,7 +219,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_ADVENTURE_TEMPLATE_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseAdventureTemplateRepository {
|
||||
@@ -139,12 +139,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -309,7 +309,7 @@ public:
|
||||
auto columns = Columns();
|
||||
|
||||
update_values.push_back(columns[0] + " = " + std::to_string(adventure_template_entry.id));
|
||||
update_values.push_back(columns[1] + " = '" + EscapeString(adventure_template_entry.zone) + "'");
|
||||
update_values.push_back(columns[1] + " = '" + Strings::Escape(adventure_template_entry.zone) + "'");
|
||||
update_values.push_back(columns[2] + " = " + std::to_string(adventure_template_entry.zone_version));
|
||||
update_values.push_back(columns[3] + " = " + std::to_string(adventure_template_entry.is_hard));
|
||||
update_values.push_back(columns[4] + " = " + std::to_string(adventure_template_entry.is_raid));
|
||||
@@ -322,7 +322,7 @@ public:
|
||||
update_values.push_back(columns[11] + " = " + std::to_string(adventure_template_entry.assa_y));
|
||||
update_values.push_back(columns[12] + " = " + std::to_string(adventure_template_entry.assa_z));
|
||||
update_values.push_back(columns[13] + " = " + std::to_string(adventure_template_entry.assa_h));
|
||||
update_values.push_back(columns[14] + " = '" + EscapeString(adventure_template_entry.text) + "'");
|
||||
update_values.push_back(columns[14] + " = '" + Strings::Escape(adventure_template_entry.text) + "'");
|
||||
update_values.push_back(columns[15] + " = " + std::to_string(adventure_template_entry.duration));
|
||||
update_values.push_back(columns[16] + " = " + std::to_string(adventure_template_entry.zone_in_time));
|
||||
update_values.push_back(columns[17] + " = " + std::to_string(adventure_template_entry.win_points));
|
||||
@@ -346,7 +346,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
adventure_template_entry.id
|
||||
)
|
||||
@@ -363,7 +363,7 @@ public:
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
insert_values.push_back(std::to_string(adventure_template_entry.id));
|
||||
insert_values.push_back("'" + EscapeString(adventure_template_entry.zone) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(adventure_template_entry.zone) + "'");
|
||||
insert_values.push_back(std::to_string(adventure_template_entry.zone_version));
|
||||
insert_values.push_back(std::to_string(adventure_template_entry.is_hard));
|
||||
insert_values.push_back(std::to_string(adventure_template_entry.is_raid));
|
||||
@@ -376,7 +376,7 @@ public:
|
||||
insert_values.push_back(std::to_string(adventure_template_entry.assa_y));
|
||||
insert_values.push_back(std::to_string(adventure_template_entry.assa_z));
|
||||
insert_values.push_back(std::to_string(adventure_template_entry.assa_h));
|
||||
insert_values.push_back("'" + EscapeString(adventure_template_entry.text) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(adventure_template_entry.text) + "'");
|
||||
insert_values.push_back(std::to_string(adventure_template_entry.duration));
|
||||
insert_values.push_back(std::to_string(adventure_template_entry.zone_in_time));
|
||||
insert_values.push_back(std::to_string(adventure_template_entry.win_points));
|
||||
@@ -400,7 +400,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -425,7 +425,7 @@ public:
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
insert_values.push_back(std::to_string(adventure_template_entry.id));
|
||||
insert_values.push_back("'" + EscapeString(adventure_template_entry.zone) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(adventure_template_entry.zone) + "'");
|
||||
insert_values.push_back(std::to_string(adventure_template_entry.zone_version));
|
||||
insert_values.push_back(std::to_string(adventure_template_entry.is_hard));
|
||||
insert_values.push_back(std::to_string(adventure_template_entry.is_raid));
|
||||
@@ -438,7 +438,7 @@ public:
|
||||
insert_values.push_back(std::to_string(adventure_template_entry.assa_y));
|
||||
insert_values.push_back(std::to_string(adventure_template_entry.assa_z));
|
||||
insert_values.push_back(std::to_string(adventure_template_entry.assa_h));
|
||||
insert_values.push_back("'" + EscapeString(adventure_template_entry.text) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(adventure_template_entry.text) + "'");
|
||||
insert_values.push_back(std::to_string(adventure_template_entry.duration));
|
||||
insert_values.push_back(std::to_string(adventure_template_entry.zone_in_time));
|
||||
insert_values.push_back(std::to_string(adventure_template_entry.win_points));
|
||||
@@ -458,7 +458,7 @@ public:
|
||||
insert_values.push_back(std::to_string(adventure_template_entry.graveyard_z));
|
||||
insert_values.push_back(std::to_string(adventure_template_entry.graveyard_radius));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -467,7 +467,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_ALTERNATE_CURRENCY_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseAlternateCurrencyRepository {
|
||||
@@ -46,12 +46,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -160,7 +160,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
alternate_currency_entry.id
|
||||
)
|
||||
@@ -183,7 +183,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -210,7 +210,7 @@ public:
|
||||
insert_values.push_back(std::to_string(alternate_currency_entry.id));
|
||||
insert_values.push_back(std::to_string(alternate_currency_entry.item_id));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -219,7 +219,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_AURAS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseAurasRepository {
|
||||
@@ -73,12 +73,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -200,7 +200,7 @@ public:
|
||||
|
||||
update_values.push_back(columns[0] + " = " + std::to_string(auras_entry.type));
|
||||
update_values.push_back(columns[1] + " = " + std::to_string(auras_entry.npc_type));
|
||||
update_values.push_back(columns[2] + " = '" + EscapeString(auras_entry.name) + "'");
|
||||
update_values.push_back(columns[2] + " = '" + Strings::Escape(auras_entry.name) + "'");
|
||||
update_values.push_back(columns[3] + " = " + std::to_string(auras_entry.spell_id));
|
||||
update_values.push_back(columns[4] + " = " + std::to_string(auras_entry.distance));
|
||||
update_values.push_back(columns[5] + " = " + std::to_string(auras_entry.aura_type));
|
||||
@@ -214,7 +214,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
auras_entry.type
|
||||
)
|
||||
@@ -232,7 +232,7 @@ public:
|
||||
|
||||
insert_values.push_back(std::to_string(auras_entry.type));
|
||||
insert_values.push_back(std::to_string(auras_entry.npc_type));
|
||||
insert_values.push_back("'" + EscapeString(auras_entry.name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(auras_entry.name) + "'");
|
||||
insert_values.push_back(std::to_string(auras_entry.spell_id));
|
||||
insert_values.push_back(std::to_string(auras_entry.distance));
|
||||
insert_values.push_back(std::to_string(auras_entry.aura_type));
|
||||
@@ -246,7 +246,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -272,7 +272,7 @@ public:
|
||||
|
||||
insert_values.push_back(std::to_string(auras_entry.type));
|
||||
insert_values.push_back(std::to_string(auras_entry.npc_type));
|
||||
insert_values.push_back("'" + EscapeString(auras_entry.name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(auras_entry.name) + "'");
|
||||
insert_values.push_back(std::to_string(auras_entry.spell_id));
|
||||
insert_values.push_back(std::to_string(auras_entry.distance));
|
||||
insert_values.push_back(std::to_string(auras_entry.aura_type));
|
||||
@@ -282,7 +282,7 @@ public:
|
||||
insert_values.push_back(std::to_string(auras_entry.icon));
|
||||
insert_values.push_back(std::to_string(auras_entry.cast_time));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -291,7 +291,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_BASE_DATA_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseBaseDataRepository {
|
||||
@@ -70,12 +70,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -208,7 +208,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
base_data_entry.level
|
||||
)
|
||||
@@ -239,7 +239,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -274,7 +274,7 @@ public:
|
||||
insert_values.push_back(std::to_string(base_data_entry.mana_fac));
|
||||
insert_values.push_back(std::to_string(base_data_entry.end_fac));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -283,7 +283,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_BLOCKED_SPELLS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseBlockedSpellsRepository {
|
||||
@@ -76,12 +76,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -212,14 +212,14 @@ public:
|
||||
update_values.push_back(columns[7] + " = " + std::to_string(blocked_spells_entry.x_diff));
|
||||
update_values.push_back(columns[8] + " = " + std::to_string(blocked_spells_entry.y_diff));
|
||||
update_values.push_back(columns[9] + " = " + std::to_string(blocked_spells_entry.z_diff));
|
||||
update_values.push_back(columns[10] + " = '" + EscapeString(blocked_spells_entry.message) + "'");
|
||||
update_values.push_back(columns[11] + " = '" + EscapeString(blocked_spells_entry.description) + "'");
|
||||
update_values.push_back(columns[10] + " = '" + Strings::Escape(blocked_spells_entry.message) + "'");
|
||||
update_values.push_back(columns[11] + " = '" + Strings::Escape(blocked_spells_entry.description) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
blocked_spells_entry.id
|
||||
)
|
||||
@@ -245,14 +245,14 @@ public:
|
||||
insert_values.push_back(std::to_string(blocked_spells_entry.x_diff));
|
||||
insert_values.push_back(std::to_string(blocked_spells_entry.y_diff));
|
||||
insert_values.push_back(std::to_string(blocked_spells_entry.z_diff));
|
||||
insert_values.push_back("'" + EscapeString(blocked_spells_entry.message) + "'");
|
||||
insert_values.push_back("'" + EscapeString(blocked_spells_entry.description) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(blocked_spells_entry.message) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(blocked_spells_entry.description) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -286,10 +286,10 @@ public:
|
||||
insert_values.push_back(std::to_string(blocked_spells_entry.x_diff));
|
||||
insert_values.push_back(std::to_string(blocked_spells_entry.y_diff));
|
||||
insert_values.push_back(std::to_string(blocked_spells_entry.z_diff));
|
||||
insert_values.push_back("'" + EscapeString(blocked_spells_entry.message) + "'");
|
||||
insert_values.push_back("'" + EscapeString(blocked_spells_entry.description) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(blocked_spells_entry.message) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(blocked_spells_entry.description) + "'");
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -298,7 +298,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_BOOKS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseBooksRepository {
|
||||
@@ -52,12 +52,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -163,15 +163,15 @@ public:
|
||||
|
||||
auto columns = Columns();
|
||||
|
||||
update_values.push_back(columns[1] + " = '" + EscapeString(books_entry.name) + "'");
|
||||
update_values.push_back(columns[2] + " = '" + EscapeString(books_entry.txtfile) + "'");
|
||||
update_values.push_back(columns[1] + " = '" + Strings::Escape(books_entry.name) + "'");
|
||||
update_values.push_back(columns[2] + " = '" + Strings::Escape(books_entry.txtfile) + "'");
|
||||
update_values.push_back(columns[3] + " = " + std::to_string(books_entry.language));
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
books_entry.id
|
||||
)
|
||||
@@ -188,15 +188,15 @@ public:
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
insert_values.push_back(std::to_string(books_entry.id));
|
||||
insert_values.push_back("'" + EscapeString(books_entry.name) + "'");
|
||||
insert_values.push_back("'" + EscapeString(books_entry.txtfile) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(books_entry.name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(books_entry.txtfile) + "'");
|
||||
insert_values.push_back(std::to_string(books_entry.language));
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -221,11 +221,11 @@ public:
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
insert_values.push_back(std::to_string(books_entry.id));
|
||||
insert_values.push_back("'" + EscapeString(books_entry.name) + "'");
|
||||
insert_values.push_back("'" + EscapeString(books_entry.txtfile) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(books_entry.name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(books_entry.txtfile) + "'");
|
||||
insert_values.push_back(std::to_string(books_entry.language));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -234,7 +234,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_BUG_REPORTS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseBugReportsRepository {
|
||||
@@ -136,12 +136,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -303,43 +303,43 @@ public:
|
||||
|
||||
auto columns = Columns();
|
||||
|
||||
update_values.push_back(columns[1] + " = '" + EscapeString(bug_reports_entry.zone) + "'");
|
||||
update_values.push_back(columns[1] + " = '" + Strings::Escape(bug_reports_entry.zone) + "'");
|
||||
update_values.push_back(columns[2] + " = " + std::to_string(bug_reports_entry.client_version_id));
|
||||
update_values.push_back(columns[3] + " = '" + EscapeString(bug_reports_entry.client_version_name) + "'");
|
||||
update_values.push_back(columns[3] + " = '" + Strings::Escape(bug_reports_entry.client_version_name) + "'");
|
||||
update_values.push_back(columns[4] + " = " + std::to_string(bug_reports_entry.account_id));
|
||||
update_values.push_back(columns[5] + " = " + std::to_string(bug_reports_entry.character_id));
|
||||
update_values.push_back(columns[6] + " = '" + EscapeString(bug_reports_entry.character_name) + "'");
|
||||
update_values.push_back(columns[6] + " = '" + Strings::Escape(bug_reports_entry.character_name) + "'");
|
||||
update_values.push_back(columns[7] + " = " + std::to_string(bug_reports_entry.reporter_spoof));
|
||||
update_values.push_back(columns[8] + " = " + std::to_string(bug_reports_entry.category_id));
|
||||
update_values.push_back(columns[9] + " = '" + EscapeString(bug_reports_entry.category_name) + "'");
|
||||
update_values.push_back(columns[10] + " = '" + EscapeString(bug_reports_entry.reporter_name) + "'");
|
||||
update_values.push_back(columns[11] + " = '" + EscapeString(bug_reports_entry.ui_path) + "'");
|
||||
update_values.push_back(columns[9] + " = '" + Strings::Escape(bug_reports_entry.category_name) + "'");
|
||||
update_values.push_back(columns[10] + " = '" + Strings::Escape(bug_reports_entry.reporter_name) + "'");
|
||||
update_values.push_back(columns[11] + " = '" + Strings::Escape(bug_reports_entry.ui_path) + "'");
|
||||
update_values.push_back(columns[12] + " = " + std::to_string(bug_reports_entry.pos_x));
|
||||
update_values.push_back(columns[13] + " = " + std::to_string(bug_reports_entry.pos_y));
|
||||
update_values.push_back(columns[14] + " = " + std::to_string(bug_reports_entry.pos_z));
|
||||
update_values.push_back(columns[15] + " = " + std::to_string(bug_reports_entry.heading));
|
||||
update_values.push_back(columns[16] + " = " + std::to_string(bug_reports_entry.time_played));
|
||||
update_values.push_back(columns[17] + " = " + std::to_string(bug_reports_entry.target_id));
|
||||
update_values.push_back(columns[18] + " = '" + EscapeString(bug_reports_entry.target_name) + "'");
|
||||
update_values.push_back(columns[18] + " = '" + Strings::Escape(bug_reports_entry.target_name) + "'");
|
||||
update_values.push_back(columns[19] + " = " + std::to_string(bug_reports_entry.optional_info_mask));
|
||||
update_values.push_back(columns[20] + " = " + std::to_string(bug_reports_entry._can_duplicate));
|
||||
update_values.push_back(columns[21] + " = " + std::to_string(bug_reports_entry._crash_bug));
|
||||
update_values.push_back(columns[22] + " = " + std::to_string(bug_reports_entry._target_info));
|
||||
update_values.push_back(columns[23] + " = " + std::to_string(bug_reports_entry._character_flags));
|
||||
update_values.push_back(columns[24] + " = " + std::to_string(bug_reports_entry._unknown_value));
|
||||
update_values.push_back(columns[25] + " = '" + EscapeString(bug_reports_entry.bug_report) + "'");
|
||||
update_values.push_back(columns[26] + " = '" + EscapeString(bug_reports_entry.system_info) + "'");
|
||||
update_values.push_back(columns[25] + " = '" + Strings::Escape(bug_reports_entry.bug_report) + "'");
|
||||
update_values.push_back(columns[26] + " = '" + Strings::Escape(bug_reports_entry.system_info) + "'");
|
||||
update_values.push_back(columns[27] + " = FROM_UNIXTIME(" + (bug_reports_entry.report_datetime > 0 ? std::to_string(bug_reports_entry.report_datetime) : "null") + ")");
|
||||
update_values.push_back(columns[28] + " = " + std::to_string(bug_reports_entry.bug_status));
|
||||
update_values.push_back(columns[29] + " = FROM_UNIXTIME(" + (bug_reports_entry.last_review > 0 ? std::to_string(bug_reports_entry.last_review) : "null") + ")");
|
||||
update_values.push_back(columns[30] + " = '" + EscapeString(bug_reports_entry.last_reviewer) + "'");
|
||||
update_values.push_back(columns[31] + " = '" + EscapeString(bug_reports_entry.reviewer_notes) + "'");
|
||||
update_values.push_back(columns[30] + " = '" + Strings::Escape(bug_reports_entry.last_reviewer) + "'");
|
||||
update_values.push_back(columns[31] + " = '" + Strings::Escape(bug_reports_entry.reviewer_notes) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
bug_reports_entry.id
|
||||
)
|
||||
@@ -356,43 +356,43 @@ public:
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
insert_values.push_back(std::to_string(bug_reports_entry.id));
|
||||
insert_values.push_back("'" + EscapeString(bug_reports_entry.zone) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bug_reports_entry.zone) + "'");
|
||||
insert_values.push_back(std::to_string(bug_reports_entry.client_version_id));
|
||||
insert_values.push_back("'" + EscapeString(bug_reports_entry.client_version_name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bug_reports_entry.client_version_name) + "'");
|
||||
insert_values.push_back(std::to_string(bug_reports_entry.account_id));
|
||||
insert_values.push_back(std::to_string(bug_reports_entry.character_id));
|
||||
insert_values.push_back("'" + EscapeString(bug_reports_entry.character_name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bug_reports_entry.character_name) + "'");
|
||||
insert_values.push_back(std::to_string(bug_reports_entry.reporter_spoof));
|
||||
insert_values.push_back(std::to_string(bug_reports_entry.category_id));
|
||||
insert_values.push_back("'" + EscapeString(bug_reports_entry.category_name) + "'");
|
||||
insert_values.push_back("'" + EscapeString(bug_reports_entry.reporter_name) + "'");
|
||||
insert_values.push_back("'" + EscapeString(bug_reports_entry.ui_path) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bug_reports_entry.category_name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bug_reports_entry.reporter_name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bug_reports_entry.ui_path) + "'");
|
||||
insert_values.push_back(std::to_string(bug_reports_entry.pos_x));
|
||||
insert_values.push_back(std::to_string(bug_reports_entry.pos_y));
|
||||
insert_values.push_back(std::to_string(bug_reports_entry.pos_z));
|
||||
insert_values.push_back(std::to_string(bug_reports_entry.heading));
|
||||
insert_values.push_back(std::to_string(bug_reports_entry.time_played));
|
||||
insert_values.push_back(std::to_string(bug_reports_entry.target_id));
|
||||
insert_values.push_back("'" + EscapeString(bug_reports_entry.target_name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bug_reports_entry.target_name) + "'");
|
||||
insert_values.push_back(std::to_string(bug_reports_entry.optional_info_mask));
|
||||
insert_values.push_back(std::to_string(bug_reports_entry._can_duplicate));
|
||||
insert_values.push_back(std::to_string(bug_reports_entry._crash_bug));
|
||||
insert_values.push_back(std::to_string(bug_reports_entry._target_info));
|
||||
insert_values.push_back(std::to_string(bug_reports_entry._character_flags));
|
||||
insert_values.push_back(std::to_string(bug_reports_entry._unknown_value));
|
||||
insert_values.push_back("'" + EscapeString(bug_reports_entry.bug_report) + "'");
|
||||
insert_values.push_back("'" + EscapeString(bug_reports_entry.system_info) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bug_reports_entry.bug_report) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bug_reports_entry.system_info) + "'");
|
||||
insert_values.push_back("FROM_UNIXTIME(" + (bug_reports_entry.report_datetime > 0 ? std::to_string(bug_reports_entry.report_datetime) : "null") + ")");
|
||||
insert_values.push_back(std::to_string(bug_reports_entry.bug_status));
|
||||
insert_values.push_back("FROM_UNIXTIME(" + (bug_reports_entry.last_review > 0 ? std::to_string(bug_reports_entry.last_review) : "null") + ")");
|
||||
insert_values.push_back("'" + EscapeString(bug_reports_entry.last_reviewer) + "'");
|
||||
insert_values.push_back("'" + EscapeString(bug_reports_entry.reviewer_notes) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bug_reports_entry.last_reviewer) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bug_reports_entry.reviewer_notes) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -417,39 +417,39 @@ public:
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
insert_values.push_back(std::to_string(bug_reports_entry.id));
|
||||
insert_values.push_back("'" + EscapeString(bug_reports_entry.zone) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bug_reports_entry.zone) + "'");
|
||||
insert_values.push_back(std::to_string(bug_reports_entry.client_version_id));
|
||||
insert_values.push_back("'" + EscapeString(bug_reports_entry.client_version_name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bug_reports_entry.client_version_name) + "'");
|
||||
insert_values.push_back(std::to_string(bug_reports_entry.account_id));
|
||||
insert_values.push_back(std::to_string(bug_reports_entry.character_id));
|
||||
insert_values.push_back("'" + EscapeString(bug_reports_entry.character_name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bug_reports_entry.character_name) + "'");
|
||||
insert_values.push_back(std::to_string(bug_reports_entry.reporter_spoof));
|
||||
insert_values.push_back(std::to_string(bug_reports_entry.category_id));
|
||||
insert_values.push_back("'" + EscapeString(bug_reports_entry.category_name) + "'");
|
||||
insert_values.push_back("'" + EscapeString(bug_reports_entry.reporter_name) + "'");
|
||||
insert_values.push_back("'" + EscapeString(bug_reports_entry.ui_path) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bug_reports_entry.category_name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bug_reports_entry.reporter_name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bug_reports_entry.ui_path) + "'");
|
||||
insert_values.push_back(std::to_string(bug_reports_entry.pos_x));
|
||||
insert_values.push_back(std::to_string(bug_reports_entry.pos_y));
|
||||
insert_values.push_back(std::to_string(bug_reports_entry.pos_z));
|
||||
insert_values.push_back(std::to_string(bug_reports_entry.heading));
|
||||
insert_values.push_back(std::to_string(bug_reports_entry.time_played));
|
||||
insert_values.push_back(std::to_string(bug_reports_entry.target_id));
|
||||
insert_values.push_back("'" + EscapeString(bug_reports_entry.target_name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bug_reports_entry.target_name) + "'");
|
||||
insert_values.push_back(std::to_string(bug_reports_entry.optional_info_mask));
|
||||
insert_values.push_back(std::to_string(bug_reports_entry._can_duplicate));
|
||||
insert_values.push_back(std::to_string(bug_reports_entry._crash_bug));
|
||||
insert_values.push_back(std::to_string(bug_reports_entry._target_info));
|
||||
insert_values.push_back(std::to_string(bug_reports_entry._character_flags));
|
||||
insert_values.push_back(std::to_string(bug_reports_entry._unknown_value));
|
||||
insert_values.push_back("'" + EscapeString(bug_reports_entry.bug_report) + "'");
|
||||
insert_values.push_back("'" + EscapeString(bug_reports_entry.system_info) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bug_reports_entry.bug_report) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bug_reports_entry.system_info) + "'");
|
||||
insert_values.push_back("FROM_UNIXTIME(" + (bug_reports_entry.report_datetime > 0 ? std::to_string(bug_reports_entry.report_datetime) : "null") + ")");
|
||||
insert_values.push_back(std::to_string(bug_reports_entry.bug_status));
|
||||
insert_values.push_back("FROM_UNIXTIME(" + (bug_reports_entry.last_review > 0 ? std::to_string(bug_reports_entry.last_review) : "null") + ")");
|
||||
insert_values.push_back("'" + EscapeString(bug_reports_entry.last_reviewer) + "'");
|
||||
insert_values.push_back("'" + EscapeString(bug_reports_entry.reviewer_notes) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bug_reports_entry.last_reviewer) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bug_reports_entry.reviewer_notes) + "'");
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -458,7 +458,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_BUGS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseBugsRepository {
|
||||
@@ -79,12 +79,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -208,24 +208,24 @@ public:
|
||||
|
||||
auto columns = Columns();
|
||||
|
||||
update_values.push_back(columns[1] + " = '" + EscapeString(bugs_entry.zone) + "'");
|
||||
update_values.push_back(columns[2] + " = '" + EscapeString(bugs_entry.name) + "'");
|
||||
update_values.push_back(columns[3] + " = '" + EscapeString(bugs_entry.ui) + "'");
|
||||
update_values.push_back(columns[1] + " = '" + Strings::Escape(bugs_entry.zone) + "'");
|
||||
update_values.push_back(columns[2] + " = '" + Strings::Escape(bugs_entry.name) + "'");
|
||||
update_values.push_back(columns[3] + " = '" + Strings::Escape(bugs_entry.ui) + "'");
|
||||
update_values.push_back(columns[4] + " = " + std::to_string(bugs_entry.x));
|
||||
update_values.push_back(columns[5] + " = " + std::to_string(bugs_entry.y));
|
||||
update_values.push_back(columns[6] + " = " + std::to_string(bugs_entry.z));
|
||||
update_values.push_back(columns[7] + " = '" + EscapeString(bugs_entry.type) + "'");
|
||||
update_values.push_back(columns[7] + " = '" + Strings::Escape(bugs_entry.type) + "'");
|
||||
update_values.push_back(columns[8] + " = " + std::to_string(bugs_entry.flag));
|
||||
update_values.push_back(columns[9] + " = '" + EscapeString(bugs_entry.target) + "'");
|
||||
update_values.push_back(columns[10] + " = '" + EscapeString(bugs_entry.bug) + "'");
|
||||
update_values.push_back(columns[11] + " = '" + EscapeString(bugs_entry.date) + "'");
|
||||
update_values.push_back(columns[9] + " = '" + Strings::Escape(bugs_entry.target) + "'");
|
||||
update_values.push_back(columns[10] + " = '" + Strings::Escape(bugs_entry.bug) + "'");
|
||||
update_values.push_back(columns[11] + " = '" + Strings::Escape(bugs_entry.date) + "'");
|
||||
update_values.push_back(columns[12] + " = " + std::to_string(bugs_entry.status));
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
bugs_entry.id
|
||||
)
|
||||
@@ -242,24 +242,24 @@ public:
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
insert_values.push_back(std::to_string(bugs_entry.id));
|
||||
insert_values.push_back("'" + EscapeString(bugs_entry.zone) + "'");
|
||||
insert_values.push_back("'" + EscapeString(bugs_entry.name) + "'");
|
||||
insert_values.push_back("'" + EscapeString(bugs_entry.ui) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bugs_entry.zone) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bugs_entry.name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bugs_entry.ui) + "'");
|
||||
insert_values.push_back(std::to_string(bugs_entry.x));
|
||||
insert_values.push_back(std::to_string(bugs_entry.y));
|
||||
insert_values.push_back(std::to_string(bugs_entry.z));
|
||||
insert_values.push_back("'" + EscapeString(bugs_entry.type) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bugs_entry.type) + "'");
|
||||
insert_values.push_back(std::to_string(bugs_entry.flag));
|
||||
insert_values.push_back("'" + EscapeString(bugs_entry.target) + "'");
|
||||
insert_values.push_back("'" + EscapeString(bugs_entry.bug) + "'");
|
||||
insert_values.push_back("'" + EscapeString(bugs_entry.date) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bugs_entry.target) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bugs_entry.bug) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bugs_entry.date) + "'");
|
||||
insert_values.push_back(std::to_string(bugs_entry.status));
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -284,20 +284,20 @@ public:
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
insert_values.push_back(std::to_string(bugs_entry.id));
|
||||
insert_values.push_back("'" + EscapeString(bugs_entry.zone) + "'");
|
||||
insert_values.push_back("'" + EscapeString(bugs_entry.name) + "'");
|
||||
insert_values.push_back("'" + EscapeString(bugs_entry.ui) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bugs_entry.zone) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bugs_entry.name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bugs_entry.ui) + "'");
|
||||
insert_values.push_back(std::to_string(bugs_entry.x));
|
||||
insert_values.push_back(std::to_string(bugs_entry.y));
|
||||
insert_values.push_back(std::to_string(bugs_entry.z));
|
||||
insert_values.push_back("'" + EscapeString(bugs_entry.type) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bugs_entry.type) + "'");
|
||||
insert_values.push_back(std::to_string(bugs_entry.flag));
|
||||
insert_values.push_back("'" + EscapeString(bugs_entry.target) + "'");
|
||||
insert_values.push_back("'" + EscapeString(bugs_entry.bug) + "'");
|
||||
insert_values.push_back("'" + EscapeString(bugs_entry.date) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bugs_entry.target) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bugs_entry.bug) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(bugs_entry.date) + "'");
|
||||
insert_values.push_back(std::to_string(bugs_entry.status));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -306,7 +306,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_BUYER_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseBuyerRepository {
|
||||
@@ -58,12 +58,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -176,7 +176,7 @@ public:
|
||||
update_values.push_back(columns[0] + " = " + std::to_string(buyer_entry.charid));
|
||||
update_values.push_back(columns[1] + " = " + std::to_string(buyer_entry.buyslot));
|
||||
update_values.push_back(columns[2] + " = " + std::to_string(buyer_entry.itemid));
|
||||
update_values.push_back(columns[3] + " = '" + EscapeString(buyer_entry.itemname) + "'");
|
||||
update_values.push_back(columns[3] + " = '" + Strings::Escape(buyer_entry.itemname) + "'");
|
||||
update_values.push_back(columns[4] + " = " + std::to_string(buyer_entry.quantity));
|
||||
update_values.push_back(columns[5] + " = " + std::to_string(buyer_entry.price));
|
||||
|
||||
@@ -184,7 +184,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
buyer_entry.charid
|
||||
)
|
||||
@@ -203,7 +203,7 @@ public:
|
||||
insert_values.push_back(std::to_string(buyer_entry.charid));
|
||||
insert_values.push_back(std::to_string(buyer_entry.buyslot));
|
||||
insert_values.push_back(std::to_string(buyer_entry.itemid));
|
||||
insert_values.push_back("'" + EscapeString(buyer_entry.itemname) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(buyer_entry.itemname) + "'");
|
||||
insert_values.push_back(std::to_string(buyer_entry.quantity));
|
||||
insert_values.push_back(std::to_string(buyer_entry.price));
|
||||
|
||||
@@ -211,7 +211,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -238,11 +238,11 @@ public:
|
||||
insert_values.push_back(std::to_string(buyer_entry.charid));
|
||||
insert_values.push_back(std::to_string(buyer_entry.buyslot));
|
||||
insert_values.push_back(std::to_string(buyer_entry.itemid));
|
||||
insert_values.push_back("'" + EscapeString(buyer_entry.itemname) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(buyer_entry.itemname) + "'");
|
||||
insert_values.push_back(std::to_string(buyer_entry.quantity));
|
||||
insert_values.push_back(std::to_string(buyer_entry.price));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -251,7 +251,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_CHAR_CREATE_COMBINATIONS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCharCreateCombinationsRepository {
|
||||
@@ -58,12 +58,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -184,7 +184,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
char_create_combinations_entry.race
|
||||
)
|
||||
@@ -211,7 +211,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -242,7 +242,7 @@ public:
|
||||
insert_values.push_back(std::to_string(char_create_combinations_entry.start_zone));
|
||||
insert_values.push_back(std::to_string(char_create_combinations_entry.expansions_req));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -251,7 +251,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_CHAR_CREATE_POINT_ALLOCATIONS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCharCreatePointAllocationsRepository {
|
||||
@@ -85,12 +85,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -238,7 +238,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
char_create_point_allocations_entry.id
|
||||
)
|
||||
@@ -274,7 +274,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -314,7 +314,7 @@ public:
|
||||
insert_values.push_back(std::to_string(char_create_point_allocations_entry.alloc_wis));
|
||||
insert_values.push_back(std::to_string(char_create_point_allocations_entry.alloc_cha));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -323,7 +323,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_CHAR_RECIPE_LIST_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCharRecipeListRepository {
|
||||
@@ -49,12 +49,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -166,7 +166,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
char_recipe_list_entry.char_id
|
||||
)
|
||||
@@ -190,7 +190,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -218,7 +218,7 @@ public:
|
||||
insert_values.push_back(std::to_string(char_recipe_list_entry.recipe_id));
|
||||
insert_values.push_back(std::to_string(char_recipe_list_entry.madecount));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -227,7 +227,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_CHARACTER_ACTIVITIES_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCharacterActivitiesRepository {
|
||||
@@ -55,12 +55,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -178,7 +178,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
character_activities_entry.charid
|
||||
)
|
||||
@@ -204,7 +204,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -234,7 +234,7 @@ public:
|
||||
insert_values.push_back(std::to_string(character_activities_entry.donecount));
|
||||
insert_values.push_back(std::to_string(character_activities_entry.completed));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -243,7 +243,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_CHARACTER_ALT_CURRENCY_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCharacterAltCurrencyRepository {
|
||||
@@ -49,12 +49,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -166,7 +166,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
character_alt_currency_entry.char_id
|
||||
)
|
||||
@@ -190,7 +190,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -218,7 +218,7 @@ public:
|
||||
insert_values.push_back(std::to_string(character_alt_currency_entry.currency_id));
|
||||
insert_values.push_back(std::to_string(character_alt_currency_entry.amount));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -227,7 +227,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_CHARACTER_ALTERNATE_ABILITIES_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCharacterAlternateAbilitiesRepository {
|
||||
@@ -52,12 +52,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -172,7 +172,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
character_alternate_abilities_entry.id
|
||||
)
|
||||
@@ -197,7 +197,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -226,7 +226,7 @@ public:
|
||||
insert_values.push_back(std::to_string(character_alternate_abilities_entry.aa_value));
|
||||
insert_values.push_back(std::to_string(character_alternate_abilities_entry.charges));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -235,7 +235,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_CHARACTER_AURAS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCharacterAurasRepository {
|
||||
@@ -49,12 +49,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -166,7 +166,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
character_auras_entry.id
|
||||
)
|
||||
@@ -190,7 +190,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -218,7 +218,7 @@ public:
|
||||
insert_values.push_back(std::to_string(character_auras_entry.slot));
|
||||
insert_values.push_back(std::to_string(character_auras_entry.spell_id));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -227,7 +227,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_CHARACTER_BANDOLIER_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCharacterBandolierRepository {
|
||||
@@ -58,12 +58,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -178,13 +178,13 @@ public:
|
||||
update_values.push_back(columns[2] + " = " + std::to_string(character_bandolier_entry.bandolier_slot));
|
||||
update_values.push_back(columns[3] + " = " + std::to_string(character_bandolier_entry.item_id));
|
||||
update_values.push_back(columns[4] + " = " + std::to_string(character_bandolier_entry.icon));
|
||||
update_values.push_back(columns[5] + " = '" + EscapeString(character_bandolier_entry.bandolier_name) + "'");
|
||||
update_values.push_back(columns[5] + " = '" + Strings::Escape(character_bandolier_entry.bandolier_name) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
character_bandolier_entry.id
|
||||
)
|
||||
@@ -205,13 +205,13 @@ public:
|
||||
insert_values.push_back(std::to_string(character_bandolier_entry.bandolier_slot));
|
||||
insert_values.push_back(std::to_string(character_bandolier_entry.item_id));
|
||||
insert_values.push_back(std::to_string(character_bandolier_entry.icon));
|
||||
insert_values.push_back("'" + EscapeString(character_bandolier_entry.bandolier_name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(character_bandolier_entry.bandolier_name) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -240,9 +240,9 @@ public:
|
||||
insert_values.push_back(std::to_string(character_bandolier_entry.bandolier_slot));
|
||||
insert_values.push_back(std::to_string(character_bandolier_entry.item_id));
|
||||
insert_values.push_back(std::to_string(character_bandolier_entry.icon));
|
||||
insert_values.push_back("'" + EscapeString(character_bandolier_entry.bandolier_name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(character_bandolier_entry.bandolier_name) + "'");
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -251,7 +251,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_CHARACTER_BIND_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCharacterBindRepository {
|
||||
@@ -64,12 +64,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -195,7 +195,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
character_bind_entry.id
|
||||
)
|
||||
@@ -224,7 +224,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -257,7 +257,7 @@ public:
|
||||
insert_values.push_back(std::to_string(character_bind_entry.z));
|
||||
insert_values.push_back(std::to_string(character_bind_entry.heading));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -266,7 +266,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_CHARACTER_BUFFS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCharacterBuffsRepository {
|
||||
@@ -91,12 +91,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -232,7 +232,7 @@ public:
|
||||
update_values.push_back(columns[1] + " = " + std::to_string(character_buffs_entry.slot_id));
|
||||
update_values.push_back(columns[2] + " = " + std::to_string(character_buffs_entry.spell_id));
|
||||
update_values.push_back(columns[3] + " = " + std::to_string(character_buffs_entry.caster_level));
|
||||
update_values.push_back(columns[4] + " = '" + EscapeString(character_buffs_entry.caster_name) + "'");
|
||||
update_values.push_back(columns[4] + " = '" + Strings::Escape(character_buffs_entry.caster_name) + "'");
|
||||
update_values.push_back(columns[5] + " = " + std::to_string(character_buffs_entry.ticsremaining));
|
||||
update_values.push_back(columns[6] + " = " + std::to_string(character_buffs_entry.counters));
|
||||
update_values.push_back(columns[7] + " = " + std::to_string(character_buffs_entry.numhits));
|
||||
@@ -250,7 +250,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
character_buffs_entry.character_id
|
||||
)
|
||||
@@ -270,7 +270,7 @@ public:
|
||||
insert_values.push_back(std::to_string(character_buffs_entry.slot_id));
|
||||
insert_values.push_back(std::to_string(character_buffs_entry.spell_id));
|
||||
insert_values.push_back(std::to_string(character_buffs_entry.caster_level));
|
||||
insert_values.push_back("'" + EscapeString(character_buffs_entry.caster_name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(character_buffs_entry.caster_name) + "'");
|
||||
insert_values.push_back(std::to_string(character_buffs_entry.ticsremaining));
|
||||
insert_values.push_back(std::to_string(character_buffs_entry.counters));
|
||||
insert_values.push_back(std::to_string(character_buffs_entry.numhits));
|
||||
@@ -288,7 +288,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -316,7 +316,7 @@ public:
|
||||
insert_values.push_back(std::to_string(character_buffs_entry.slot_id));
|
||||
insert_values.push_back(std::to_string(character_buffs_entry.spell_id));
|
||||
insert_values.push_back(std::to_string(character_buffs_entry.caster_level));
|
||||
insert_values.push_back("'" + EscapeString(character_buffs_entry.caster_name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(character_buffs_entry.caster_name) + "'");
|
||||
insert_values.push_back(std::to_string(character_buffs_entry.ticsremaining));
|
||||
insert_values.push_back(std::to_string(character_buffs_entry.counters));
|
||||
insert_values.push_back(std::to_string(character_buffs_entry.numhits));
|
||||
@@ -330,7 +330,7 @@ public:
|
||||
insert_values.push_back(std::to_string(character_buffs_entry.ExtraDIChance));
|
||||
insert_values.push_back(std::to_string(character_buffs_entry.instrument_mod));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -339,7 +339,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_CHARACTER_CORPSE_ITEMS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCharacterCorpseItemsRepository {
|
||||
@@ -73,12 +73,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -214,7 +214,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
character_corpse_items_entry.corpse_id
|
||||
)
|
||||
@@ -246,7 +246,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -282,7 +282,7 @@ public:
|
||||
insert_values.push_back(std::to_string(character_corpse_items_entry.aug_6));
|
||||
insert_values.push_back(std::to_string(character_corpse_items_entry.attuned));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -291,7 +291,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_CHARACTER_CORPSES_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCharacterCorpsesRepository {
|
||||
@@ -181,12 +181,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -379,7 +379,7 @@ public:
|
||||
auto columns = Columns();
|
||||
|
||||
update_values.push_back(columns[1] + " = " + std::to_string(character_corpses_entry.charid));
|
||||
update_values.push_back(columns[2] + " = '" + EscapeString(character_corpses_entry.charname) + "'");
|
||||
update_values.push_back(columns[2] + " = '" + Strings::Escape(character_corpses_entry.charname) + "'");
|
||||
update_values.push_back(columns[3] + " = " + std::to_string(character_corpses_entry.zone_id));
|
||||
update_values.push_back(columns[4] + " = " + std::to_string(character_corpses_entry.instance_id));
|
||||
update_values.push_back(columns[5] + " = " + std::to_string(character_corpses_entry.x));
|
||||
@@ -429,7 +429,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
character_corpses_entry.id
|
||||
)
|
||||
@@ -447,7 +447,7 @@ public:
|
||||
|
||||
insert_values.push_back(std::to_string(character_corpses_entry.id));
|
||||
insert_values.push_back(std::to_string(character_corpses_entry.charid));
|
||||
insert_values.push_back("'" + EscapeString(character_corpses_entry.charname) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(character_corpses_entry.charname) + "'");
|
||||
insert_values.push_back(std::to_string(character_corpses_entry.zone_id));
|
||||
insert_values.push_back(std::to_string(character_corpses_entry.instance_id));
|
||||
insert_values.push_back(std::to_string(character_corpses_entry.x));
|
||||
@@ -497,7 +497,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -523,7 +523,7 @@ public:
|
||||
|
||||
insert_values.push_back(std::to_string(character_corpses_entry.id));
|
||||
insert_values.push_back(std::to_string(character_corpses_entry.charid));
|
||||
insert_values.push_back("'" + EscapeString(character_corpses_entry.charname) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(character_corpses_entry.charname) + "'");
|
||||
insert_values.push_back(std::to_string(character_corpses_entry.zone_id));
|
||||
insert_values.push_back(std::to_string(character_corpses_entry.instance_id));
|
||||
insert_values.push_back(std::to_string(character_corpses_entry.x));
|
||||
@@ -569,7 +569,7 @@ public:
|
||||
insert_values.push_back(std::to_string(character_corpses_entry.wc_8));
|
||||
insert_values.push_back(std::to_string(character_corpses_entry.wc_9));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -578,7 +578,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_CHARACTER_CURRENCY_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCharacterCurrencyRepository {
|
||||
@@ -91,12 +91,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -250,7 +250,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
character_currency_entry.id
|
||||
)
|
||||
@@ -288,7 +288,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -330,7 +330,7 @@ public:
|
||||
insert_values.push_back(std::to_string(character_currency_entry.ebon_crystals));
|
||||
insert_values.push_back(std::to_string(character_currency_entry.career_ebon_crystals));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -339,7 +339,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_CHARACTER_DATA_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCharacterDataRepository {
|
||||
@@ -346,12 +346,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -654,10 +654,10 @@ public:
|
||||
auto columns = Columns();
|
||||
|
||||
update_values.push_back(columns[1] + " = " + std::to_string(character_data_entry.account_id));
|
||||
update_values.push_back(columns[2] + " = '" + EscapeString(character_data_entry.name) + "'");
|
||||
update_values.push_back(columns[3] + " = '" + EscapeString(character_data_entry.last_name) + "'");
|
||||
update_values.push_back(columns[4] + " = '" + EscapeString(character_data_entry.title) + "'");
|
||||
update_values.push_back(columns[5] + " = '" + EscapeString(character_data_entry.suffix) + "'");
|
||||
update_values.push_back(columns[2] + " = '" + Strings::Escape(character_data_entry.name) + "'");
|
||||
update_values.push_back(columns[3] + " = '" + Strings::Escape(character_data_entry.last_name) + "'");
|
||||
update_values.push_back(columns[4] + " = '" + Strings::Escape(character_data_entry.title) + "'");
|
||||
update_values.push_back(columns[5] + " = '" + Strings::Escape(character_data_entry.suffix) + "'");
|
||||
update_values.push_back(columns[6] + " = " + std::to_string(character_data_entry.zone_id));
|
||||
update_values.push_back(columns[7] + " = " + std::to_string(character_data_entry.zone_instance));
|
||||
update_values.push_back(columns[8] + " = " + std::to_string(character_data_entry.y));
|
||||
@@ -744,7 +744,7 @@ public:
|
||||
update_values.push_back(columns[89] + " = " + std::to_string(character_data_entry.autosplit_enabled));
|
||||
update_values.push_back(columns[90] + " = " + std::to_string(character_data_entry.lfp));
|
||||
update_values.push_back(columns[91] + " = " + std::to_string(character_data_entry.lfg));
|
||||
update_values.push_back(columns[92] + " = '" + EscapeString(character_data_entry.mailkey) + "'");
|
||||
update_values.push_back(columns[92] + " = '" + Strings::Escape(character_data_entry.mailkey) + "'");
|
||||
update_values.push_back(columns[93] + " = " + std::to_string(character_data_entry.xtargets));
|
||||
update_values.push_back(columns[94] + " = " + std::to_string(character_data_entry.firstlogon));
|
||||
update_values.push_back(columns[95] + " = " + std::to_string(character_data_entry.e_aa_effects));
|
||||
@@ -759,7 +759,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
character_data_entry.id
|
||||
)
|
||||
@@ -777,10 +777,10 @@ public:
|
||||
|
||||
insert_values.push_back(std::to_string(character_data_entry.id));
|
||||
insert_values.push_back(std::to_string(character_data_entry.account_id));
|
||||
insert_values.push_back("'" + EscapeString(character_data_entry.name) + "'");
|
||||
insert_values.push_back("'" + EscapeString(character_data_entry.last_name) + "'");
|
||||
insert_values.push_back("'" + EscapeString(character_data_entry.title) + "'");
|
||||
insert_values.push_back("'" + EscapeString(character_data_entry.suffix) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(character_data_entry.name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(character_data_entry.last_name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(character_data_entry.title) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(character_data_entry.suffix) + "'");
|
||||
insert_values.push_back(std::to_string(character_data_entry.zone_id));
|
||||
insert_values.push_back(std::to_string(character_data_entry.zone_instance));
|
||||
insert_values.push_back(std::to_string(character_data_entry.y));
|
||||
@@ -867,7 +867,7 @@ public:
|
||||
insert_values.push_back(std::to_string(character_data_entry.autosplit_enabled));
|
||||
insert_values.push_back(std::to_string(character_data_entry.lfp));
|
||||
insert_values.push_back(std::to_string(character_data_entry.lfg));
|
||||
insert_values.push_back("'" + EscapeString(character_data_entry.mailkey) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(character_data_entry.mailkey) + "'");
|
||||
insert_values.push_back(std::to_string(character_data_entry.xtargets));
|
||||
insert_values.push_back(std::to_string(character_data_entry.firstlogon));
|
||||
insert_values.push_back(std::to_string(character_data_entry.e_aa_effects));
|
||||
@@ -882,7 +882,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -908,10 +908,10 @@ public:
|
||||
|
||||
insert_values.push_back(std::to_string(character_data_entry.id));
|
||||
insert_values.push_back(std::to_string(character_data_entry.account_id));
|
||||
insert_values.push_back("'" + EscapeString(character_data_entry.name) + "'");
|
||||
insert_values.push_back("'" + EscapeString(character_data_entry.last_name) + "'");
|
||||
insert_values.push_back("'" + EscapeString(character_data_entry.title) + "'");
|
||||
insert_values.push_back("'" + EscapeString(character_data_entry.suffix) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(character_data_entry.name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(character_data_entry.last_name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(character_data_entry.title) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(character_data_entry.suffix) + "'");
|
||||
insert_values.push_back(std::to_string(character_data_entry.zone_id));
|
||||
insert_values.push_back(std::to_string(character_data_entry.zone_instance));
|
||||
insert_values.push_back(std::to_string(character_data_entry.y));
|
||||
@@ -998,7 +998,7 @@ public:
|
||||
insert_values.push_back(std::to_string(character_data_entry.autosplit_enabled));
|
||||
insert_values.push_back(std::to_string(character_data_entry.lfp));
|
||||
insert_values.push_back(std::to_string(character_data_entry.lfg));
|
||||
insert_values.push_back("'" + EscapeString(character_data_entry.mailkey) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(character_data_entry.mailkey) + "'");
|
||||
insert_values.push_back(std::to_string(character_data_entry.xtargets));
|
||||
insert_values.push_back(std::to_string(character_data_entry.firstlogon));
|
||||
insert_values.push_back(std::to_string(character_data_entry.e_aa_effects));
|
||||
@@ -1009,7 +1009,7 @@ public:
|
||||
insert_values.push_back(std::to_string(character_data_entry.e_last_invsnapshot));
|
||||
insert_values.push_back("FROM_UNIXTIME(" + (character_data_entry.deleted_at > 0 ? std::to_string(character_data_entry.deleted_at) : "null") + ")");
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -1018,7 +1018,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_CHARACTER_DISCIPLINES_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCharacterDisciplinesRepository {
|
||||
@@ -49,12 +49,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -166,7 +166,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
character_disciplines_entry.id
|
||||
)
|
||||
@@ -190,7 +190,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -218,7 +218,7 @@ public:
|
||||
insert_values.push_back(std::to_string(character_disciplines_entry.slot_id));
|
||||
insert_values.push_back(std::to_string(character_disciplines_entry.disc_id));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -227,7 +227,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_CHARACTER_EXP_MODIFIERS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCharacterExpModifiersRepository {
|
||||
@@ -52,12 +52,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -172,7 +172,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
character_exp_modifiers_entry.character_id
|
||||
)
|
||||
@@ -197,7 +197,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -226,7 +226,7 @@ public:
|
||||
insert_values.push_back(std::to_string(character_exp_modifiers_entry.aa_modifier));
|
||||
insert_values.push_back(std::to_string(character_exp_modifiers_entry.exp_modifier));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -235,7 +235,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_CHARACTER_EXPEDITION_LOCKOUTS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCharacterExpeditionLockoutsRepository {
|
||||
@@ -61,12 +61,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -179,17 +179,17 @@ public:
|
||||
auto columns = Columns();
|
||||
|
||||
update_values.push_back(columns[1] + " = " + std::to_string(character_expedition_lockouts_entry.character_id));
|
||||
update_values.push_back(columns[2] + " = '" + EscapeString(character_expedition_lockouts_entry.expedition_name) + "'");
|
||||
update_values.push_back(columns[3] + " = '" + EscapeString(character_expedition_lockouts_entry.event_name) + "'");
|
||||
update_values.push_back(columns[2] + " = '" + Strings::Escape(character_expedition_lockouts_entry.expedition_name) + "'");
|
||||
update_values.push_back(columns[3] + " = '" + Strings::Escape(character_expedition_lockouts_entry.event_name) + "'");
|
||||
update_values.push_back(columns[4] + " = FROM_UNIXTIME(" + (character_expedition_lockouts_entry.expire_time > 0 ? std::to_string(character_expedition_lockouts_entry.expire_time) : "null") + ")");
|
||||
update_values.push_back(columns[5] + " = " + std::to_string(character_expedition_lockouts_entry.duration));
|
||||
update_values.push_back(columns[6] + " = '" + EscapeString(character_expedition_lockouts_entry.from_expedition_uuid) + "'");
|
||||
update_values.push_back(columns[6] + " = '" + Strings::Escape(character_expedition_lockouts_entry.from_expedition_uuid) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
character_expedition_lockouts_entry.id
|
||||
)
|
||||
@@ -207,17 +207,17 @@ public:
|
||||
|
||||
insert_values.push_back(std::to_string(character_expedition_lockouts_entry.id));
|
||||
insert_values.push_back(std::to_string(character_expedition_lockouts_entry.character_id));
|
||||
insert_values.push_back("'" + EscapeString(character_expedition_lockouts_entry.expedition_name) + "'");
|
||||
insert_values.push_back("'" + EscapeString(character_expedition_lockouts_entry.event_name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(character_expedition_lockouts_entry.expedition_name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(character_expedition_lockouts_entry.event_name) + "'");
|
||||
insert_values.push_back("FROM_UNIXTIME(" + (character_expedition_lockouts_entry.expire_time > 0 ? std::to_string(character_expedition_lockouts_entry.expire_time) : "null") + ")");
|
||||
insert_values.push_back(std::to_string(character_expedition_lockouts_entry.duration));
|
||||
insert_values.push_back("'" + EscapeString(character_expedition_lockouts_entry.from_expedition_uuid) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(character_expedition_lockouts_entry.from_expedition_uuid) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -243,13 +243,13 @@ public:
|
||||
|
||||
insert_values.push_back(std::to_string(character_expedition_lockouts_entry.id));
|
||||
insert_values.push_back(std::to_string(character_expedition_lockouts_entry.character_id));
|
||||
insert_values.push_back("'" + EscapeString(character_expedition_lockouts_entry.expedition_name) + "'");
|
||||
insert_values.push_back("'" + EscapeString(character_expedition_lockouts_entry.event_name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(character_expedition_lockouts_entry.expedition_name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(character_expedition_lockouts_entry.event_name) + "'");
|
||||
insert_values.push_back("FROM_UNIXTIME(" + (character_expedition_lockouts_entry.expire_time > 0 ? std::to_string(character_expedition_lockouts_entry.expire_time) : "null") + ")");
|
||||
insert_values.push_back(std::to_string(character_expedition_lockouts_entry.duration));
|
||||
insert_values.push_back("'" + EscapeString(character_expedition_lockouts_entry.from_expedition_uuid) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(character_expedition_lockouts_entry.from_expedition_uuid) + "'");
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -258,7 +258,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_CHARACTER_INSPECT_MESSAGES_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCharacterInspectMessagesRepository {
|
||||
@@ -46,12 +46,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -154,13 +154,13 @@ public:
|
||||
auto columns = Columns();
|
||||
|
||||
update_values.push_back(columns[0] + " = " + std::to_string(character_inspect_messages_entry.id));
|
||||
update_values.push_back(columns[1] + " = '" + EscapeString(character_inspect_messages_entry.inspect_message) + "'");
|
||||
update_values.push_back(columns[1] + " = '" + Strings::Escape(character_inspect_messages_entry.inspect_message) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
character_inspect_messages_entry.id
|
||||
)
|
||||
@@ -177,13 +177,13 @@ public:
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
insert_values.push_back(std::to_string(character_inspect_messages_entry.id));
|
||||
insert_values.push_back("'" + EscapeString(character_inspect_messages_entry.inspect_message) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(character_inspect_messages_entry.inspect_message) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -208,9 +208,9 @@ public:
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
insert_values.push_back(std::to_string(character_inspect_messages_entry.id));
|
||||
insert_values.push_back("'" + EscapeString(character_inspect_messages_entry.inspect_message) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(character_inspect_messages_entry.inspect_message) + "'");
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -219,7 +219,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_CHARACTER_INSTANCE_SAFERETURNS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCharacterInstanceSafereturnsRepository {
|
||||
@@ -67,12 +67,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -201,7 +201,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
character_instance_safereturns_entry.id
|
||||
)
|
||||
@@ -231,7 +231,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -265,7 +265,7 @@ public:
|
||||
insert_values.push_back(std::to_string(character_instance_safereturns_entry.safe_z));
|
||||
insert_values.push_back(std::to_string(character_instance_safereturns_entry.safe_heading));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -274,7 +274,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_CHARACTER_ITEM_RECAST_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCharacterItemRecastRepository {
|
||||
@@ -49,12 +49,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -166,7 +166,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
character_item_recast_entry.id
|
||||
)
|
||||
@@ -190,7 +190,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -218,7 +218,7 @@ public:
|
||||
insert_values.push_back(std::to_string(character_item_recast_entry.recast_type));
|
||||
insert_values.push_back(std::to_string(character_item_recast_entry.timestamp));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -227,7 +227,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_CHARACTER_LANGUAGES_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCharacterLanguagesRepository {
|
||||
@@ -49,12 +49,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -165,7 +165,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
character_languages_entry.id
|
||||
)
|
||||
@@ -189,7 +189,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -217,7 +217,7 @@ public:
|
||||
insert_values.push_back(std::to_string(character_languages_entry.lang_id));
|
||||
insert_values.push_back(std::to_string(character_languages_entry.value));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -226,7 +226,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_CHARACTER_LEADERSHIP_ABILITIES_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCharacterLeadershipAbilitiesRepository {
|
||||
@@ -49,12 +49,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -166,7 +166,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
character_leadership_abilities_entry.id
|
||||
)
|
||||
@@ -190,7 +190,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -218,7 +218,7 @@ public:
|
||||
insert_values.push_back(std::to_string(character_leadership_abilities_entry.slot));
|
||||
insert_values.push_back(std::to_string(character_leadership_abilities_entry.rank));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -227,7 +227,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_CHARACTER_MATERIAL_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCharacterMaterialRepository {
|
||||
@@ -61,12 +61,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -189,7 +189,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
character_material_entry.id
|
||||
)
|
||||
@@ -217,7 +217,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -249,7 +249,7 @@ public:
|
||||
insert_values.push_back(std::to_string(character_material_entry.use_tint));
|
||||
insert_values.push_back(std::to_string(character_material_entry.color));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -258,7 +258,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_CHARACTER_MEMMED_SPELLS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCharacterMemmedSpellsRepository {
|
||||
@@ -49,12 +49,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -166,7 +166,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
character_memmed_spells_entry.id
|
||||
)
|
||||
@@ -190,7 +190,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -218,7 +218,7 @@ public:
|
||||
insert_values.push_back(std::to_string(character_memmed_spells_entry.slot_id));
|
||||
insert_values.push_back(std::to_string(character_memmed_spells_entry.spell_id));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -227,7 +227,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_CHARACTER_PET_BUFFS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCharacterPetBuffsRepository {
|
||||
@@ -73,12 +73,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -203,7 +203,7 @@ public:
|
||||
update_values.push_back(columns[2] + " = " + std::to_string(character_pet_buffs_entry.slot));
|
||||
update_values.push_back(columns[3] + " = " + std::to_string(character_pet_buffs_entry.spell_id));
|
||||
update_values.push_back(columns[4] + " = " + std::to_string(character_pet_buffs_entry.caster_level));
|
||||
update_values.push_back(columns[5] + " = '" + EscapeString(character_pet_buffs_entry.castername) + "'");
|
||||
update_values.push_back(columns[5] + " = '" + Strings::Escape(character_pet_buffs_entry.castername) + "'");
|
||||
update_values.push_back(columns[6] + " = " + std::to_string(character_pet_buffs_entry.ticsremaining));
|
||||
update_values.push_back(columns[7] + " = " + std::to_string(character_pet_buffs_entry.counters));
|
||||
update_values.push_back(columns[8] + " = " + std::to_string(character_pet_buffs_entry.numhits));
|
||||
@@ -214,7 +214,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
character_pet_buffs_entry.char_id
|
||||
)
|
||||
@@ -235,7 +235,7 @@ public:
|
||||
insert_values.push_back(std::to_string(character_pet_buffs_entry.slot));
|
||||
insert_values.push_back(std::to_string(character_pet_buffs_entry.spell_id));
|
||||
insert_values.push_back(std::to_string(character_pet_buffs_entry.caster_level));
|
||||
insert_values.push_back("'" + EscapeString(character_pet_buffs_entry.castername) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(character_pet_buffs_entry.castername) + "'");
|
||||
insert_values.push_back(std::to_string(character_pet_buffs_entry.ticsremaining));
|
||||
insert_values.push_back(std::to_string(character_pet_buffs_entry.counters));
|
||||
insert_values.push_back(std::to_string(character_pet_buffs_entry.numhits));
|
||||
@@ -246,7 +246,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -275,14 +275,14 @@ public:
|
||||
insert_values.push_back(std::to_string(character_pet_buffs_entry.slot));
|
||||
insert_values.push_back(std::to_string(character_pet_buffs_entry.spell_id));
|
||||
insert_values.push_back(std::to_string(character_pet_buffs_entry.caster_level));
|
||||
insert_values.push_back("'" + EscapeString(character_pet_buffs_entry.castername) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(character_pet_buffs_entry.castername) + "'");
|
||||
insert_values.push_back(std::to_string(character_pet_buffs_entry.ticsremaining));
|
||||
insert_values.push_back(std::to_string(character_pet_buffs_entry.counters));
|
||||
insert_values.push_back(std::to_string(character_pet_buffs_entry.numhits));
|
||||
insert_values.push_back(std::to_string(character_pet_buffs_entry.rune));
|
||||
insert_values.push_back(std::to_string(character_pet_buffs_entry.instrument_mod));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -291,7 +291,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_CHARACTER_PET_INFO_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCharacterPetInfoRepository {
|
||||
@@ -67,12 +67,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -190,7 +190,7 @@ public:
|
||||
|
||||
update_values.push_back(columns[0] + " = " + std::to_string(character_pet_info_entry.char_id));
|
||||
update_values.push_back(columns[1] + " = " + std::to_string(character_pet_info_entry.pet));
|
||||
update_values.push_back(columns[2] + " = '" + EscapeString(character_pet_info_entry.petname) + "'");
|
||||
update_values.push_back(columns[2] + " = '" + Strings::Escape(character_pet_info_entry.petname) + "'");
|
||||
update_values.push_back(columns[3] + " = " + std::to_string(character_pet_info_entry.petpower));
|
||||
update_values.push_back(columns[4] + " = " + std::to_string(character_pet_info_entry.spell_id));
|
||||
update_values.push_back(columns[5] + " = " + std::to_string(character_pet_info_entry.hp));
|
||||
@@ -202,7 +202,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
character_pet_info_entry.char_id
|
||||
)
|
||||
@@ -220,7 +220,7 @@ public:
|
||||
|
||||
insert_values.push_back(std::to_string(character_pet_info_entry.char_id));
|
||||
insert_values.push_back(std::to_string(character_pet_info_entry.pet));
|
||||
insert_values.push_back("'" + EscapeString(character_pet_info_entry.petname) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(character_pet_info_entry.petname) + "'");
|
||||
insert_values.push_back(std::to_string(character_pet_info_entry.petpower));
|
||||
insert_values.push_back(std::to_string(character_pet_info_entry.spell_id));
|
||||
insert_values.push_back(std::to_string(character_pet_info_entry.hp));
|
||||
@@ -232,7 +232,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -258,7 +258,7 @@ public:
|
||||
|
||||
insert_values.push_back(std::to_string(character_pet_info_entry.char_id));
|
||||
insert_values.push_back(std::to_string(character_pet_info_entry.pet));
|
||||
insert_values.push_back("'" + EscapeString(character_pet_info_entry.petname) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(character_pet_info_entry.petname) + "'");
|
||||
insert_values.push_back(std::to_string(character_pet_info_entry.petpower));
|
||||
insert_values.push_back(std::to_string(character_pet_info_entry.spell_id));
|
||||
insert_values.push_back(std::to_string(character_pet_info_entry.hp));
|
||||
@@ -266,7 +266,7 @@ public:
|
||||
insert_values.push_back(std::to_string(character_pet_info_entry.size));
|
||||
insert_values.push_back(std::to_string(character_pet_info_entry.taunting));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -275,7 +275,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_CHARACTER_PET_INVENTORY_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCharacterPetInventoryRepository {
|
||||
@@ -52,12 +52,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -172,7 +172,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
character_pet_inventory_entry.char_id
|
||||
)
|
||||
@@ -197,7 +197,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -226,7 +226,7 @@ public:
|
||||
insert_values.push_back(std::to_string(character_pet_inventory_entry.slot));
|
||||
insert_values.push_back(std::to_string(character_pet_inventory_entry.item_id));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -235,7 +235,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_CHARACTER_POTIONBELT_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCharacterPotionbeltRepository {
|
||||
@@ -52,12 +52,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -172,7 +172,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
character_potionbelt_entry.id
|
||||
)
|
||||
@@ -197,7 +197,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -226,7 +226,7 @@ public:
|
||||
insert_values.push_back(std::to_string(character_potionbelt_entry.item_id));
|
||||
insert_values.push_back(std::to_string(character_potionbelt_entry.icon));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -235,7 +235,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_CHARACTER_SKILLS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCharacterSkillsRepository {
|
||||
@@ -49,12 +49,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -165,7 +165,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
character_skills_entry.id
|
||||
)
|
||||
@@ -189,7 +189,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -217,7 +217,7 @@ public:
|
||||
insert_values.push_back(std::to_string(character_skills_entry.skill_id));
|
||||
insert_values.push_back(std::to_string(character_skills_entry.value));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -226,7 +226,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_CHARACTER_SPELLS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCharacterSpellsRepository {
|
||||
@@ -49,12 +49,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -165,7 +165,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
character_spells_entry.id
|
||||
)
|
||||
@@ -189,7 +189,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -217,7 +217,7 @@ public:
|
||||
insert_values.push_back(std::to_string(character_spells_entry.slot_id));
|
||||
insert_values.push_back(std::to_string(character_spells_entry.spell_id));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -226,7 +226,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_CHARACTER_TASK_TIMERS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCharacterTaskTimersRepository {
|
||||
@@ -55,12 +55,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -177,7 +177,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
character_task_timers_entry.id
|
||||
)
|
||||
@@ -203,7 +203,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -233,7 +233,7 @@ public:
|
||||
insert_values.push_back(std::to_string(character_task_timers_entry.timer_type));
|
||||
insert_values.push_back("FROM_UNIXTIME(" + (character_task_timers_entry.expire_time > 0 ? std::to_string(character_task_timers_entry.expire_time) : "null") + ")");
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -242,7 +242,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_CHARACTER_TASKS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCharacterTasksRepository {
|
||||
@@ -55,12 +55,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -178,7 +178,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
character_tasks_entry.charid
|
||||
)
|
||||
@@ -204,7 +204,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -234,7 +234,7 @@ public:
|
||||
insert_values.push_back(std::to_string(character_tasks_entry.type));
|
||||
insert_values.push_back(std::to_string(character_tasks_entry.acceptedtime));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -243,7 +243,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_COMPLETED_SHARED_TASK_ACTIVITY_STATE_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCompletedSharedTaskActivityStateRepository {
|
||||
@@ -55,12 +55,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -178,7 +178,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
completed_shared_task_activity_state_entry.shared_task_id
|
||||
)
|
||||
@@ -204,7 +204,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -234,7 +234,7 @@ public:
|
||||
insert_values.push_back("FROM_UNIXTIME(" + (completed_shared_task_activity_state_entry.updated_time > 0 ? std::to_string(completed_shared_task_activity_state_entry.updated_time) : "null") + ")");
|
||||
insert_values.push_back("FROM_UNIXTIME(" + (completed_shared_task_activity_state_entry.completed_time > 0 ? std::to_string(completed_shared_task_activity_state_entry.completed_time) : "null") + ")");
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -243,7 +243,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_COMPLETED_SHARED_TASK_MEMBERS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCompletedSharedTaskMembersRepository {
|
||||
@@ -49,12 +49,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -166,7 +166,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
completed_shared_task_members_entry.shared_task_id
|
||||
)
|
||||
@@ -190,7 +190,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -218,7 +218,7 @@ public:
|
||||
insert_values.push_back(std::to_string(completed_shared_task_members_entry.character_id));
|
||||
insert_values.push_back(std::to_string(completed_shared_task_members_entry.is_leader));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -227,7 +227,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_COMPLETED_SHARED_TASKS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCompletedSharedTasksRepository {
|
||||
@@ -58,12 +58,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -184,7 +184,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
completed_shared_tasks_entry.id
|
||||
)
|
||||
@@ -211,7 +211,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -242,7 +242,7 @@ public:
|
||||
insert_values.push_back("FROM_UNIXTIME(" + (completed_shared_tasks_entry.completion_time > 0 ? std::to_string(completed_shared_tasks_entry.completion_time) : "null") + ")");
|
||||
insert_values.push_back(std::to_string(completed_shared_tasks_entry.is_locked));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -251,7 +251,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_COMPLETED_TASKS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseCompletedTasksRepository {
|
||||
@@ -52,12 +52,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -172,7 +172,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
completed_tasks_entry.charid
|
||||
)
|
||||
@@ -197,7 +197,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -226,7 +226,7 @@ public:
|
||||
insert_values.push_back(std::to_string(completed_tasks_entry.taskid));
|
||||
insert_values.push_back(std::to_string(completed_tasks_entry.activityid));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -235,7 +235,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_CONTENT_FLAGS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseContentFlagsRepository {
|
||||
@@ -52,12 +52,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -163,15 +163,15 @@ public:
|
||||
|
||||
auto columns = Columns();
|
||||
|
||||
update_values.push_back(columns[1] + " = '" + EscapeString(content_flags_entry.flag_name) + "'");
|
||||
update_values.push_back(columns[1] + " = '" + Strings::Escape(content_flags_entry.flag_name) + "'");
|
||||
update_values.push_back(columns[2] + " = " + std::to_string(content_flags_entry.enabled));
|
||||
update_values.push_back(columns[3] + " = '" + EscapeString(content_flags_entry.notes) + "'");
|
||||
update_values.push_back(columns[3] + " = '" + Strings::Escape(content_flags_entry.notes) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
content_flags_entry.id
|
||||
)
|
||||
@@ -188,15 +188,15 @@ public:
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
insert_values.push_back(std::to_string(content_flags_entry.id));
|
||||
insert_values.push_back("'" + EscapeString(content_flags_entry.flag_name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(content_flags_entry.flag_name) + "'");
|
||||
insert_values.push_back(std::to_string(content_flags_entry.enabled));
|
||||
insert_values.push_back("'" + EscapeString(content_flags_entry.notes) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(content_flags_entry.notes) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -221,11 +221,11 @@ public:
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
insert_values.push_back(std::to_string(content_flags_entry.id));
|
||||
insert_values.push_back("'" + EscapeString(content_flags_entry.flag_name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(content_flags_entry.flag_name) + "'");
|
||||
insert_values.push_back(std::to_string(content_flags_entry.enabled));
|
||||
insert_values.push_back("'" + EscapeString(content_flags_entry.notes) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(content_flags_entry.notes) + "'");
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -234,7 +234,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_DAMAGESHIELDTYPES_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseDamageshieldtypesRepository {
|
||||
@@ -46,12 +46,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -160,7 +160,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
damageshieldtypes_entry.spellid
|
||||
)
|
||||
@@ -183,7 +183,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -210,7 +210,7 @@ public:
|
||||
insert_values.push_back(std::to_string(damageshieldtypes_entry.spellid));
|
||||
insert_values.push_back(std::to_string(damageshieldtypes_entry.type));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -219,7 +219,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_DATA_BUCKETS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseDataBucketsRepository {
|
||||
@@ -52,12 +52,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -163,15 +163,15 @@ public:
|
||||
|
||||
auto columns = Columns();
|
||||
|
||||
update_values.push_back(columns[1] + " = '" + EscapeString(data_buckets_entry.key) + "'");
|
||||
update_values.push_back(columns[2] + " = '" + EscapeString(data_buckets_entry.value) + "'");
|
||||
update_values.push_back(columns[1] + " = '" + Strings::Escape(data_buckets_entry.key) + "'");
|
||||
update_values.push_back(columns[2] + " = '" + Strings::Escape(data_buckets_entry.value) + "'");
|
||||
update_values.push_back(columns[3] + " = " + std::to_string(data_buckets_entry.expires));
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
data_buckets_entry.id
|
||||
)
|
||||
@@ -188,15 +188,15 @@ public:
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
insert_values.push_back(std::to_string(data_buckets_entry.id));
|
||||
insert_values.push_back("'" + EscapeString(data_buckets_entry.key) + "'");
|
||||
insert_values.push_back("'" + EscapeString(data_buckets_entry.value) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(data_buckets_entry.key) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(data_buckets_entry.value) + "'");
|
||||
insert_values.push_back(std::to_string(data_buckets_entry.expires));
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -221,11 +221,11 @@ public:
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
insert_values.push_back(std::to_string(data_buckets_entry.id));
|
||||
insert_values.push_back("'" + EscapeString(data_buckets_entry.key) + "'");
|
||||
insert_values.push_back("'" + EscapeString(data_buckets_entry.value) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(data_buckets_entry.key) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(data_buckets_entry.value) + "'");
|
||||
insert_values.push_back(std::to_string(data_buckets_entry.expires));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -234,7 +234,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_DB_STR_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseDbStrRepository {
|
||||
@@ -49,12 +49,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -160,13 +160,13 @@ public:
|
||||
|
||||
update_values.push_back(columns[0] + " = " + std::to_string(db_str_entry.id));
|
||||
update_values.push_back(columns[1] + " = " + std::to_string(db_str_entry.type));
|
||||
update_values.push_back(columns[2] + " = '" + EscapeString(db_str_entry.value) + "'");
|
||||
update_values.push_back(columns[2] + " = '" + Strings::Escape(db_str_entry.value) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
db_str_entry.id
|
||||
)
|
||||
@@ -184,13 +184,13 @@ public:
|
||||
|
||||
insert_values.push_back(std::to_string(db_str_entry.id));
|
||||
insert_values.push_back(std::to_string(db_str_entry.type));
|
||||
insert_values.push_back("'" + EscapeString(db_str_entry.value) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(db_str_entry.value) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -216,9 +216,9 @@ public:
|
||||
|
||||
insert_values.push_back(std::to_string(db_str_entry.id));
|
||||
insert_values.push_back(std::to_string(db_str_entry.type));
|
||||
insert_values.push_back("'" + EscapeString(db_str_entry.value) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(db_str_entry.value) + "'");
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -227,7 +227,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_DISCORD_WEBHOOKS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseDiscordWebhooksRepository {
|
||||
@@ -55,12 +55,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -168,8 +168,8 @@ public:
|
||||
|
||||
auto columns = Columns();
|
||||
|
||||
update_values.push_back(columns[1] + " = '" + EscapeString(discord_webhooks_entry.webhook_name) + "'");
|
||||
update_values.push_back(columns[2] + " = '" + EscapeString(discord_webhooks_entry.webhook_url) + "'");
|
||||
update_values.push_back(columns[1] + " = '" + Strings::Escape(discord_webhooks_entry.webhook_name) + "'");
|
||||
update_values.push_back(columns[2] + " = '" + Strings::Escape(discord_webhooks_entry.webhook_url) + "'");
|
||||
update_values.push_back(columns[3] + " = FROM_UNIXTIME(" + (discord_webhooks_entry.created_at > 0 ? std::to_string(discord_webhooks_entry.created_at) : "null") + ")");
|
||||
update_values.push_back(columns[4] + " = FROM_UNIXTIME(" + (discord_webhooks_entry.deleted_at > 0 ? std::to_string(discord_webhooks_entry.deleted_at) : "null") + ")");
|
||||
|
||||
@@ -177,7 +177,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
discord_webhooks_entry.id
|
||||
)
|
||||
@@ -194,8 +194,8 @@ public:
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
insert_values.push_back(std::to_string(discord_webhooks_entry.id));
|
||||
insert_values.push_back("'" + EscapeString(discord_webhooks_entry.webhook_name) + "'");
|
||||
insert_values.push_back("'" + EscapeString(discord_webhooks_entry.webhook_url) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(discord_webhooks_entry.webhook_name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(discord_webhooks_entry.webhook_url) + "'");
|
||||
insert_values.push_back("FROM_UNIXTIME(" + (discord_webhooks_entry.created_at > 0 ? std::to_string(discord_webhooks_entry.created_at) : "null") + ")");
|
||||
insert_values.push_back("FROM_UNIXTIME(" + (discord_webhooks_entry.deleted_at > 0 ? std::to_string(discord_webhooks_entry.deleted_at) : "null") + ")");
|
||||
|
||||
@@ -203,7 +203,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -228,12 +228,12 @@ public:
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
insert_values.push_back(std::to_string(discord_webhooks_entry.id));
|
||||
insert_values.push_back("'" + EscapeString(discord_webhooks_entry.webhook_name) + "'");
|
||||
insert_values.push_back("'" + EscapeString(discord_webhooks_entry.webhook_url) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(discord_webhooks_entry.webhook_name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(discord_webhooks_entry.webhook_url) + "'");
|
||||
insert_values.push_back("FROM_UNIXTIME(" + (discord_webhooks_entry.created_at > 0 ? std::to_string(discord_webhooks_entry.created_at) : "null") + ")");
|
||||
insert_values.push_back("FROM_UNIXTIME(" + (discord_webhooks_entry.deleted_at > 0 ? std::to_string(discord_webhooks_entry.deleted_at) : "null") + ")");
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -242,7 +242,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_DISCOVERED_ITEMS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseDiscoveredItemsRepository {
|
||||
@@ -52,12 +52,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -164,7 +164,7 @@ public:
|
||||
auto columns = Columns();
|
||||
|
||||
update_values.push_back(columns[0] + " = " + std::to_string(discovered_items_entry.item_id));
|
||||
update_values.push_back(columns[1] + " = '" + EscapeString(discovered_items_entry.char_name) + "'");
|
||||
update_values.push_back(columns[1] + " = '" + Strings::Escape(discovered_items_entry.char_name) + "'");
|
||||
update_values.push_back(columns[2] + " = " + std::to_string(discovered_items_entry.discovered_date));
|
||||
update_values.push_back(columns[3] + " = " + std::to_string(discovered_items_entry.account_status));
|
||||
|
||||
@@ -172,7 +172,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
discovered_items_entry.item_id
|
||||
)
|
||||
@@ -189,7 +189,7 @@ public:
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
insert_values.push_back(std::to_string(discovered_items_entry.item_id));
|
||||
insert_values.push_back("'" + EscapeString(discovered_items_entry.char_name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(discovered_items_entry.char_name) + "'");
|
||||
insert_values.push_back(std::to_string(discovered_items_entry.discovered_date));
|
||||
insert_values.push_back(std::to_string(discovered_items_entry.account_status));
|
||||
|
||||
@@ -197,7 +197,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -222,11 +222,11 @@ public:
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
insert_values.push_back(std::to_string(discovered_items_entry.item_id));
|
||||
insert_values.push_back("'" + EscapeString(discovered_items_entry.char_name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(discovered_items_entry.char_name) + "'");
|
||||
insert_values.push_back(std::to_string(discovered_items_entry.discovered_date));
|
||||
insert_values.push_back(std::to_string(discovered_items_entry.account_status));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -235,7 +235,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_DOORS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseDoorsRepository {
|
||||
@@ -145,12 +145,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -319,9 +319,9 @@ public:
|
||||
auto columns = Columns();
|
||||
|
||||
update_values.push_back(columns[1] + " = " + std::to_string(doors_entry.doorid));
|
||||
update_values.push_back(columns[2] + " = '" + EscapeString(doors_entry.zone) + "'");
|
||||
update_values.push_back(columns[2] + " = '" + Strings::Escape(doors_entry.zone) + "'");
|
||||
update_values.push_back(columns[3] + " = " + std::to_string(doors_entry.version));
|
||||
update_values.push_back(columns[4] + " = '" + EscapeString(doors_entry.name) + "'");
|
||||
update_values.push_back(columns[4] + " = '" + Strings::Escape(doors_entry.name) + "'");
|
||||
update_values.push_back(columns[5] + " = " + std::to_string(doors_entry.pos_y));
|
||||
update_values.push_back(columns[6] + " = " + std::to_string(doors_entry.pos_x));
|
||||
update_values.push_back(columns[7] + " = " + std::to_string(doors_entry.pos_z));
|
||||
@@ -336,7 +336,7 @@ public:
|
||||
update_values.push_back(columns[16] + " = " + std::to_string(doors_entry.disable_timer));
|
||||
update_values.push_back(columns[17] + " = " + std::to_string(doors_entry.doorisopen));
|
||||
update_values.push_back(columns[18] + " = " + std::to_string(doors_entry.door_param));
|
||||
update_values.push_back(columns[19] + " = '" + EscapeString(doors_entry.dest_zone) + "'");
|
||||
update_values.push_back(columns[19] + " = '" + Strings::Escape(doors_entry.dest_zone) + "'");
|
||||
update_values.push_back(columns[20] + " = " + std::to_string(doors_entry.dest_instance));
|
||||
update_values.push_back(columns[21] + " = " + std::to_string(doors_entry.dest_x));
|
||||
update_values.push_back(columns[22] + " = " + std::to_string(doors_entry.dest_y));
|
||||
@@ -350,14 +350,14 @@ public:
|
||||
update_values.push_back(columns[30] + " = " + std::to_string(doors_entry.is_ldon_door));
|
||||
update_values.push_back(columns[31] + " = " + std::to_string(doors_entry.min_expansion));
|
||||
update_values.push_back(columns[32] + " = " + std::to_string(doors_entry.max_expansion));
|
||||
update_values.push_back(columns[33] + " = '" + EscapeString(doors_entry.content_flags) + "'");
|
||||
update_values.push_back(columns[34] + " = '" + EscapeString(doors_entry.content_flags_disabled) + "'");
|
||||
update_values.push_back(columns[33] + " = '" + Strings::Escape(doors_entry.content_flags) + "'");
|
||||
update_values.push_back(columns[34] + " = '" + Strings::Escape(doors_entry.content_flags_disabled) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
doors_entry.id
|
||||
)
|
||||
@@ -375,9 +375,9 @@ public:
|
||||
|
||||
insert_values.push_back(std::to_string(doors_entry.id));
|
||||
insert_values.push_back(std::to_string(doors_entry.doorid));
|
||||
insert_values.push_back("'" + EscapeString(doors_entry.zone) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(doors_entry.zone) + "'");
|
||||
insert_values.push_back(std::to_string(doors_entry.version));
|
||||
insert_values.push_back("'" + EscapeString(doors_entry.name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(doors_entry.name) + "'");
|
||||
insert_values.push_back(std::to_string(doors_entry.pos_y));
|
||||
insert_values.push_back(std::to_string(doors_entry.pos_x));
|
||||
insert_values.push_back(std::to_string(doors_entry.pos_z));
|
||||
@@ -392,7 +392,7 @@ public:
|
||||
insert_values.push_back(std::to_string(doors_entry.disable_timer));
|
||||
insert_values.push_back(std::to_string(doors_entry.doorisopen));
|
||||
insert_values.push_back(std::to_string(doors_entry.door_param));
|
||||
insert_values.push_back("'" + EscapeString(doors_entry.dest_zone) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(doors_entry.dest_zone) + "'");
|
||||
insert_values.push_back(std::to_string(doors_entry.dest_instance));
|
||||
insert_values.push_back(std::to_string(doors_entry.dest_x));
|
||||
insert_values.push_back(std::to_string(doors_entry.dest_y));
|
||||
@@ -406,14 +406,14 @@ public:
|
||||
insert_values.push_back(std::to_string(doors_entry.is_ldon_door));
|
||||
insert_values.push_back(std::to_string(doors_entry.min_expansion));
|
||||
insert_values.push_back(std::to_string(doors_entry.max_expansion));
|
||||
insert_values.push_back("'" + EscapeString(doors_entry.content_flags) + "'");
|
||||
insert_values.push_back("'" + EscapeString(doors_entry.content_flags_disabled) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(doors_entry.content_flags) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(doors_entry.content_flags_disabled) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -439,9 +439,9 @@ public:
|
||||
|
||||
insert_values.push_back(std::to_string(doors_entry.id));
|
||||
insert_values.push_back(std::to_string(doors_entry.doorid));
|
||||
insert_values.push_back("'" + EscapeString(doors_entry.zone) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(doors_entry.zone) + "'");
|
||||
insert_values.push_back(std::to_string(doors_entry.version));
|
||||
insert_values.push_back("'" + EscapeString(doors_entry.name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(doors_entry.name) + "'");
|
||||
insert_values.push_back(std::to_string(doors_entry.pos_y));
|
||||
insert_values.push_back(std::to_string(doors_entry.pos_x));
|
||||
insert_values.push_back(std::to_string(doors_entry.pos_z));
|
||||
@@ -456,7 +456,7 @@ public:
|
||||
insert_values.push_back(std::to_string(doors_entry.disable_timer));
|
||||
insert_values.push_back(std::to_string(doors_entry.doorisopen));
|
||||
insert_values.push_back(std::to_string(doors_entry.door_param));
|
||||
insert_values.push_back("'" + EscapeString(doors_entry.dest_zone) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(doors_entry.dest_zone) + "'");
|
||||
insert_values.push_back(std::to_string(doors_entry.dest_instance));
|
||||
insert_values.push_back(std::to_string(doors_entry.dest_x));
|
||||
insert_values.push_back(std::to_string(doors_entry.dest_y));
|
||||
@@ -470,10 +470,10 @@ public:
|
||||
insert_values.push_back(std::to_string(doors_entry.is_ldon_door));
|
||||
insert_values.push_back(std::to_string(doors_entry.min_expansion));
|
||||
insert_values.push_back(std::to_string(doors_entry.max_expansion));
|
||||
insert_values.push_back("'" + EscapeString(doors_entry.content_flags) + "'");
|
||||
insert_values.push_back("'" + EscapeString(doors_entry.content_flags_disabled) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(doors_entry.content_flags) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(doors_entry.content_flags_disabled) + "'");
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -482,7 +482,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_DYNAMIC_ZONE_MEMBERS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseDynamicZoneMembersRepository {
|
||||
@@ -49,12 +49,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -165,7 +165,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
dynamic_zone_members_entry.id
|
||||
)
|
||||
@@ -189,7 +189,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -217,7 +217,7 @@ public:
|
||||
insert_values.push_back(std::to_string(dynamic_zone_members_entry.dynamic_zone_id));
|
||||
insert_values.push_back(std::to_string(dynamic_zone_members_entry.character_id));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -226,7 +226,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_DYNAMIC_ZONES_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseDynamicZonesRepository {
|
||||
@@ -106,12 +106,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -255,8 +255,8 @@ public:
|
||||
|
||||
update_values.push_back(columns[1] + " = " + std::to_string(dynamic_zones_entry.instance_id));
|
||||
update_values.push_back(columns[2] + " = " + std::to_string(dynamic_zones_entry.type));
|
||||
update_values.push_back(columns[3] + " = '" + EscapeString(dynamic_zones_entry.uuid) + "'");
|
||||
update_values.push_back(columns[4] + " = '" + EscapeString(dynamic_zones_entry.name) + "'");
|
||||
update_values.push_back(columns[3] + " = '" + Strings::Escape(dynamic_zones_entry.uuid) + "'");
|
||||
update_values.push_back(columns[4] + " = '" + Strings::Escape(dynamic_zones_entry.name) + "'");
|
||||
update_values.push_back(columns[5] + " = " + std::to_string(dynamic_zones_entry.leader_id));
|
||||
update_values.push_back(columns[6] + " = " + std::to_string(dynamic_zones_entry.min_players));
|
||||
update_values.push_back(columns[7] + " = " + std::to_string(dynamic_zones_entry.max_players));
|
||||
@@ -279,7 +279,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
dynamic_zones_entry.id
|
||||
)
|
||||
@@ -298,8 +298,8 @@ public:
|
||||
insert_values.push_back(std::to_string(dynamic_zones_entry.id));
|
||||
insert_values.push_back(std::to_string(dynamic_zones_entry.instance_id));
|
||||
insert_values.push_back(std::to_string(dynamic_zones_entry.type));
|
||||
insert_values.push_back("'" + EscapeString(dynamic_zones_entry.uuid) + "'");
|
||||
insert_values.push_back("'" + EscapeString(dynamic_zones_entry.name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(dynamic_zones_entry.uuid) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(dynamic_zones_entry.name) + "'");
|
||||
insert_values.push_back(std::to_string(dynamic_zones_entry.leader_id));
|
||||
insert_values.push_back(std::to_string(dynamic_zones_entry.min_players));
|
||||
insert_values.push_back(std::to_string(dynamic_zones_entry.max_players));
|
||||
@@ -322,7 +322,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -349,8 +349,8 @@ public:
|
||||
insert_values.push_back(std::to_string(dynamic_zones_entry.id));
|
||||
insert_values.push_back(std::to_string(dynamic_zones_entry.instance_id));
|
||||
insert_values.push_back(std::to_string(dynamic_zones_entry.type));
|
||||
insert_values.push_back("'" + EscapeString(dynamic_zones_entry.uuid) + "'");
|
||||
insert_values.push_back("'" + EscapeString(dynamic_zones_entry.name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(dynamic_zones_entry.uuid) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(dynamic_zones_entry.name) + "'");
|
||||
insert_values.push_back(std::to_string(dynamic_zones_entry.leader_id));
|
||||
insert_values.push_back(std::to_string(dynamic_zones_entry.min_players));
|
||||
insert_values.push_back(std::to_string(dynamic_zones_entry.max_players));
|
||||
@@ -369,7 +369,7 @@ public:
|
||||
insert_values.push_back(std::to_string(dynamic_zones_entry.zone_in_heading));
|
||||
insert_values.push_back(std::to_string(dynamic_zones_entry.has_zone_in));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -378,7 +378,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_EVENTLOG_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseEventlogRepository {
|
||||
@@ -70,12 +70,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -193,21 +193,21 @@ public:
|
||||
|
||||
auto columns = Columns();
|
||||
|
||||
update_values.push_back(columns[1] + " = '" + EscapeString(eventlog_entry.accountname) + "'");
|
||||
update_values.push_back(columns[1] + " = '" + Strings::Escape(eventlog_entry.accountname) + "'");
|
||||
update_values.push_back(columns[2] + " = " + std::to_string(eventlog_entry.accountid));
|
||||
update_values.push_back(columns[3] + " = " + std::to_string(eventlog_entry.status));
|
||||
update_values.push_back(columns[4] + " = '" + EscapeString(eventlog_entry.charname) + "'");
|
||||
update_values.push_back(columns[5] + " = '" + EscapeString(eventlog_entry.target) + "'");
|
||||
update_values.push_back(columns[6] + " = '" + EscapeString(eventlog_entry.time) + "'");
|
||||
update_values.push_back(columns[7] + " = '" + EscapeString(eventlog_entry.descriptiontype) + "'");
|
||||
update_values.push_back(columns[8] + " = '" + EscapeString(eventlog_entry.description) + "'");
|
||||
update_values.push_back(columns[4] + " = '" + Strings::Escape(eventlog_entry.charname) + "'");
|
||||
update_values.push_back(columns[5] + " = '" + Strings::Escape(eventlog_entry.target) + "'");
|
||||
update_values.push_back(columns[6] + " = '" + Strings::Escape(eventlog_entry.time) + "'");
|
||||
update_values.push_back(columns[7] + " = '" + Strings::Escape(eventlog_entry.descriptiontype) + "'");
|
||||
update_values.push_back(columns[8] + " = '" + Strings::Escape(eventlog_entry.description) + "'");
|
||||
update_values.push_back(columns[9] + " = " + std::to_string(eventlog_entry.event_nid));
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
eventlog_entry.id
|
||||
)
|
||||
@@ -224,21 +224,21 @@ public:
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
insert_values.push_back(std::to_string(eventlog_entry.id));
|
||||
insert_values.push_back("'" + EscapeString(eventlog_entry.accountname) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(eventlog_entry.accountname) + "'");
|
||||
insert_values.push_back(std::to_string(eventlog_entry.accountid));
|
||||
insert_values.push_back(std::to_string(eventlog_entry.status));
|
||||
insert_values.push_back("'" + EscapeString(eventlog_entry.charname) + "'");
|
||||
insert_values.push_back("'" + EscapeString(eventlog_entry.target) + "'");
|
||||
insert_values.push_back("'" + EscapeString(eventlog_entry.time) + "'");
|
||||
insert_values.push_back("'" + EscapeString(eventlog_entry.descriptiontype) + "'");
|
||||
insert_values.push_back("'" + EscapeString(eventlog_entry.description) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(eventlog_entry.charname) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(eventlog_entry.target) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(eventlog_entry.time) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(eventlog_entry.descriptiontype) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(eventlog_entry.description) + "'");
|
||||
insert_values.push_back(std::to_string(eventlog_entry.event_nid));
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -263,17 +263,17 @@ public:
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
insert_values.push_back(std::to_string(eventlog_entry.id));
|
||||
insert_values.push_back("'" + EscapeString(eventlog_entry.accountname) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(eventlog_entry.accountname) + "'");
|
||||
insert_values.push_back(std::to_string(eventlog_entry.accountid));
|
||||
insert_values.push_back(std::to_string(eventlog_entry.status));
|
||||
insert_values.push_back("'" + EscapeString(eventlog_entry.charname) + "'");
|
||||
insert_values.push_back("'" + EscapeString(eventlog_entry.target) + "'");
|
||||
insert_values.push_back("'" + EscapeString(eventlog_entry.time) + "'");
|
||||
insert_values.push_back("'" + EscapeString(eventlog_entry.descriptiontype) + "'");
|
||||
insert_values.push_back("'" + EscapeString(eventlog_entry.description) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(eventlog_entry.charname) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(eventlog_entry.target) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(eventlog_entry.time) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(eventlog_entry.descriptiontype) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(eventlog_entry.description) + "'");
|
||||
insert_values.push_back(std::to_string(eventlog_entry.event_nid));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -282,7 +282,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_EXPEDITION_LOCKOUTS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseExpeditionLockoutsRepository {
|
||||
@@ -58,12 +58,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -174,16 +174,16 @@ public:
|
||||
auto columns = Columns();
|
||||
|
||||
update_values.push_back(columns[1] + " = " + std::to_string(expedition_lockouts_entry.expedition_id));
|
||||
update_values.push_back(columns[2] + " = '" + EscapeString(expedition_lockouts_entry.event_name) + "'");
|
||||
update_values.push_back(columns[2] + " = '" + Strings::Escape(expedition_lockouts_entry.event_name) + "'");
|
||||
update_values.push_back(columns[3] + " = FROM_UNIXTIME(" + (expedition_lockouts_entry.expire_time > 0 ? std::to_string(expedition_lockouts_entry.expire_time) : "null") + ")");
|
||||
update_values.push_back(columns[4] + " = " + std::to_string(expedition_lockouts_entry.duration));
|
||||
update_values.push_back(columns[5] + " = '" + EscapeString(expedition_lockouts_entry.from_expedition_uuid) + "'");
|
||||
update_values.push_back(columns[5] + " = '" + Strings::Escape(expedition_lockouts_entry.from_expedition_uuid) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
expedition_lockouts_entry.id
|
||||
)
|
||||
@@ -201,16 +201,16 @@ public:
|
||||
|
||||
insert_values.push_back(std::to_string(expedition_lockouts_entry.id));
|
||||
insert_values.push_back(std::to_string(expedition_lockouts_entry.expedition_id));
|
||||
insert_values.push_back("'" + EscapeString(expedition_lockouts_entry.event_name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(expedition_lockouts_entry.event_name) + "'");
|
||||
insert_values.push_back("FROM_UNIXTIME(" + (expedition_lockouts_entry.expire_time > 0 ? std::to_string(expedition_lockouts_entry.expire_time) : "null") + ")");
|
||||
insert_values.push_back(std::to_string(expedition_lockouts_entry.duration));
|
||||
insert_values.push_back("'" + EscapeString(expedition_lockouts_entry.from_expedition_uuid) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(expedition_lockouts_entry.from_expedition_uuid) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -236,12 +236,12 @@ public:
|
||||
|
||||
insert_values.push_back(std::to_string(expedition_lockouts_entry.id));
|
||||
insert_values.push_back(std::to_string(expedition_lockouts_entry.expedition_id));
|
||||
insert_values.push_back("'" + EscapeString(expedition_lockouts_entry.event_name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(expedition_lockouts_entry.event_name) + "'");
|
||||
insert_values.push_back("FROM_UNIXTIME(" + (expedition_lockouts_entry.expire_time > 0 ? std::to_string(expedition_lockouts_entry.expire_time) : "null") + ")");
|
||||
insert_values.push_back(std::to_string(expedition_lockouts_entry.duration));
|
||||
insert_values.push_back("'" + EscapeString(expedition_lockouts_entry.from_expedition_uuid) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(expedition_lockouts_entry.from_expedition_uuid) + "'");
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -250,7 +250,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_EXPEDITIONS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseExpeditionsRepository {
|
||||
@@ -52,12 +52,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -171,7 +171,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
expeditions_entry.id
|
||||
)
|
||||
@@ -196,7 +196,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -225,7 +225,7 @@ public:
|
||||
insert_values.push_back(std::to_string(expeditions_entry.add_replay_on_join));
|
||||
insert_values.push_back(std::to_string(expeditions_entry.is_locked));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -234,7 +234,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_FACTION_BASE_DATA_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseFactionBaseDataRepository {
|
||||
@@ -58,12 +58,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -184,7 +184,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
faction_base_data_entry.client_faction_id
|
||||
)
|
||||
@@ -211,7 +211,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -242,7 +242,7 @@ public:
|
||||
insert_values.push_back(std::to_string(faction_base_data_entry.unk_hero2));
|
||||
insert_values.push_back(std::to_string(faction_base_data_entry.unk_hero3));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -251,7 +251,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_FACTION_LIST_MOD_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseFactionListModRepository {
|
||||
@@ -52,12 +52,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -165,13 +165,13 @@ public:
|
||||
|
||||
update_values.push_back(columns[1] + " = " + std::to_string(faction_list_mod_entry.faction_id));
|
||||
update_values.push_back(columns[2] + " = " + std::to_string(faction_list_mod_entry.mod));
|
||||
update_values.push_back(columns[3] + " = '" + EscapeString(faction_list_mod_entry.mod_name) + "'");
|
||||
update_values.push_back(columns[3] + " = '" + Strings::Escape(faction_list_mod_entry.mod_name) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
faction_list_mod_entry.id
|
||||
)
|
||||
@@ -190,13 +190,13 @@ public:
|
||||
insert_values.push_back(std::to_string(faction_list_mod_entry.id));
|
||||
insert_values.push_back(std::to_string(faction_list_mod_entry.faction_id));
|
||||
insert_values.push_back(std::to_string(faction_list_mod_entry.mod));
|
||||
insert_values.push_back("'" + EscapeString(faction_list_mod_entry.mod_name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(faction_list_mod_entry.mod_name) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -223,9 +223,9 @@ public:
|
||||
insert_values.push_back(std::to_string(faction_list_mod_entry.id));
|
||||
insert_values.push_back(std::to_string(faction_list_mod_entry.faction_id));
|
||||
insert_values.push_back(std::to_string(faction_list_mod_entry.mod));
|
||||
insert_values.push_back("'" + EscapeString(faction_list_mod_entry.mod_name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(faction_list_mod_entry.mod_name) + "'");
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -234,7 +234,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_FACTION_LIST_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseFactionListRepository {
|
||||
@@ -49,12 +49,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -159,14 +159,14 @@ public:
|
||||
auto columns = Columns();
|
||||
|
||||
update_values.push_back(columns[0] + " = " + std::to_string(faction_list_entry.id));
|
||||
update_values.push_back(columns[1] + " = '" + EscapeString(faction_list_entry.name) + "'");
|
||||
update_values.push_back(columns[1] + " = '" + Strings::Escape(faction_list_entry.name) + "'");
|
||||
update_values.push_back(columns[2] + " = " + std::to_string(faction_list_entry.base));
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
faction_list_entry.id
|
||||
)
|
||||
@@ -183,14 +183,14 @@ public:
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
insert_values.push_back(std::to_string(faction_list_entry.id));
|
||||
insert_values.push_back("'" + EscapeString(faction_list_entry.name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(faction_list_entry.name) + "'");
|
||||
insert_values.push_back(std::to_string(faction_list_entry.base));
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -215,10 +215,10 @@ public:
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
insert_values.push_back(std::to_string(faction_list_entry.id));
|
||||
insert_values.push_back("'" + EscapeString(faction_list_entry.name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(faction_list_entry.name) + "'");
|
||||
insert_values.push_back(std::to_string(faction_list_entry.base));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -227,7 +227,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_FACTION_VALUES_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseFactionValuesRepository {
|
||||
@@ -52,12 +52,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -172,7 +172,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
faction_values_entry.char_id
|
||||
)
|
||||
@@ -197,7 +197,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -226,7 +226,7 @@ public:
|
||||
insert_values.push_back(std::to_string(faction_values_entry.current_value));
|
||||
insert_values.push_back(std::to_string(faction_values_entry.temp));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -235,7 +235,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_FISHING_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseFishingRepository {
|
||||
@@ -73,12 +73,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -206,14 +206,14 @@ public:
|
||||
update_values.push_back(columns[6] + " = " + std::to_string(fishing_entry.npc_chance));
|
||||
update_values.push_back(columns[7] + " = " + std::to_string(fishing_entry.min_expansion));
|
||||
update_values.push_back(columns[8] + " = " + std::to_string(fishing_entry.max_expansion));
|
||||
update_values.push_back(columns[9] + " = '" + EscapeString(fishing_entry.content_flags) + "'");
|
||||
update_values.push_back(columns[10] + " = '" + EscapeString(fishing_entry.content_flags_disabled) + "'");
|
||||
update_values.push_back(columns[9] + " = '" + Strings::Escape(fishing_entry.content_flags) + "'");
|
||||
update_values.push_back(columns[10] + " = '" + Strings::Escape(fishing_entry.content_flags_disabled) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
fishing_entry.id
|
||||
)
|
||||
@@ -238,14 +238,14 @@ public:
|
||||
insert_values.push_back(std::to_string(fishing_entry.npc_chance));
|
||||
insert_values.push_back(std::to_string(fishing_entry.min_expansion));
|
||||
insert_values.push_back(std::to_string(fishing_entry.max_expansion));
|
||||
insert_values.push_back("'" + EscapeString(fishing_entry.content_flags) + "'");
|
||||
insert_values.push_back("'" + EscapeString(fishing_entry.content_flags_disabled) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(fishing_entry.content_flags) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(fishing_entry.content_flags_disabled) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -278,10 +278,10 @@ public:
|
||||
insert_values.push_back(std::to_string(fishing_entry.npc_chance));
|
||||
insert_values.push_back(std::to_string(fishing_entry.min_expansion));
|
||||
insert_values.push_back(std::to_string(fishing_entry.max_expansion));
|
||||
insert_values.push_back("'" + EscapeString(fishing_entry.content_flags) + "'");
|
||||
insert_values.push_back("'" + EscapeString(fishing_entry.content_flags_disabled) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(fishing_entry.content_flags) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(fishing_entry.content_flags_disabled) + "'");
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -290,7 +290,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_FORAGE_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseForageRepository {
|
||||
@@ -67,12 +67,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -194,14 +194,14 @@ public:
|
||||
update_values.push_back(columns[4] + " = " + std::to_string(forage_entry.chance));
|
||||
update_values.push_back(columns[5] + " = " + std::to_string(forage_entry.min_expansion));
|
||||
update_values.push_back(columns[6] + " = " + std::to_string(forage_entry.max_expansion));
|
||||
update_values.push_back(columns[7] + " = '" + EscapeString(forage_entry.content_flags) + "'");
|
||||
update_values.push_back(columns[8] + " = '" + EscapeString(forage_entry.content_flags_disabled) + "'");
|
||||
update_values.push_back(columns[7] + " = '" + Strings::Escape(forage_entry.content_flags) + "'");
|
||||
update_values.push_back(columns[8] + " = '" + Strings::Escape(forage_entry.content_flags_disabled) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
forage_entry.id
|
||||
)
|
||||
@@ -224,14 +224,14 @@ public:
|
||||
insert_values.push_back(std::to_string(forage_entry.chance));
|
||||
insert_values.push_back(std::to_string(forage_entry.min_expansion));
|
||||
insert_values.push_back(std::to_string(forage_entry.max_expansion));
|
||||
insert_values.push_back("'" + EscapeString(forage_entry.content_flags) + "'");
|
||||
insert_values.push_back("'" + EscapeString(forage_entry.content_flags_disabled) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(forage_entry.content_flags) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(forage_entry.content_flags_disabled) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -262,10 +262,10 @@ public:
|
||||
insert_values.push_back(std::to_string(forage_entry.chance));
|
||||
insert_values.push_back(std::to_string(forage_entry.min_expansion));
|
||||
insert_values.push_back(std::to_string(forage_entry.max_expansion));
|
||||
insert_values.push_back("'" + EscapeString(forage_entry.content_flags) + "'");
|
||||
insert_values.push_back("'" + EscapeString(forage_entry.content_flags_disabled) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(forage_entry.content_flags) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(forage_entry.content_flags_disabled) + "'");
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -274,7 +274,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_FRIENDS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseFriendsRepository {
|
||||
@@ -49,12 +49,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -160,13 +160,13 @@ public:
|
||||
|
||||
update_values.push_back(columns[0] + " = " + std::to_string(friends_entry.charid));
|
||||
update_values.push_back(columns[1] + " = " + std::to_string(friends_entry.type));
|
||||
update_values.push_back(columns[2] + " = '" + EscapeString(friends_entry.name) + "'");
|
||||
update_values.push_back(columns[2] + " = '" + Strings::Escape(friends_entry.name) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
friends_entry.charid
|
||||
)
|
||||
@@ -184,13 +184,13 @@ public:
|
||||
|
||||
insert_values.push_back(std::to_string(friends_entry.charid));
|
||||
insert_values.push_back(std::to_string(friends_entry.type));
|
||||
insert_values.push_back("'" + EscapeString(friends_entry.name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(friends_entry.name) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -216,9 +216,9 @@ public:
|
||||
|
||||
insert_values.push_back(std::to_string(friends_entry.charid));
|
||||
insert_values.push_back(std::to_string(friends_entry.type));
|
||||
insert_values.push_back("'" + EscapeString(friends_entry.name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(friends_entry.name) + "'");
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -227,7 +227,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_GLOBAL_LOOT_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseGlobalLootRepository {
|
||||
@@ -91,12 +91,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -228,28 +228,28 @@ public:
|
||||
|
||||
auto columns = Columns();
|
||||
|
||||
update_values.push_back(columns[1] + " = '" + EscapeString(global_loot_entry.description) + "'");
|
||||
update_values.push_back(columns[1] + " = '" + Strings::Escape(global_loot_entry.description) + "'");
|
||||
update_values.push_back(columns[2] + " = " + std::to_string(global_loot_entry.loottable_id));
|
||||
update_values.push_back(columns[3] + " = " + std::to_string(global_loot_entry.enabled));
|
||||
update_values.push_back(columns[4] + " = " + std::to_string(global_loot_entry.min_level));
|
||||
update_values.push_back(columns[5] + " = " + std::to_string(global_loot_entry.max_level));
|
||||
update_values.push_back(columns[6] + " = " + std::to_string(global_loot_entry.rare));
|
||||
update_values.push_back(columns[7] + " = " + std::to_string(global_loot_entry.raid));
|
||||
update_values.push_back(columns[8] + " = '" + EscapeString(global_loot_entry.race) + "'");
|
||||
update_values.push_back(columns[9] + " = '" + EscapeString(global_loot_entry.class_) + "'");
|
||||
update_values.push_back(columns[10] + " = '" + EscapeString(global_loot_entry.bodytype) + "'");
|
||||
update_values.push_back(columns[11] + " = '" + EscapeString(global_loot_entry.zone) + "'");
|
||||
update_values.push_back(columns[8] + " = '" + Strings::Escape(global_loot_entry.race) + "'");
|
||||
update_values.push_back(columns[9] + " = '" + Strings::Escape(global_loot_entry.class_) + "'");
|
||||
update_values.push_back(columns[10] + " = '" + Strings::Escape(global_loot_entry.bodytype) + "'");
|
||||
update_values.push_back(columns[11] + " = '" + Strings::Escape(global_loot_entry.zone) + "'");
|
||||
update_values.push_back(columns[12] + " = " + std::to_string(global_loot_entry.hot_zone));
|
||||
update_values.push_back(columns[13] + " = " + std::to_string(global_loot_entry.min_expansion));
|
||||
update_values.push_back(columns[14] + " = " + std::to_string(global_loot_entry.max_expansion));
|
||||
update_values.push_back(columns[15] + " = '" + EscapeString(global_loot_entry.content_flags) + "'");
|
||||
update_values.push_back(columns[16] + " = '" + EscapeString(global_loot_entry.content_flags_disabled) + "'");
|
||||
update_values.push_back(columns[15] + " = '" + Strings::Escape(global_loot_entry.content_flags) + "'");
|
||||
update_values.push_back(columns[16] + " = '" + Strings::Escape(global_loot_entry.content_flags_disabled) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
global_loot_entry.id
|
||||
)
|
||||
@@ -266,28 +266,28 @@ public:
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
insert_values.push_back(std::to_string(global_loot_entry.id));
|
||||
insert_values.push_back("'" + EscapeString(global_loot_entry.description) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(global_loot_entry.description) + "'");
|
||||
insert_values.push_back(std::to_string(global_loot_entry.loottable_id));
|
||||
insert_values.push_back(std::to_string(global_loot_entry.enabled));
|
||||
insert_values.push_back(std::to_string(global_loot_entry.min_level));
|
||||
insert_values.push_back(std::to_string(global_loot_entry.max_level));
|
||||
insert_values.push_back(std::to_string(global_loot_entry.rare));
|
||||
insert_values.push_back(std::to_string(global_loot_entry.raid));
|
||||
insert_values.push_back("'" + EscapeString(global_loot_entry.race) + "'");
|
||||
insert_values.push_back("'" + EscapeString(global_loot_entry.class_) + "'");
|
||||
insert_values.push_back("'" + EscapeString(global_loot_entry.bodytype) + "'");
|
||||
insert_values.push_back("'" + EscapeString(global_loot_entry.zone) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(global_loot_entry.race) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(global_loot_entry.class_) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(global_loot_entry.bodytype) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(global_loot_entry.zone) + "'");
|
||||
insert_values.push_back(std::to_string(global_loot_entry.hot_zone));
|
||||
insert_values.push_back(std::to_string(global_loot_entry.min_expansion));
|
||||
insert_values.push_back(std::to_string(global_loot_entry.max_expansion));
|
||||
insert_values.push_back("'" + EscapeString(global_loot_entry.content_flags) + "'");
|
||||
insert_values.push_back("'" + EscapeString(global_loot_entry.content_flags_disabled) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(global_loot_entry.content_flags) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(global_loot_entry.content_flags_disabled) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -312,24 +312,24 @@ public:
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
insert_values.push_back(std::to_string(global_loot_entry.id));
|
||||
insert_values.push_back("'" + EscapeString(global_loot_entry.description) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(global_loot_entry.description) + "'");
|
||||
insert_values.push_back(std::to_string(global_loot_entry.loottable_id));
|
||||
insert_values.push_back(std::to_string(global_loot_entry.enabled));
|
||||
insert_values.push_back(std::to_string(global_loot_entry.min_level));
|
||||
insert_values.push_back(std::to_string(global_loot_entry.max_level));
|
||||
insert_values.push_back(std::to_string(global_loot_entry.rare));
|
||||
insert_values.push_back(std::to_string(global_loot_entry.raid));
|
||||
insert_values.push_back("'" + EscapeString(global_loot_entry.race) + "'");
|
||||
insert_values.push_back("'" + EscapeString(global_loot_entry.class_) + "'");
|
||||
insert_values.push_back("'" + EscapeString(global_loot_entry.bodytype) + "'");
|
||||
insert_values.push_back("'" + EscapeString(global_loot_entry.zone) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(global_loot_entry.race) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(global_loot_entry.class_) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(global_loot_entry.bodytype) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(global_loot_entry.zone) + "'");
|
||||
insert_values.push_back(std::to_string(global_loot_entry.hot_zone));
|
||||
insert_values.push_back(std::to_string(global_loot_entry.min_expansion));
|
||||
insert_values.push_back(std::to_string(global_loot_entry.max_expansion));
|
||||
insert_values.push_back("'" + EscapeString(global_loot_entry.content_flags) + "'");
|
||||
insert_values.push_back("'" + EscapeString(global_loot_entry.content_flags_disabled) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(global_loot_entry.content_flags) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(global_loot_entry.content_flags_disabled) + "'");
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -338,7 +338,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_GM_IPS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseGmIpsRepository {
|
||||
@@ -49,12 +49,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -158,15 +158,15 @@ public:
|
||||
|
||||
auto columns = Columns();
|
||||
|
||||
update_values.push_back(columns[0] + " = '" + EscapeString(gm_ips_entry.name) + "'");
|
||||
update_values.push_back(columns[0] + " = '" + Strings::Escape(gm_ips_entry.name) + "'");
|
||||
update_values.push_back(columns[1] + " = " + std::to_string(gm_ips_entry.account_id));
|
||||
update_values.push_back(columns[2] + " = '" + EscapeString(gm_ips_entry.ip_address) + "'");
|
||||
update_values.push_back(columns[2] + " = '" + Strings::Escape(gm_ips_entry.ip_address) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
gm_ips_entry.account_id
|
||||
)
|
||||
@@ -182,15 +182,15 @@ public:
|
||||
{
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
insert_values.push_back("'" + EscapeString(gm_ips_entry.name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(gm_ips_entry.name) + "'");
|
||||
insert_values.push_back(std::to_string(gm_ips_entry.account_id));
|
||||
insert_values.push_back("'" + EscapeString(gm_ips_entry.ip_address) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(gm_ips_entry.ip_address) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -214,11 +214,11 @@ public:
|
||||
for (auto &gm_ips_entry: gm_ips_entries) {
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
insert_values.push_back("'" + EscapeString(gm_ips_entry.name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(gm_ips_entry.name) + "'");
|
||||
insert_values.push_back(std::to_string(gm_ips_entry.account_id));
|
||||
insert_values.push_back("'" + EscapeString(gm_ips_entry.ip_address) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(gm_ips_entry.ip_address) + "'");
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -227,7 +227,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_GOALLISTS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseGoallistsRepository {
|
||||
@@ -46,12 +46,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -160,7 +160,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
goallists_entry.listid
|
||||
)
|
||||
@@ -183,7 +183,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -210,7 +210,7 @@ public:
|
||||
insert_values.push_back(std::to_string(goallists_entry.listid));
|
||||
insert_values.push_back(std::to_string(goallists_entry.entry));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -219,7 +219,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_GRAVEYARD_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseGraveyardRepository {
|
||||
@@ -58,12 +58,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -183,7 +183,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
graveyard_entry.id
|
||||
)
|
||||
@@ -210,7 +210,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -241,7 +241,7 @@ public:
|
||||
insert_values.push_back(std::to_string(graveyard_entry.z));
|
||||
insert_values.push_back(std::to_string(graveyard_entry.heading));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -250,7 +250,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#define EQEMU_BASE_GRID_ENTRIES_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
|
||||
class BaseGridEntriesRepository {
|
||||
public:
|
||||
@@ -68,7 +68,7 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string InsertColumnsRaw()
|
||||
@@ -83,7 +83,7 @@ public:
|
||||
insert_columns.push_back(column);
|
||||
}
|
||||
|
||||
return std::string(implode(", ", insert_columns));
|
||||
return std::string(Strings::Implode(", ", insert_columns));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -207,7 +207,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
grid_entries_entry.number
|
||||
)
|
||||
@@ -233,7 +233,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -263,7 +263,7 @@ public:
|
||||
insert_values.push_back(std::to_string(grid_entries_entry.pause));
|
||||
insert_values.push_back(std::to_string(grid_entries_entry.centerpoint));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -272,7 +272,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
#define EQEMU_BASE_GRID_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
|
||||
class BaseGridRepository {
|
||||
public:
|
||||
@@ -58,7 +58,7 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string InsertColumnsRaw()
|
||||
@@ -73,7 +73,7 @@ public:
|
||||
insert_columns.push_back(column);
|
||||
}
|
||||
|
||||
return std::string(implode(", ", insert_columns));
|
||||
return std::string(Strings::Implode(", ", insert_columns));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -185,7 +185,7 @@ public:
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
grid_entry.id
|
||||
)
|
||||
@@ -209,7 +209,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -237,7 +237,7 @@ public:
|
||||
insert_values.push_back(std::to_string(grid_entry.type));
|
||||
insert_values.push_back(std::to_string(grid_entry.type2));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -246,7 +246,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#define EQEMU_BASE_GROUND_SPAWNS_REPOSITORY_H
|
||||
|
||||
#include "../../database.h"
|
||||
#include "../../string_util.h"
|
||||
#include "../../strings.h"
|
||||
#include <ctime>
|
||||
|
||||
class BaseGroundSpawnsRepository {
|
||||
@@ -94,12 +94,12 @@ public:
|
||||
|
||||
static std::string ColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", Columns()));
|
||||
return std::string(Strings::Implode(", ", Columns()));
|
||||
}
|
||||
|
||||
static std::string SelectColumnsRaw()
|
||||
{
|
||||
return std::string(implode(", ", SelectColumns()));
|
||||
return std::string(Strings::Implode(", ", SelectColumns()));
|
||||
}
|
||||
|
||||
static std::string TableName()
|
||||
@@ -241,21 +241,21 @@ public:
|
||||
update_values.push_back(columns[6] + " = " + std::to_string(ground_spawns_entry.min_x));
|
||||
update_values.push_back(columns[7] + " = " + std::to_string(ground_spawns_entry.min_y));
|
||||
update_values.push_back(columns[8] + " = " + std::to_string(ground_spawns_entry.heading));
|
||||
update_values.push_back(columns[9] + " = '" + EscapeString(ground_spawns_entry.name) + "'");
|
||||
update_values.push_back(columns[9] + " = '" + Strings::Escape(ground_spawns_entry.name) + "'");
|
||||
update_values.push_back(columns[10] + " = " + std::to_string(ground_spawns_entry.item));
|
||||
update_values.push_back(columns[11] + " = " + std::to_string(ground_spawns_entry.max_allowed));
|
||||
update_values.push_back(columns[12] + " = '" + EscapeString(ground_spawns_entry.comment) + "'");
|
||||
update_values.push_back(columns[12] + " = '" + Strings::Escape(ground_spawns_entry.comment) + "'");
|
||||
update_values.push_back(columns[13] + " = " + std::to_string(ground_spawns_entry.respawn_timer));
|
||||
update_values.push_back(columns[14] + " = " + std::to_string(ground_spawns_entry.min_expansion));
|
||||
update_values.push_back(columns[15] + " = " + std::to_string(ground_spawns_entry.max_expansion));
|
||||
update_values.push_back(columns[16] + " = '" + EscapeString(ground_spawns_entry.content_flags) + "'");
|
||||
update_values.push_back(columns[17] + " = '" + EscapeString(ground_spawns_entry.content_flags_disabled) + "'");
|
||||
update_values.push_back(columns[16] + " = '" + Strings::Escape(ground_spawns_entry.content_flags) + "'");
|
||||
update_values.push_back(columns[17] + " = '" + Strings::Escape(ground_spawns_entry.content_flags_disabled) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"UPDATE {} SET {} WHERE {} = {}",
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
Strings::Implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
ground_spawns_entry.id
|
||||
)
|
||||
@@ -280,21 +280,21 @@ public:
|
||||
insert_values.push_back(std::to_string(ground_spawns_entry.min_x));
|
||||
insert_values.push_back(std::to_string(ground_spawns_entry.min_y));
|
||||
insert_values.push_back(std::to_string(ground_spawns_entry.heading));
|
||||
insert_values.push_back("'" + EscapeString(ground_spawns_entry.name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(ground_spawns_entry.name) + "'");
|
||||
insert_values.push_back(std::to_string(ground_spawns_entry.item));
|
||||
insert_values.push_back(std::to_string(ground_spawns_entry.max_allowed));
|
||||
insert_values.push_back("'" + EscapeString(ground_spawns_entry.comment) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(ground_spawns_entry.comment) + "'");
|
||||
insert_values.push_back(std::to_string(ground_spawns_entry.respawn_timer));
|
||||
insert_values.push_back(std::to_string(ground_spawns_entry.min_expansion));
|
||||
insert_values.push_back(std::to_string(ground_spawns_entry.max_expansion));
|
||||
insert_values.push_back("'" + EscapeString(ground_spawns_entry.content_flags) + "'");
|
||||
insert_values.push_back("'" + EscapeString(ground_spawns_entry.content_flags_disabled) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(ground_spawns_entry.content_flags) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(ground_spawns_entry.content_flags_disabled) + "'");
|
||||
|
||||
auto results = db.QueryDatabase(
|
||||
fmt::format(
|
||||
"{} VALUES ({})",
|
||||
BaseInsert(),
|
||||
implode(",", insert_values)
|
||||
Strings::Implode(",", insert_values)
|
||||
)
|
||||
);
|
||||
|
||||
@@ -327,17 +327,17 @@ public:
|
||||
insert_values.push_back(std::to_string(ground_spawns_entry.min_x));
|
||||
insert_values.push_back(std::to_string(ground_spawns_entry.min_y));
|
||||
insert_values.push_back(std::to_string(ground_spawns_entry.heading));
|
||||
insert_values.push_back("'" + EscapeString(ground_spawns_entry.name) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(ground_spawns_entry.name) + "'");
|
||||
insert_values.push_back(std::to_string(ground_spawns_entry.item));
|
||||
insert_values.push_back(std::to_string(ground_spawns_entry.max_allowed));
|
||||
insert_values.push_back("'" + EscapeString(ground_spawns_entry.comment) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(ground_spawns_entry.comment) + "'");
|
||||
insert_values.push_back(std::to_string(ground_spawns_entry.respawn_timer));
|
||||
insert_values.push_back(std::to_string(ground_spawns_entry.min_expansion));
|
||||
insert_values.push_back(std::to_string(ground_spawns_entry.max_expansion));
|
||||
insert_values.push_back("'" + EscapeString(ground_spawns_entry.content_flags) + "'");
|
||||
insert_values.push_back("'" + EscapeString(ground_spawns_entry.content_flags_disabled) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(ground_spawns_entry.content_flags) + "'");
|
||||
insert_values.push_back("'" + Strings::Escape(ground_spawns_entry.content_flags_disabled) + "'");
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
insert_chunks.push_back("(" + Strings::Implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
std::vector<std::string> insert_values;
|
||||
@@ -346,7 +346,7 @@ public:
|
||||
fmt::format(
|
||||
"{} VALUES {}",
|
||||
BaseInsert(),
|
||||
implode(",", insert_chunks)
|
||||
Strings::Implode(",", insert_chunks)
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user