Repository tweaks [skip ci]

This commit is contained in:
Akkadius 2020-04-11 02:47:54 -05:00
parent 5c7eb0707f
commit e0363a8fe1
173 changed files with 1185 additions and 3011 deletions

View File

@ -132,10 +132,8 @@ SET(repositories
repositories/base/base_adventure_template_entry_flavor_repository.h
repositories/base/base_alternate_currency_repository.h
repositories/base/base_auras_repository.h
repositories/base/base_banned_ips_repository.h
repositories/base/base_base_data_repository.h
repositories/base/base_blocked_spells_repository.h
repositories/base/base_books_repository.h
repositories/base/base_bugs_repository.h
repositories/base/base_bug_reports_repository.h
repositories/base/base_buyer_repository.h
@ -164,12 +162,9 @@ SET(repositories
repositories/base/base_character_skills_repository.h
repositories/base/base_character_spells_repository.h
repositories/base/base_character_tasks_repository.h
repositories/base/base_character_tribute_repository.h
repositories/base/base_char_create_combinations_repository.h
repositories/base/base_char_create_point_allocations_repository.h
repositories/base/base_char_recipe_list_repository.h
repositories/base/base_chatchannels_repository.h
repositories/base/base_command_settings_repository.h
repositories/base/base_completed_tasks_repository.h
repositories/base/base_data_buckets_repository.h
repositories/base/base_db_str_repository.h
@ -197,7 +192,6 @@ SET(repositories
repositories/base/base_guild_ranks_repository.h
repositories/base/base_guild_relations_repository.h
repositories/base/base_hackers_repository.h
repositories/base/base_horses_repository.h
repositories/base/base_instance_list_repository.h
repositories/base/base_instance_list_player_repository.h
repositories/base/base_inventory_repository.h
@ -205,8 +199,6 @@ SET(repositories
repositories/base/base_ip_exemptions_repository.h
repositories/base/base_items_repository.h
repositories/base/base_item_tick_repository.h
repositories/base/base_launcher_repository.h
repositories/base/base_launcher_zones_repository.h
repositories/base/base_ldon_trap_entries_repository.h
repositories/base/base_ldon_trap_templates_repository.h
repositories/base/base_level_exp_mods_repository.h
@ -297,10 +289,8 @@ SET(repositories
repositories/adventure_template_entry_flavor_repository.h
repositories/alternate_currency_repository.h
repositories/auras_repository.h
repositories/banned_ips_repository.h
repositories/base_data_repository.h
repositories/blocked_spells_repository.h
repositories/books_repository.h
repositories/bugs_repository.h
repositories/bug_reports_repository.h
repositories/buyer_repository.h
@ -329,12 +319,9 @@ SET(repositories
repositories/character_skills_repository.h
repositories/character_spells_repository.h
repositories/character_tasks_repository.h
repositories/character_tribute_repository.h
repositories/char_create_combinations_repository.h
repositories/char_create_point_allocations_repository.h
repositories/char_recipe_list_repository.h
repositories/chatchannels_repository.h
repositories/command_settings_repository.h
repositories/completed_tasks_repository.h
repositories/data_buckets_repository.h
repositories/db_str_repository.h
@ -362,7 +349,6 @@ SET(repositories
repositories/guild_ranks_repository.h
repositories/guild_relations_repository.h
repositories/hackers_repository.h
repositories/horses_repository.h
repositories/instance_list_repository.h
repositories/instance_list_player_repository.h
repositories/inventory_repository.h
@ -370,8 +356,6 @@ SET(repositories
repositories/ip_exemptions_repository.h
repositories/items_repository.h
repositories/item_tick_repository.h
repositories/launcher_repository.h
repositories/launcher_zones_repository.h
repositories/ldon_trap_entries_repository.h
repositories/ldon_trap_templates_repository.h
repositories/level_exp_mods_repository.h

View File

@ -1,68 +0,0 @@
/**
* EQEmulator: Everquest Server Emulator
* Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY except by those people which sell it, which
* are required to give you total support for your newly bought product;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#ifndef EQEMU_BANNED_IPS_REPOSITORY_H
#define EQEMU_BANNED_IPS_REPOSITORY_H
#include "../database.h"
#include "../string_util.h"
#include "base/base_banned_ips_repository.h"
class BannedIpsRepository: public BaseBannedIpsRepository {
public:
/**
* This file was auto generated on Apr 5, 2020 and can be modified and extended upon
*
* Base repository methods are automatically
* generated in the "base" version of this repository. The base repository
* is immutable and to be left untouched, while methods in this class
* are used as extension methods for more specific persistence-layer
* accessors or mutators
*
* Base Methods (Subject to be expanded upon in time)
*
* InsertOne
* UpdateOne
* DeleteOne
* FindOne
* GetWhere(std::string where_filter)
* DeleteWhere(std::string where_filter)
* InsertMany
* All
*
* Example custom methods in a repository
*
* BannedIpsRepository::GetByZoneAndVersion(int zone_id, int zone_version)
* BannedIpsRepository::GetWhereNeverExpires()
* BannedIpsRepository::GetWhereXAndY()
* BannedIpsRepository::DeleteWhereXAndY()
*
* Most of the above could be covered by base methods, but if you as a developer
* find yourself re-using logic for other parts of the code, its best to just make a
* method that can be re-used easily elsewhere especially if it can use a base repository
* method and encapsulate filters there
*/
// Custom extended repository methods here
};
#endif //EQEMU_BANNED_IPS_REPOSITORY_H

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -216,6 +216,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[2] + " = " + std::to_string(aa_ability_entry.category));
update_values.push_back(columns[3] + " = " + std::to_string(aa_ability_entry.classes));
@ -249,6 +250,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(std::to_string(aa_ability_entry.category));
insert_values.push_back(std::to_string(aa_ability_entry.classes));
@ -290,6 +292,7 @@ public:
for (auto &aa_ability_entry: aa_ability_entries) {
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(std::to_string(aa_ability_entry.category));
insert_values.push_back(std::to_string(aa_ability_entry.classes));

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -44,7 +44,7 @@ public:
static std::string PrimaryKey()
{
return std::string("slot");
return std::string("rank_id");
}
static std::vector<std::string> Columns()
@ -120,7 +120,7 @@ public:
)
{
for (auto &aa_rank_effects : aa_rank_effectss) {
if (aa_rank_effects.slot == aa_rank_effects_id) {
if (aa_rank_effects.rank_id == aa_rank_effects_id) {
return aa_rank_effects;
}
}
@ -180,6 +180,8 @@ public:
auto columns = Columns();
update_values.push_back(columns[0] + " = " + std::to_string(aa_rank_effects_entry.rank_id));
update_values.push_back(columns[1] + " = " + std::to_string(aa_rank_effects_entry.slot));
update_values.push_back(columns[2] + " = " + std::to_string(aa_rank_effects_entry.effect_id));
update_values.push_back(columns[3] + " = " + std::to_string(aa_rank_effects_entry.base1));
update_values.push_back(columns[4] + " = " + std::to_string(aa_rank_effects_entry.base2));
@ -190,7 +192,7 @@ public:
TableName(),
implode(", ", update_values),
PrimaryKey(),
aa_rank_effects_entry.slot
aa_rank_effects_entry.rank_id
)
);
@ -203,6 +205,8 @@ public:
{
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(aa_rank_effects_entry.rank_id));
insert_values.push_back(std::to_string(aa_rank_effects_entry.slot));
insert_values.push_back(std::to_string(aa_rank_effects_entry.effect_id));
insert_values.push_back(std::to_string(aa_rank_effects_entry.base1));
insert_values.push_back(std::to_string(aa_rank_effects_entry.base2));
@ -216,7 +220,7 @@ public:
);
if (results.Success()) {
aa_rank_effects_entry.id = results.LastInsertedID();
aa_rank_effects_entry.rank_id = results.LastInsertedID();
return aa_rank_effects_entry;
}
@ -234,6 +238,8 @@ public:
for (auto &aa_rank_effects_entry: aa_rank_effects_entries) {
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(aa_rank_effects_entry.rank_id));
insert_values.push_back(std::to_string(aa_rank_effects_entry.slot));
insert_values.push_back(std::to_string(aa_rank_effects_entry.effect_id));
insert_values.push_back(std::to_string(aa_rank_effects_entry.base1));
insert_values.push_back(std::to_string(aa_rank_effects_entry.base2));

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -42,7 +42,7 @@ public:
static std::string PrimaryKey()
{
return std::string("aa_id");
return std::string("rank_id");
}
static std::vector<std::string> Columns()
@ -114,7 +114,7 @@ public:
)
{
for (auto &aa_rank_prereqs : aa_rank_prereqss) {
if (aa_rank_prereqs.aa_id == aa_rank_prereqs_id) {
if (aa_rank_prereqs.rank_id == aa_rank_prereqs_id) {
return aa_rank_prereqs;
}
}
@ -172,6 +172,8 @@ public:
auto columns = Columns();
update_values.push_back(columns[0] + " = " + std::to_string(aa_rank_prereqs_entry.rank_id));
update_values.push_back(columns[1] + " = " + std::to_string(aa_rank_prereqs_entry.aa_id));
update_values.push_back(columns[2] + " = " + std::to_string(aa_rank_prereqs_entry.points));
auto results = content_db.QueryDatabase(
@ -180,7 +182,7 @@ public:
TableName(),
implode(", ", update_values),
PrimaryKey(),
aa_rank_prereqs_entry.aa_id
aa_rank_prereqs_entry.rank_id
)
);
@ -193,6 +195,8 @@ public:
{
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(aa_rank_prereqs_entry.rank_id));
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));
auto results = content_db.QueryDatabase(
@ -204,7 +208,7 @@ public:
);
if (results.Success()) {
aa_rank_prereqs_entry.id = results.LastInsertedID();
aa_rank_prereqs_entry.rank_id = results.LastInsertedID();
return aa_rank_prereqs_entry;
}
@ -222,6 +226,8 @@ public:
for (auto &aa_rank_prereqs_entry: aa_rank_prereqs_entries) {
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(aa_rank_prereqs_entry.rank_id));
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) + ")");

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -212,6 +212,7 @@ public:
auto columns = Columns();
update_values.push_back(columns[0] + " = " + std::to_string(aa_ranks_entry.id));
update_values.push_back(columns[1] + " = " + std::to_string(aa_ranks_entry.upper_hotkey_sid));
update_values.push_back(columns[2] + " = " + std::to_string(aa_ranks_entry.lower_hotkey_sid));
update_values.push_back(columns[3] + " = " + std::to_string(aa_ranks_entry.title_sid));
@ -244,6 +245,7 @@ public:
{
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(aa_ranks_entry.id));
insert_values.push_back(std::to_string(aa_ranks_entry.upper_hotkey_sid));
insert_values.push_back(std::to_string(aa_ranks_entry.lower_hotkey_sid));
insert_values.push_back(std::to_string(aa_ranks_entry.title_sid));
@ -284,6 +286,7 @@ public:
for (auto &aa_ranks_entry: aa_ranks_entries) {
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(aa_ranks_entry.id));
insert_values.push_back(std::to_string(aa_ranks_entry.upper_hotkey_sid));
insert_values.push_back(std::to_string(aa_ranks_entry.lower_hotkey_sid));
insert_values.push_back(std::to_string(aa_ranks_entry.title_sid));

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -42,7 +42,7 @@ public:
static std::string PrimaryKey()
{
return std::string("p_flag");
return std::string("p_accid");
}
static std::vector<std::string> Columns()
@ -114,7 +114,7 @@ public:
)
{
for (auto &account_flags : account_flagss) {
if (account_flags.p_flag == account_flags_id) {
if (account_flags.p_accid == account_flags_id) {
return account_flags;
}
}
@ -172,6 +172,8 @@ 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) + "'");
auto results = database.QueryDatabase(
@ -180,7 +182,7 @@ public:
TableName(),
implode(", ", update_values),
PrimaryKey(),
account_flags_entry.p_flag
account_flags_entry.p_accid
)
);
@ -193,6 +195,8 @@ 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) + "'");
auto results = database.QueryDatabase(
@ -204,7 +208,7 @@ public:
);
if (results.Success()) {
account_flags_entry.id = results.LastInsertedID();
account_flags_entry.p_accid = results.LastInsertedID();
return account_flags_entry;
}
@ -222,6 +226,8 @@ public:
for (auto &account_flags_entry: account_flags_entries) {
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_chunks.push_back("(" + implode(",", insert_values) + ")");

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -43,7 +43,7 @@ public:
static std::string PrimaryKey()
{
return std::string("ip");
return std::string("accid");
}
static std::vector<std::string> Columns()
@ -117,7 +117,7 @@ public:
)
{
for (auto &account_ip : account_ips) {
if (account_ip.ip == account_ip_id) {
if (account_ip.accid == account_ip_id) {
return account_ip;
}
}
@ -176,6 +176,8 @@ 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[2] + " = " + std::to_string(account_ip_entry.count));
update_values.push_back(columns[3] + " = '" + EscapeString(account_ip_entry.lastused) + "'");
@ -185,7 +187,7 @@ public:
TableName(),
implode(", ", update_values),
PrimaryKey(),
account_ip_entry.ip
account_ip_entry.accid
)
);
@ -198,6 +200,8 @@ 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(std::to_string(account_ip_entry.count));
insert_values.push_back("'" + EscapeString(account_ip_entry.lastused) + "'");
@ -210,7 +214,7 @@ public:
);
if (results.Success()) {
account_ip_entry.id = results.LastInsertedID();
account_ip_entry.accid = results.LastInsertedID();
return account_ip_entry;
}
@ -228,6 +232,8 @@ public:
for (auto &account_ip_entry: account_ip_entries) {
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(std::to_string(account_ip_entry.count));
insert_values.push_back("'" + EscapeString(account_ip_entry.lastused) + "'");

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -42,7 +42,7 @@ public:
static std::string PrimaryKey()
{
return std::string("reward_id");
return std::string("account_id");
}
static std::vector<std::string> Columns()
@ -114,7 +114,7 @@ public:
)
{
for (auto &account_rewards : account_rewardss) {
if (account_rewards.reward_id == account_rewards_id) {
if (account_rewards.account_id == account_rewards_id) {
return account_rewards;
}
}
@ -172,6 +172,8 @@ public:
auto columns = Columns();
update_values.push_back(columns[0] + " = " + std::to_string(account_rewards_entry.account_id));
update_values.push_back(columns[1] + " = " + std::to_string(account_rewards_entry.reward_id));
update_values.push_back(columns[2] + " = " + std::to_string(account_rewards_entry.amount));
auto results = database.QueryDatabase(
@ -180,7 +182,7 @@ public:
TableName(),
implode(", ", update_values),
PrimaryKey(),
account_rewards_entry.reward_id
account_rewards_entry.account_id
)
);
@ -193,6 +195,8 @@ public:
{
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(account_rewards_entry.account_id));
insert_values.push_back(std::to_string(account_rewards_entry.reward_id));
insert_values.push_back(std::to_string(account_rewards_entry.amount));
auto results = database.QueryDatabase(
@ -204,7 +208,7 @@ public:
);
if (results.Success()) {
account_rewards_entry.id = results.LastInsertedID();
account_rewards_entry.account_id = results.LastInsertedID();
return account_rewards_entry;
}
@ -222,6 +226,8 @@ public:
for (auto &account_rewards_entry: account_rewards_entries) {
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(account_rewards_entry.account_id));
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) + ")");

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -169,6 +169,7 @@ public:
auto columns = Columns();
update_values.push_back(columns[0] + " = " + std::to_string(adventure_members_entry.id));
update_values.push_back(columns[1] + " = " + std::to_string(adventure_members_entry.charid));
auto results = database.QueryDatabase(
fmt::format(
@ -190,6 +191,7 @@ public:
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(adventure_members_entry.id));
insert_values.push_back(std::to_string(adventure_members_entry.charid));
auto results = database.QueryDatabase(
fmt::format(
@ -200,7 +202,7 @@ public:
);
if (results.Success()) {
adventure_members_entry.id = results.LastInsertedID();
adventure_members_entry.charid = results.LastInsertedID();
return adventure_members_entry;
}
@ -219,6 +221,7 @@ public:
std::vector<std::string> insert_values;
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) + ")");
}

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -204,6 +204,7 @@ public:
auto columns = Columns();
update_values.push_back(columns[0] + " = " + std::to_string(adventure_stats_entry.player_id));
update_values.push_back(columns[1] + " = " + std::to_string(adventure_stats_entry.guk_wins));
update_values.push_back(columns[2] + " = " + std::to_string(adventure_stats_entry.mir_wins));
update_values.push_back(columns[3] + " = " + std::to_string(adventure_stats_entry.mmc_wins));
@ -234,6 +235,7 @@ public:
{
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(adventure_stats_entry.player_id));
insert_values.push_back(std::to_string(adventure_stats_entry.guk_wins));
insert_values.push_back(std::to_string(adventure_stats_entry.mir_wins));
insert_values.push_back(std::to_string(adventure_stats_entry.mmc_wins));
@ -254,7 +256,7 @@ public:
);
if (results.Success()) {
adventure_stats_entry.id = results.LastInsertedID();
adventure_stats_entry.player_id = results.LastInsertedID();
return adventure_stats_entry;
}
@ -272,6 +274,7 @@ public:
for (auto &adventure_stats_entry: adventure_stats_entries) {
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(adventure_stats_entry.player_id));
insert_values.push_back(std::to_string(adventure_stats_entry.guk_wins));
insert_values.push_back(std::to_string(adventure_stats_entry.mir_wins));
insert_values.push_back(std::to_string(adventure_stats_entry.mmc_wins));

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -168,6 +168,7 @@ 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) + "'");
auto results = content_db.QueryDatabase(
@ -189,6 +190,7 @@ 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) + "'");
auto results = content_db.QueryDatabase(
@ -218,6 +220,7 @@ public:
for (auto &adventure_template_entry_flavor_entry: adventure_template_entry_flavor_entries) {
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_chunks.push_back("(" + implode(",", insert_values) + ")");

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -41,7 +41,7 @@ public:
static std::string PrimaryKey()
{
return std::string("template_id");
return std::string("id");
}
static std::vector<std::string> Columns()
@ -111,7 +111,7 @@ public:
)
{
for (auto &adventure_template_entry : adventure_template_entrys) {
if (adventure_template_entry.template_id == adventure_template_entry_id) {
if (adventure_template_entry.id == adventure_template_entry_id) {
return adventure_template_entry;
}
}
@ -168,7 +168,8 @@ public:
auto columns = Columns();
update_values.push_back(columns[0] + " = " + std::to_string(adventure_template_entry_entry.id));
update_values.push_back(columns[1] + " = " + std::to_string(adventure_template_entry_entry.template_id));
auto results = content_db.QueryDatabase(
fmt::format(
@ -176,7 +177,7 @@ public:
TableName(),
implode(", ", update_values),
PrimaryKey(),
adventure_template_entry_entry.template_id
adventure_template_entry_entry.id
)
);
@ -189,7 +190,8 @@ public:
{
std::vector<std::string> insert_values;
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));
auto results = content_db.QueryDatabase(
fmt::format(
@ -218,7 +220,8 @@ public:
for (auto &adventure_template_entry_entry: adventure_template_entry_entries) {
std::vector<std::string> insert_values;
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) + ")");
}

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -292,6 +292,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[2] + " = " + std::to_string(adventure_template_entry.zone_version));
update_values.push_back(columns[3] + " = " + std::to_string(adventure_template_entry.is_hard));
@ -344,6 +345,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(std::to_string(adventure_template_entry.zone_version));
insert_values.push_back(std::to_string(adventure_template_entry.is_hard));
@ -404,6 +406,7 @@ public:
for (auto &adventure_template_entry: adventure_template_entries) {
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(std::to_string(adventure_template_entry.zone_version));
insert_values.push_back(std::to_string(adventure_template_entry.is_hard));

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -168,6 +168,7 @@ public:
auto columns = Columns();
update_values.push_back(columns[0] + " = " + std::to_string(alternate_currency_entry.id));
update_values.push_back(columns[1] + " = " + std::to_string(alternate_currency_entry.item_id));
auto results = content_db.QueryDatabase(
@ -189,6 +190,7 @@ public:
{
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(alternate_currency_entry.id));
insert_values.push_back(std::to_string(alternate_currency_entry.item_id));
auto results = content_db.QueryDatabase(
@ -218,6 +220,7 @@ public:
for (auto &alternate_currency_entry: alternate_currency_entries) {
std::vector<std::string> insert_values;
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) + ")");

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -204,6 +204,7 @@ public:
auto columns = Columns();
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[3] + " = " + std::to_string(auras_entry.spell_id));
@ -234,6 +235,7 @@ public:
{
std::vector<std::string> insert_values;
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(std::to_string(auras_entry.spell_id));
@ -254,7 +256,7 @@ public:
);
if (results.Success()) {
auras_entry.id = results.LastInsertedID();
auras_entry.type = results.LastInsertedID();
return auras_entry;
}
@ -272,6 +274,7 @@ public:
for (auto &auras_entry: auras_entries) {
std::vector<std::string> insert_values;
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(std::to_string(auras_entry.spell_id));

View File

@ -1,306 +0,0 @@
/**
* EQEmulator: Everquest Server Emulator
* Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY except by those people which sell it, which
* are required to give you total support for your newly bought product;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
#ifndef EQEMU_BASE_BANNED_IPS_REPOSITORY_H
#define EQEMU_BASE_BANNED_IPS_REPOSITORY_H
#include "../../database.h"
#include "../../string_util.h"
class BaseBannedIpsRepository {
public:
struct BannedIps {
std::string ip_address;
std::string notes;
};
static std::string PrimaryKey()
{
return std::string("ip_address");
}
static std::vector<std::string> Columns()
{
return {
"ip_address",
"notes",
};
}
static std::string ColumnsRaw()
{
return std::string(implode(", ", Columns()));
}
static std::string InsertColumnsRaw()
{
std::vector<std::string> insert_columns;
for (auto &column : Columns()) {
if (column == PrimaryKey()) {
continue;
}
insert_columns.push_back(column);
}
return std::string(implode(", ", insert_columns));
}
static std::string TableName()
{
return std::string("banned_ips");
}
static std::string BaseSelect()
{
return fmt::format(
"SELECT {} FROM {}",
ColumnsRaw(),
TableName()
);
}
static std::string BaseInsert()
{
return fmt::format(
"INSERT INTO {} ({}) ",
TableName(),
InsertColumnsRaw()
);
}
static BannedIps NewEntity()
{
BannedIps entry{};
entry.ip_address = "";
entry.notes = "";
return entry;
}
static BannedIps GetBannedIpsEntry(
const std::vector<BannedIps> &banned_ipss,
int banned_ips_id
)
{
for (auto &banned_ips : banned_ipss) {
if (banned_ips.ip_address == banned_ips_id) {
return banned_ips;
}
}
return NewEntity();
}
static BannedIps FindOne(
int banned_ips_id
)
{
auto results = database.QueryDatabase(
fmt::format(
"{} WHERE id = {} LIMIT 1",
BaseSelect(),
banned_ips_id
)
);
auto row = results.begin();
if (results.RowCount() == 1) {
BannedIps entry{};
entry.ip_address = row[0] ? row[0] : "";
entry.notes = row[1] ? row[1] : "";
return entry;
}
return NewEntity();
}
static int DeleteOne(
int banned_ips_id
)
{
auto results = database.QueryDatabase(
fmt::format(
"DELETE FROM {} WHERE {} = {}",
TableName(),
PrimaryKey(),
banned_ips_id
)
);
return (results.Success() ? results.RowsAffected() : 0);
}
static int UpdateOne(
BannedIps banned_ips_entry
)
{
std::vector<std::string> update_values;
auto columns = Columns();
update_values.push_back(columns[1] + " = '" + EscapeString(banned_ips_entry.notes) + "'");
auto results = database.QueryDatabase(
fmt::format(
"UPDATE {} SET {} WHERE {} = {}",
TableName(),
implode(", ", update_values),
PrimaryKey(),
banned_ips_entry.ip_address
)
);
return (results.Success() ? results.RowsAffected() : 0);
}
static BannedIps InsertOne(
BannedIps banned_ips_entry
)
{
std::vector<std::string> insert_values;
insert_values.push_back("'" + EscapeString(banned_ips_entry.notes) + "'");
auto results = database.QueryDatabase(
fmt::format(
"{} VALUES ({})",
BaseInsert(),
implode(",", insert_values)
)
);
if (results.Success()) {
banned_ips_entry.id = results.LastInsertedID();
return banned_ips_entry;
}
banned_ips_entry = NewEntity();
return banned_ips_entry;
}
static int InsertMany(
std::vector<BannedIps> banned_ips_entries
)
{
std::vector<std::string> insert_chunks;
for (auto &banned_ips_entry: banned_ips_entries) {
std::vector<std::string> insert_values;
insert_values.push_back("'" + EscapeString(banned_ips_entry.notes) + "'");
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
}
std::vector<std::string> insert_values;
auto results = database.QueryDatabase(
fmt::format(
"{} VALUES {}",
BaseInsert(),
implode(",", insert_chunks)
)
);
return (results.Success() ? results.RowsAffected() : 0);
}
static std::vector<BannedIps> All()
{
std::vector<BannedIps> all_entries;
auto results = database.QueryDatabase(
fmt::format(
"{}",
BaseSelect()
)
);
all_entries.reserve(results.RowCount());
for (auto row = results.begin(); row != results.end(); ++row) {
BannedIps entry{};
entry.ip_address = row[0] ? row[0] : "";
entry.notes = row[1] ? row[1] : "";
all_entries.push_back(entry);
}
return all_entries;
}
static std::vector<BannedIps> GetWhere(std::string where_filter)
{
std::vector<BannedIps> all_entries;
auto results = database.QueryDatabase(
fmt::format(
"{} WHERE {}",
BaseSelect(),
where_filter
)
);
all_entries.reserve(results.RowCount());
for (auto row = results.begin(); row != results.end(); ++row) {
BannedIps entry{};
entry.ip_address = row[0] ? row[0] : "";
entry.notes = row[1] ? row[1] : "";
all_entries.push_back(entry);
}
return all_entries;
}
static int DeleteWhere(std::string where_filter)
{
auto results = database.QueryDatabase(
fmt::format(
"DELETE FROM {} WHERE {}",
TableName(),
PrimaryKey(),
where_filter
)
);
return (results.Success() ? results.RowsAffected() : 0);
}
};
#endif //EQEMU_BASE_BANNED_IPS_REPOSITORY_H

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -49,7 +49,7 @@ public:
static std::string PrimaryKey()
{
return std::string("class");
return std::string("level");
}
static std::vector<std::string> Columns()
@ -135,7 +135,7 @@ public:
)
{
for (auto &base_data : base_datas) {
if (base_data.class == base_data_id) {
if (base_data.level == base_data_id) {
return base_data;
}
}
@ -200,6 +200,8 @@ public:
auto columns = Columns();
update_values.push_back(columns[0] + " = " + std::to_string(base_data_entry.level));
update_values.push_back(columns[1] + " = " + std::to_string(base_data_entry.class));
update_values.push_back(columns[2] + " = " + std::to_string(base_data_entry.hp));
update_values.push_back(columns[3] + " = " + std::to_string(base_data_entry.mana));
update_values.push_back(columns[4] + " = " + std::to_string(base_data_entry.end));
@ -215,7 +217,7 @@ public:
TableName(),
implode(", ", update_values),
PrimaryKey(),
base_data_entry.class
base_data_entry.level
)
);
@ -228,6 +230,8 @@ public:
{
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(base_data_entry.level));
insert_values.push_back(std::to_string(base_data_entry.class));
insert_values.push_back(std::to_string(base_data_entry.hp));
insert_values.push_back(std::to_string(base_data_entry.mana));
insert_values.push_back(std::to_string(base_data_entry.end));
@ -246,7 +250,7 @@ public:
);
if (results.Success()) {
base_data_entry.id = results.LastInsertedID();
base_data_entry.level = results.LastInsertedID();
return base_data_entry;
}
@ -264,6 +268,8 @@ public:
for (auto &base_data_entry: base_data_entries) {
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(base_data_entry.level));
insert_values.push_back(std::to_string(base_data_entry.class));
insert_values.push_back(std::to_string(base_data_entry.hp));
insert_values.push_back(std::to_string(base_data_entry.mana));
insert_values.push_back(std::to_string(base_data_entry.end));

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/

View File

@ -1,315 +0,0 @@
/**
* EQEmulator: Everquest Server Emulator
* Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY except by those people which sell it, which
* are required to give you total support for your newly bought product;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
#ifndef EQEMU_BASE_BOOKS_REPOSITORY_H
#define EQEMU_BASE_BOOKS_REPOSITORY_H
#include "../../database.h"
#include "../../string_util.h"
class BaseBooksRepository {
public:
struct Books {
std::string name;
std::string txtfile;
int language;
};
static std::string PrimaryKey()
{
return std::string("name");
}
static std::vector<std::string> Columns()
{
return {
"name",
"txtfile",
"language",
};
}
static std::string ColumnsRaw()
{
return std::string(implode(", ", Columns()));
}
static std::string InsertColumnsRaw()
{
std::vector<std::string> insert_columns;
for (auto &column : Columns()) {
if (column == PrimaryKey()) {
continue;
}
insert_columns.push_back(column);
}
return std::string(implode(", ", insert_columns));
}
static std::string TableName()
{
return std::string("books");
}
static std::string BaseSelect()
{
return fmt::format(
"SELECT {} FROM {}",
ColumnsRaw(),
TableName()
);
}
static std::string BaseInsert()
{
return fmt::format(
"INSERT INTO {} ({}) ",
TableName(),
InsertColumnsRaw()
);
}
static Books NewEntity()
{
Books entry{};
entry.name = "";
entry.txtfile = "";
entry.language = 0;
return entry;
}
static Books GetBooksEntry(
const std::vector<Books> &bookss,
int books_id
)
{
for (auto &books : bookss) {
if (books.name == books_id) {
return books;
}
}
return NewEntity();
}
static Books FindOne(
int books_id
)
{
auto results = content_db.QueryDatabase(
fmt::format(
"{} WHERE id = {} LIMIT 1",
BaseSelect(),
books_id
)
);
auto row = results.begin();
if (results.RowCount() == 1) {
Books entry{};
entry.name = row[0] ? row[0] : "";
entry.txtfile = row[1] ? row[1] : "";
entry.language = atoi(row[2]);
return entry;
}
return NewEntity();
}
static int DeleteOne(
int books_id
)
{
auto results = content_db.QueryDatabase(
fmt::format(
"DELETE FROM {} WHERE {} = {}",
TableName(),
PrimaryKey(),
books_id
)
);
return (results.Success() ? results.RowsAffected() : 0);
}
static int UpdateOne(
Books books_entry
)
{
std::vector<std::string> update_values;
auto columns = Columns();
update_values.push_back(columns[1] + " = '" + EscapeString(books_entry.txtfile) + "'");
update_values.push_back(columns[2] + " = " + std::to_string(books_entry.language));
auto results = content_db.QueryDatabase(
fmt::format(
"UPDATE {} SET {} WHERE {} = {}",
TableName(),
implode(", ", update_values),
PrimaryKey(),
books_entry.name
)
);
return (results.Success() ? results.RowsAffected() : 0);
}
static Books InsertOne(
Books books_entry
)
{
std::vector<std::string> insert_values;
insert_values.push_back("'" + EscapeString(books_entry.txtfile) + "'");
insert_values.push_back(std::to_string(books_entry.language));
auto results = content_db.QueryDatabase(
fmt::format(
"{} VALUES ({})",
BaseInsert(),
implode(",", insert_values)
)
);
if (results.Success()) {
books_entry.id = results.LastInsertedID();
return books_entry;
}
books_entry = NewEntity();
return books_entry;
}
static int InsertMany(
std::vector<Books> books_entries
)
{
std::vector<std::string> insert_chunks;
for (auto &books_entry: books_entries) {
std::vector<std::string> insert_values;
insert_values.push_back("'" + EscapeString(books_entry.txtfile) + "'");
insert_values.push_back(std::to_string(books_entry.language));
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
}
std::vector<std::string> insert_values;
auto results = content_db.QueryDatabase(
fmt::format(
"{} VALUES {}",
BaseInsert(),
implode(",", insert_chunks)
)
);
return (results.Success() ? results.RowsAffected() : 0);
}
static std::vector<Books> All()
{
std::vector<Books> all_entries;
auto results = content_db.QueryDatabase(
fmt::format(
"{}",
BaseSelect()
)
);
all_entries.reserve(results.RowCount());
for (auto row = results.begin(); row != results.end(); ++row) {
Books entry{};
entry.name = row[0] ? row[0] : "";
entry.txtfile = row[1] ? row[1] : "";
entry.language = atoi(row[2]);
all_entries.push_back(entry);
}
return all_entries;
}
static std::vector<Books> GetWhere(std::string where_filter)
{
std::vector<Books> all_entries;
auto results = content_db.QueryDatabase(
fmt::format(
"{} WHERE {}",
BaseSelect(),
where_filter
)
);
all_entries.reserve(results.RowCount());
for (auto row = results.begin(); row != results.end(); ++row) {
Books entry{};
entry.name = row[0] ? row[0] : "";
entry.txtfile = row[1] ? row[1] : "";
entry.language = atoi(row[2]);
all_entries.push_back(entry);
}
return all_entries;
}
static int DeleteWhere(std::string where_filter)
{
auto results = content_db.QueryDatabase(
fmt::format(
"DELETE FROM {} WHERE {}",
TableName(),
PrimaryKey(),
where_filter
)
);
return (results.Success() ? results.RowsAffected() : 0);
}
};
#endif //EQEMU_BASE_BOOKS_REPOSITORY_H

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -45,7 +45,7 @@ public:
static std::string PrimaryKey()
{
return std::string("buyslot");
return std::string("charid");
}
static std::vector<std::string> Columns()
@ -123,7 +123,7 @@ public:
)
{
for (auto &buyer : buyers) {
if (buyer.buyslot == buyer_id) {
if (buyer.charid == buyer_id) {
return buyer;
}
}
@ -184,6 +184,8 @@ public:
auto columns = Columns();
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[4] + " = " + std::to_string(buyer_entry.quantity));
@ -195,7 +197,7 @@ public:
TableName(),
implode(", ", update_values),
PrimaryKey(),
buyer_entry.buyslot
buyer_entry.charid
)
);
@ -208,6 +210,8 @@ public:
{
std::vector<std::string> insert_values;
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(std::to_string(buyer_entry.quantity));
@ -222,7 +226,7 @@ public:
);
if (results.Success()) {
buyer_entry.id = results.LastInsertedID();
buyer_entry.charid = results.LastInsertedID();
return buyer_entry;
}
@ -240,6 +244,8 @@ public:
for (auto &buyer_entry: buyer_entries) {
std::vector<std::string> insert_values;
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(std::to_string(buyer_entry.quantity));

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -48,7 +48,7 @@ public:
static std::string PrimaryKey()
{
return std::string("start_zone");
return std::string("race");
}
static std::vector<std::string> Columns()
@ -132,7 +132,7 @@ public:
)
{
for (auto &char_create_combinations : char_create_combinationss) {
if (char_create_combinations.start_zone == char_create_combinations_id) {
if (char_create_combinations.race == char_create_combinations_id) {
return char_create_combinations;
}
}
@ -197,6 +197,10 @@ public:
auto columns = Columns();
update_values.push_back(columns[0] + " = " + std::to_string(char_create_combinations_entry.allocation_id));
update_values.push_back(columns[1] + " = " + std::to_string(char_create_combinations_entry.race));
update_values.push_back(columns[2] + " = " + std::to_string(char_create_combinations_entry.class));
update_values.push_back(columns[3] + " = " + std::to_string(char_create_combinations_entry.deity));
update_values.push_back(columns[4] + " = " + std::to_string(char_create_combinations_entry.start_zone));
update_values.push_back(columns[5] + " = " + std::to_string(char_create_combinations_entry.expansions_req));
update_values.push_back(columns[6] + " = " + std::to_string(char_create_combinations_entry.min_expansion));
update_values.push_back(columns[7] + " = " + std::to_string(char_create_combinations_entry.max_expansion));
@ -208,7 +212,7 @@ public:
TableName(),
implode(", ", update_values),
PrimaryKey(),
char_create_combinations_entry.start_zone
char_create_combinations_entry.race
)
);
@ -222,6 +226,10 @@ public:
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(char_create_combinations_entry.allocation_id));
insert_values.push_back(std::to_string(char_create_combinations_entry.race));
insert_values.push_back(std::to_string(char_create_combinations_entry.class));
insert_values.push_back(std::to_string(char_create_combinations_entry.deity));
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_values.push_back(std::to_string(char_create_combinations_entry.min_expansion));
insert_values.push_back(std::to_string(char_create_combinations_entry.max_expansion));
@ -236,7 +244,7 @@ public:
);
if (results.Success()) {
char_create_combinations_entry.id = results.LastInsertedID();
char_create_combinations_entry.race = results.LastInsertedID();
return char_create_combinations_entry;
}
@ -255,6 +263,10 @@ public:
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(char_create_combinations_entry.allocation_id));
insert_values.push_back(std::to_string(char_create_combinations_entry.race));
insert_values.push_back(std::to_string(char_create_combinations_entry.class));
insert_values.push_back(std::to_string(char_create_combinations_entry.deity));
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_values.push_back(std::to_string(char_create_combinations_entry.min_expansion));
insert_values.push_back(std::to_string(char_create_combinations_entry.max_expansion));

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -220,6 +220,7 @@ public:
auto columns = Columns();
update_values.push_back(columns[0] + " = " + std::to_string(char_create_point_allocations_entry.id));
update_values.push_back(columns[1] + " = " + std::to_string(char_create_point_allocations_entry.base_str));
update_values.push_back(columns[2] + " = " + std::to_string(char_create_point_allocations_entry.base_sta));
update_values.push_back(columns[3] + " = " + std::to_string(char_create_point_allocations_entry.base_dex));
@ -254,6 +255,7 @@ public:
{
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(char_create_point_allocations_entry.id));
insert_values.push_back(std::to_string(char_create_point_allocations_entry.base_str));
insert_values.push_back(std::to_string(char_create_point_allocations_entry.base_sta));
insert_values.push_back(std::to_string(char_create_point_allocations_entry.base_dex));
@ -296,6 +298,7 @@ public:
for (auto &char_create_point_allocations_entry: char_create_point_allocations_entries) {
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(char_create_point_allocations_entry.id));
insert_values.push_back(std::to_string(char_create_point_allocations_entry.base_str));
insert_values.push_back(std::to_string(char_create_point_allocations_entry.base_sta));
insert_values.push_back(std::to_string(char_create_point_allocations_entry.base_dex));

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -42,7 +42,7 @@ public:
static std::string PrimaryKey()
{
return std::string("recipe_id");
return std::string("char_id");
}
static std::vector<std::string> Columns()
@ -114,7 +114,7 @@ public:
)
{
for (auto &char_recipe_list : char_recipe_lists) {
if (char_recipe_list.recipe_id == char_recipe_list_id) {
if (char_recipe_list.char_id == char_recipe_list_id) {
return char_recipe_list;
}
}
@ -172,6 +172,8 @@ public:
auto columns = Columns();
update_values.push_back(columns[0] + " = " + std::to_string(char_recipe_list_entry.char_id));
update_values.push_back(columns[1] + " = " + std::to_string(char_recipe_list_entry.recipe_id));
update_values.push_back(columns[2] + " = " + std::to_string(char_recipe_list_entry.madecount));
auto results = database.QueryDatabase(
@ -180,7 +182,7 @@ public:
TableName(),
implode(", ", update_values),
PrimaryKey(),
char_recipe_list_entry.recipe_id
char_recipe_list_entry.char_id
)
);
@ -193,6 +195,8 @@ public:
{
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(char_recipe_list_entry.char_id));
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));
auto results = database.QueryDatabase(
@ -204,7 +208,7 @@ public:
);
if (results.Success()) {
char_recipe_list_entry.id = results.LastInsertedID();
char_recipe_list_entry.char_id = results.LastInsertedID();
return char_recipe_list_entry;
}
@ -222,6 +226,8 @@ public:
for (auto &char_recipe_list_entry: char_recipe_list_entries) {
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(char_recipe_list_entry.char_id));
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) + ")");

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -44,7 +44,7 @@ public:
static std::string PrimaryKey()
{
return std::string("activityid");
return std::string("charid");
}
static std::vector<std::string> Columns()
@ -120,7 +120,7 @@ public:
)
{
for (auto &character_activities : character_activitiess) {
if (character_activities.activityid == character_activities_id) {
if (character_activities.charid == character_activities_id) {
return character_activities;
}
}
@ -180,6 +180,9 @@ public:
auto columns = Columns();
update_values.push_back(columns[0] + " = " + std::to_string(character_activities_entry.charid));
update_values.push_back(columns[1] + " = " + std::to_string(character_activities_entry.taskid));
update_values.push_back(columns[2] + " = " + std::to_string(character_activities_entry.activityid));
update_values.push_back(columns[3] + " = " + std::to_string(character_activities_entry.donecount));
update_values.push_back(columns[4] + " = " + std::to_string(character_activities_entry.completed));
@ -189,7 +192,7 @@ public:
TableName(),
implode(", ", update_values),
PrimaryKey(),
character_activities_entry.activityid
character_activities_entry.charid
)
);
@ -202,6 +205,9 @@ public:
{
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(character_activities_entry.charid));
insert_values.push_back(std::to_string(character_activities_entry.taskid));
insert_values.push_back(std::to_string(character_activities_entry.activityid));
insert_values.push_back(std::to_string(character_activities_entry.donecount));
insert_values.push_back(std::to_string(character_activities_entry.completed));
@ -214,7 +220,7 @@ public:
);
if (results.Success()) {
character_activities_entry.id = results.LastInsertedID();
character_activities_entry.charid = results.LastInsertedID();
return character_activities_entry;
}
@ -232,6 +238,9 @@ public:
for (auto &character_activities_entry: character_activities_entries) {
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(character_activities_entry.charid));
insert_values.push_back(std::to_string(character_activities_entry.taskid));
insert_values.push_back(std::to_string(character_activities_entry.activityid));
insert_values.push_back(std::to_string(character_activities_entry.donecount));
insert_values.push_back(std::to_string(character_activities_entry.completed));

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -42,7 +42,7 @@ public:
static std::string PrimaryKey()
{
return std::string("currency_id");
return std::string("char_id");
}
static std::vector<std::string> Columns()
@ -114,7 +114,7 @@ public:
)
{
for (auto &character_alt_currency : character_alt_currencys) {
if (character_alt_currency.currency_id == character_alt_currency_id) {
if (character_alt_currency.char_id == character_alt_currency_id) {
return character_alt_currency;
}
}
@ -172,6 +172,8 @@ public:
auto columns = Columns();
update_values.push_back(columns[0] + " = " + std::to_string(character_alt_currency_entry.char_id));
update_values.push_back(columns[1] + " = " + std::to_string(character_alt_currency_entry.currency_id));
update_values.push_back(columns[2] + " = " + std::to_string(character_alt_currency_entry.amount));
auto results = database.QueryDatabase(
@ -180,7 +182,7 @@ public:
TableName(),
implode(", ", update_values),
PrimaryKey(),
character_alt_currency_entry.currency_id
character_alt_currency_entry.char_id
)
);
@ -193,6 +195,8 @@ public:
{
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(character_alt_currency_entry.char_id));
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));
auto results = database.QueryDatabase(
@ -204,7 +208,7 @@ public:
);
if (results.Success()) {
character_alt_currency_entry.id = results.LastInsertedID();
character_alt_currency_entry.char_id = results.LastInsertedID();
return character_alt_currency_entry;
}
@ -222,6 +226,8 @@ public:
for (auto &character_alt_currency_entry: character_alt_currency_entries) {
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(character_alt_currency_entry.char_id));
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) + ")");

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -43,7 +43,7 @@ public:
static std::string PrimaryKey()
{
return std::string("aa_id");
return std::string("id");
}
static std::vector<std::string> Columns()
@ -117,7 +117,7 @@ public:
)
{
for (auto &character_alternate_abilities : character_alternate_abilitiess) {
if (character_alternate_abilities.aa_id == character_alternate_abilities_id) {
if (character_alternate_abilities.id == character_alternate_abilities_id) {
return character_alternate_abilities;
}
}
@ -176,6 +176,8 @@ public:
auto columns = Columns();
update_values.push_back(columns[0] + " = " + std::to_string(character_alternate_abilities_entry.id));
update_values.push_back(columns[1] + " = " + std::to_string(character_alternate_abilities_entry.aa_id));
update_values.push_back(columns[2] + " = " + std::to_string(character_alternate_abilities_entry.aa_value));
update_values.push_back(columns[3] + " = " + std::to_string(character_alternate_abilities_entry.charges));
@ -185,7 +187,7 @@ public:
TableName(),
implode(", ", update_values),
PrimaryKey(),
character_alternate_abilities_entry.aa_id
character_alternate_abilities_entry.id
)
);
@ -198,6 +200,8 @@ public:
{
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(character_alternate_abilities_entry.id));
insert_values.push_back(std::to_string(character_alternate_abilities_entry.aa_id));
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));
@ -228,6 +232,8 @@ public:
for (auto &character_alternate_abilities_entry: character_alternate_abilities_entries) {
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(character_alternate_abilities_entry.id));
insert_values.push_back(std::to_string(character_alternate_abilities_entry.aa_id));
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));

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -42,7 +42,7 @@ public:
static std::string PrimaryKey()
{
return std::string("slot");
return std::string("id");
}
static std::vector<std::string> Columns()
@ -114,7 +114,7 @@ public:
)
{
for (auto &character_auras : character_aurass) {
if (character_auras.slot == character_auras_id) {
if (character_auras.id == character_auras_id) {
return character_auras;
}
}
@ -172,6 +172,8 @@ public:
auto columns = Columns();
update_values.push_back(columns[0] + " = " + std::to_string(character_auras_entry.id));
update_values.push_back(columns[1] + " = " + std::to_string(character_auras_entry.slot));
update_values.push_back(columns[2] + " = " + std::to_string(character_auras_entry.spell_id));
auto results = database.QueryDatabase(
@ -180,7 +182,7 @@ public:
TableName(),
implode(", ", update_values),
PrimaryKey(),
character_auras_entry.slot
character_auras_entry.id
)
);
@ -193,6 +195,8 @@ public:
{
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(character_auras_entry.id));
insert_values.push_back(std::to_string(character_auras_entry.slot));
insert_values.push_back(std::to_string(character_auras_entry.spell_id));
auto results = database.QueryDatabase(
@ -222,6 +226,8 @@ public:
for (auto &character_auras_entry: character_auras_entries) {
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(character_auras_entry.id));
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) + ")");

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -45,7 +45,7 @@ public:
static std::string PrimaryKey()
{
return std::string("bandolier_slot");
return std::string("id");
}
static std::vector<std::string> Columns()
@ -123,7 +123,7 @@ public:
)
{
for (auto &character_bandolier : character_bandoliers) {
if (character_bandolier.bandolier_slot == character_bandolier_id) {
if (character_bandolier.id == character_bandolier_id) {
return character_bandolier;
}
}
@ -184,6 +184,9 @@ public:
auto columns = Columns();
update_values.push_back(columns[0] + " = " + std::to_string(character_bandolier_entry.id));
update_values.push_back(columns[1] + " = " + std::to_string(character_bandolier_entry.bandolier_id));
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) + "'");
@ -194,7 +197,7 @@ public:
TableName(),
implode(", ", update_values),
PrimaryKey(),
character_bandolier_entry.bandolier_slot
character_bandolier_entry.id
)
);
@ -207,6 +210,9 @@ public:
{
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(character_bandolier_entry.id));
insert_values.push_back(std::to_string(character_bandolier_entry.bandolier_id));
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) + "'");
@ -238,6 +244,9 @@ public:
for (auto &character_bandolier_entry: character_bandolier_entries) {
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(character_bandolier_entry.id));
insert_values.push_back(std::to_string(character_bandolier_entry.bandolier_id));
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) + "'");

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -47,7 +47,7 @@ public:
static std::string PrimaryKey()
{
return std::string("slot");
return std::string("id");
}
static std::vector<std::string> Columns()
@ -129,7 +129,7 @@ public:
)
{
for (auto &character_bind : character_binds) {
if (character_bind.slot == character_bind_id) {
if (character_bind.id == character_bind_id) {
return character_bind;
}
}
@ -192,6 +192,7 @@ public:
auto columns = Columns();
update_values.push_back(columns[1] + " = " + std::to_string(character_bind_entry.slot));
update_values.push_back(columns[2] + " = " + std::to_string(character_bind_entry.zone_id));
update_values.push_back(columns[3] + " = " + std::to_string(character_bind_entry.instance_id));
update_values.push_back(columns[4] + " = " + std::to_string(character_bind_entry.x));
@ -205,7 +206,7 @@ public:
TableName(),
implode(", ", update_values),
PrimaryKey(),
character_bind_entry.slot
character_bind_entry.id
)
);
@ -218,6 +219,7 @@ public:
{
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(character_bind_entry.slot));
insert_values.push_back(std::to_string(character_bind_entry.zone_id));
insert_values.push_back(std::to_string(character_bind_entry.instance_id));
insert_values.push_back(std::to_string(character_bind_entry.x));
@ -252,6 +254,7 @@ public:
for (auto &character_bind_entry: character_bind_entries) {
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(character_bind_entry.slot));
insert_values.push_back(std::to_string(character_bind_entry.zone_id));
insert_values.push_back(std::to_string(character_bind_entry.instance_id));
insert_values.push_back(std::to_string(character_bind_entry.x));

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -56,7 +56,7 @@ public:
static std::string PrimaryKey()
{
return std::string("slot_id");
return std::string("character_id");
}
static std::vector<std::string> Columns()
@ -156,7 +156,7 @@ public:
)
{
for (auto &character_buffs : character_buffss) {
if (character_buffs.slot_id == character_buffs_id) {
if (character_buffs.character_id == character_buffs_id) {
return character_buffs;
}
}
@ -228,6 +228,8 @@ public:
auto columns = Columns();
update_values.push_back(columns[0] + " = " + std::to_string(character_buffs_entry.character_id));
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) + "'");
@ -250,7 +252,7 @@ public:
TableName(),
implode(", ", update_values),
PrimaryKey(),
character_buffs_entry.slot_id
character_buffs_entry.character_id
)
);
@ -263,6 +265,8 @@ public:
{
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(character_buffs_entry.character_id));
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) + "'");
@ -288,7 +292,7 @@ public:
);
if (results.Success()) {
character_buffs_entry.id = results.LastInsertedID();
character_buffs_entry.character_id = results.LastInsertedID();
return character_buffs_entry;
}
@ -306,6 +310,8 @@ public:
for (auto &character_buffs_entry: character_buffs_entries) {
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(character_buffs_entry.character_id));
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) + "'");

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -50,7 +50,7 @@ public:
static std::string PrimaryKey()
{
return std::string("equip_slot");
return std::string("corpse_id");
}
static std::vector<std::string> Columns()
@ -138,7 +138,7 @@ public:
)
{
for (auto &character_corpse_items : character_corpse_itemss) {
if (character_corpse_items.equip_slot == character_corpse_items_id) {
if (character_corpse_items.corpse_id == character_corpse_items_id) {
return character_corpse_items;
}
}
@ -204,6 +204,8 @@ public:
auto columns = Columns();
update_values.push_back(columns[0] + " = " + std::to_string(character_corpse_items_entry.corpse_id));
update_values.push_back(columns[1] + " = " + std::to_string(character_corpse_items_entry.equip_slot));
update_values.push_back(columns[2] + " = " + std::to_string(character_corpse_items_entry.item_id));
update_values.push_back(columns[3] + " = " + std::to_string(character_corpse_items_entry.charges));
update_values.push_back(columns[4] + " = " + std::to_string(character_corpse_items_entry.aug_1));
@ -220,7 +222,7 @@ public:
TableName(),
implode(", ", update_values),
PrimaryKey(),
character_corpse_items_entry.equip_slot
character_corpse_items_entry.corpse_id
)
);
@ -233,6 +235,8 @@ public:
{
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(character_corpse_items_entry.corpse_id));
insert_values.push_back(std::to_string(character_corpse_items_entry.equip_slot));
insert_values.push_back(std::to_string(character_corpse_items_entry.item_id));
insert_values.push_back(std::to_string(character_corpse_items_entry.charges));
insert_values.push_back(std::to_string(character_corpse_items_entry.aug_1));
@ -252,7 +256,7 @@ public:
);
if (results.Success()) {
character_corpse_items_entry.id = results.LastInsertedID();
character_corpse_items_entry.corpse_id = results.LastInsertedID();
return character_corpse_items_entry;
}
@ -270,6 +274,8 @@ public:
for (auto &character_corpse_items_entry: character_corpse_items_entries) {
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(character_corpse_items_entry.corpse_id));
insert_values.push_back(std::to_string(character_corpse_items_entry.equip_slot));
insert_values.push_back(std::to_string(character_corpse_items_entry.item_id));
insert_values.push_back(std::to_string(character_corpse_items_entry.charges));
insert_values.push_back(std::to_string(character_corpse_items_entry.aug_1));

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -228,6 +228,7 @@ public:
auto columns = Columns();
update_values.push_back(columns[0] + " = " + std::to_string(character_currency_entry.id));
update_values.push_back(columns[1] + " = " + std::to_string(character_currency_entry.platinum));
update_values.push_back(columns[2] + " = " + std::to_string(character_currency_entry.gold));
update_values.push_back(columns[3] + " = " + std::to_string(character_currency_entry.silver));
@ -264,6 +265,7 @@ public:
{
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(character_currency_entry.id));
insert_values.push_back(std::to_string(character_currency_entry.platinum));
insert_values.push_back(std::to_string(character_currency_entry.gold));
insert_values.push_back(std::to_string(character_currency_entry.silver));
@ -308,6 +310,7 @@ public:
for (auto &character_currency_entry: character_currency_entries) {
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(character_currency_entry.id));
insert_values.push_back(std::to_string(character_currency_entry.platinum));
insert_values.push_back(std::to_string(character_currency_entry.gold));
insert_values.push_back(std::to_string(character_currency_entry.silver));

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -42,7 +42,7 @@ public:
static std::string PrimaryKey()
{
return std::string("slot_id");
return std::string("id");
}
static std::vector<std::string> Columns()
@ -114,7 +114,7 @@ public:
)
{
for (auto &character_disciplines : character_discipliness) {
if (character_disciplines.slot_id == character_disciplines_id) {
if (character_disciplines.id == character_disciplines_id) {
return character_disciplines;
}
}
@ -172,6 +172,8 @@ public:
auto columns = Columns();
update_values.push_back(columns[0] + " = " + std::to_string(character_disciplines_entry.id));
update_values.push_back(columns[1] + " = " + std::to_string(character_disciplines_entry.slot_id));
update_values.push_back(columns[2] + " = " + std::to_string(character_disciplines_entry.disc_id));
auto results = database.QueryDatabase(
@ -180,7 +182,7 @@ public:
TableName(),
implode(", ", update_values),
PrimaryKey(),
character_disciplines_entry.slot_id
character_disciplines_entry.id
)
);
@ -193,6 +195,8 @@ public:
{
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(character_disciplines_entry.id));
insert_values.push_back(std::to_string(character_disciplines_entry.slot_id));
insert_values.push_back(std::to_string(character_disciplines_entry.disc_id));
auto results = database.QueryDatabase(
@ -222,6 +226,8 @@ public:
for (auto &character_disciplines_entry: character_disciplines_entries) {
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(character_disciplines_entry.id));
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) + ")");

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -168,6 +168,7 @@ 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) + "'");
auto results = database.QueryDatabase(
@ -189,6 +190,7 @@ 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) + "'");
auto results = database.QueryDatabase(
@ -218,6 +220,7 @@ public:
for (auto &character_inspect_messages_entry: character_inspect_messages_entries) {
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_chunks.push_back("(" + implode(",", insert_values) + ")");

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -42,7 +42,7 @@ public:
static std::string PrimaryKey()
{
return std::string("recast_type");
return std::string("id");
}
static std::vector<std::string> Columns()
@ -114,7 +114,7 @@ public:
)
{
for (auto &character_item_recast : character_item_recasts) {
if (character_item_recast.recast_type == character_item_recast_id) {
if (character_item_recast.id == character_item_recast_id) {
return character_item_recast;
}
}
@ -172,6 +172,8 @@ public:
auto columns = Columns();
update_values.push_back(columns[0] + " = " + std::to_string(character_item_recast_entry.id));
update_values.push_back(columns[1] + " = " + std::to_string(character_item_recast_entry.recast_type));
update_values.push_back(columns[2] + " = " + std::to_string(character_item_recast_entry.timestamp));
auto results = database.QueryDatabase(
@ -180,7 +182,7 @@ public:
TableName(),
implode(", ", update_values),
PrimaryKey(),
character_item_recast_entry.recast_type
character_item_recast_entry.id
)
);
@ -193,6 +195,8 @@ public:
{
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(character_item_recast_entry.id));
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));
auto results = database.QueryDatabase(
@ -222,6 +226,8 @@ public:
for (auto &character_item_recast_entry: character_item_recast_entries) {
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(character_item_recast_entry.id));
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) + ")");

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -42,7 +42,7 @@ public:
static std::string PrimaryKey()
{
return std::string("lang_id");
return std::string("id");
}
static std::vector<std::string> Columns()
@ -114,7 +114,7 @@ public:
)
{
for (auto &character_languages : character_languagess) {
if (character_languages.lang_id == character_languages_id) {
if (character_languages.id == character_languages_id) {
return character_languages;
}
}
@ -172,6 +172,7 @@ public:
auto columns = Columns();
update_values.push_back(columns[1] + " = " + std::to_string(character_languages_entry.lang_id));
update_values.push_back(columns[2] + " = " + std::to_string(character_languages_entry.value));
auto results = database.QueryDatabase(
@ -180,7 +181,7 @@ public:
TableName(),
implode(", ", update_values),
PrimaryKey(),
character_languages_entry.lang_id
character_languages_entry.id
)
);
@ -193,6 +194,7 @@ public:
{
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(character_languages_entry.lang_id));
insert_values.push_back(std::to_string(character_languages_entry.value));
auto results = database.QueryDatabase(
@ -222,6 +224,7 @@ public:
for (auto &character_languages_entry: character_languages_entries) {
std::vector<std::string> insert_values;
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) + ")");

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -42,7 +42,7 @@ public:
static std::string PrimaryKey()
{
return std::string("slot");
return std::string("id");
}
static std::vector<std::string> Columns()
@ -114,7 +114,7 @@ public:
)
{
for (auto &character_leadership_abilities : character_leadership_abilitiess) {
if (character_leadership_abilities.slot == character_leadership_abilities_id) {
if (character_leadership_abilities.id == character_leadership_abilities_id) {
return character_leadership_abilities;
}
}
@ -172,6 +172,8 @@ public:
auto columns = Columns();
update_values.push_back(columns[0] + " = " + std::to_string(character_leadership_abilities_entry.id));
update_values.push_back(columns[1] + " = " + std::to_string(character_leadership_abilities_entry.slot));
update_values.push_back(columns[2] + " = " + std::to_string(character_leadership_abilities_entry.rank));
auto results = database.QueryDatabase(
@ -180,7 +182,7 @@ public:
TableName(),
implode(", ", update_values),
PrimaryKey(),
character_leadership_abilities_entry.slot
character_leadership_abilities_entry.id
)
);
@ -193,6 +195,8 @@ public:
{
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(character_leadership_abilities_entry.id));
insert_values.push_back(std::to_string(character_leadership_abilities_entry.slot));
insert_values.push_back(std::to_string(character_leadership_abilities_entry.rank));
auto results = database.QueryDatabase(
@ -222,6 +226,8 @@ public:
for (auto &character_leadership_abilities_entry: character_leadership_abilities_entries) {
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(character_leadership_abilities_entry.id));
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) + ")");

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -46,7 +46,7 @@ public:
static std::string PrimaryKey()
{
return std::string("slot");
return std::string("id");
}
static std::vector<std::string> Columns()
@ -126,7 +126,7 @@ public:
)
{
for (auto &character_material : character_materials) {
if (character_material.slot == character_material_id) {
if (character_material.id == character_material_id) {
return character_material;
}
}
@ -188,6 +188,7 @@ public:
auto columns = Columns();
update_values.push_back(columns[1] + " = " + std::to_string(character_material_entry.slot));
update_values.push_back(columns[2] + " = " + std::to_string(character_material_entry.blue));
update_values.push_back(columns[3] + " = " + std::to_string(character_material_entry.green));
update_values.push_back(columns[4] + " = " + std::to_string(character_material_entry.red));
@ -200,7 +201,7 @@ public:
TableName(),
implode(", ", update_values),
PrimaryKey(),
character_material_entry.slot
character_material_entry.id
)
);
@ -213,6 +214,7 @@ public:
{
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(character_material_entry.slot));
insert_values.push_back(std::to_string(character_material_entry.blue));
insert_values.push_back(std::to_string(character_material_entry.green));
insert_values.push_back(std::to_string(character_material_entry.red));
@ -246,6 +248,7 @@ public:
for (auto &character_material_entry: character_material_entries) {
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(character_material_entry.slot));
insert_values.push_back(std::to_string(character_material_entry.blue));
insert_values.push_back(std::to_string(character_material_entry.green));
insert_values.push_back(std::to_string(character_material_entry.red));

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -42,7 +42,7 @@ public:
static std::string PrimaryKey()
{
return std::string("slot_id");
return std::string("id");
}
static std::vector<std::string> Columns()
@ -114,7 +114,7 @@ public:
)
{
for (auto &character_memmed_spells : character_memmed_spellss) {
if (character_memmed_spells.slot_id == character_memmed_spells_id) {
if (character_memmed_spells.id == character_memmed_spells_id) {
return character_memmed_spells;
}
}
@ -172,6 +172,8 @@ public:
auto columns = Columns();
update_values.push_back(columns[0] + " = " + std::to_string(character_memmed_spells_entry.id));
update_values.push_back(columns[1] + " = " + std::to_string(character_memmed_spells_entry.slot_id));
update_values.push_back(columns[2] + " = " + std::to_string(character_memmed_spells_entry.spell_id));
auto results = database.QueryDatabase(
@ -180,7 +182,7 @@ public:
TableName(),
implode(", ", update_values),
PrimaryKey(),
character_memmed_spells_entry.slot_id
character_memmed_spells_entry.id
)
);
@ -193,6 +195,8 @@ public:
{
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(character_memmed_spells_entry.id));
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));
auto results = database.QueryDatabase(
@ -222,6 +226,8 @@ public:
for (auto &character_memmed_spells_entry: character_memmed_spells_entries) {
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(character_memmed_spells_entry.id));
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) + ")");

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -50,7 +50,7 @@ public:
static std::string PrimaryKey()
{
return std::string("slot");
return std::string("char_id");
}
static std::vector<std::string> Columns()
@ -138,7 +138,7 @@ public:
)
{
for (auto &character_pet_buffs : character_pet_buffss) {
if (character_pet_buffs.slot == character_pet_buffs_id) {
if (character_pet_buffs.char_id == character_pet_buffs_id) {
return character_pet_buffs;
}
}
@ -204,6 +204,9 @@ public:
auto columns = Columns();
update_values.push_back(columns[0] + " = " + std::to_string(character_pet_buffs_entry.char_id));
update_values.push_back(columns[1] + " = " + std::to_string(character_pet_buffs_entry.pet));
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) + "'");
@ -219,7 +222,7 @@ public:
TableName(),
implode(", ", update_values),
PrimaryKey(),
character_pet_buffs_entry.slot
character_pet_buffs_entry.char_id
)
);
@ -232,6 +235,9 @@ public:
{
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(character_pet_buffs_entry.char_id));
insert_values.push_back(std::to_string(character_pet_buffs_entry.pet));
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) + "'");
@ -250,7 +256,7 @@ public:
);
if (results.Success()) {
character_pet_buffs_entry.id = results.LastInsertedID();
character_pet_buffs_entry.char_id = results.LastInsertedID();
return character_pet_buffs_entry;
}
@ -268,6 +274,9 @@ public:
for (auto &character_pet_buffs_entry: character_pet_buffs_entries) {
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(character_pet_buffs_entry.char_id));
insert_values.push_back(std::to_string(character_pet_buffs_entry.pet));
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) + "'");

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -47,7 +47,7 @@ public:
static std::string PrimaryKey()
{
return std::string("pet");
return std::string("char_id");
}
static std::vector<std::string> Columns()
@ -129,7 +129,7 @@ public:
)
{
for (auto &character_pet_info : character_pet_infos) {
if (character_pet_info.pet == character_pet_info_id) {
if (character_pet_info.char_id == character_pet_info_id) {
return character_pet_info;
}
}
@ -192,6 +192,8 @@ public:
auto columns = Columns();
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[3] + " = " + std::to_string(character_pet_info_entry.petpower));
update_values.push_back(columns[4] + " = " + std::to_string(character_pet_info_entry.spell_id));
@ -205,7 +207,7 @@ public:
TableName(),
implode(", ", update_values),
PrimaryKey(),
character_pet_info_entry.pet
character_pet_info_entry.char_id
)
);
@ -218,6 +220,8 @@ public:
{
std::vector<std::string> insert_values;
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(std::to_string(character_pet_info_entry.petpower));
insert_values.push_back(std::to_string(character_pet_info_entry.spell_id));
@ -234,7 +238,7 @@ public:
);
if (results.Success()) {
character_pet_info_entry.id = results.LastInsertedID();
character_pet_info_entry.char_id = results.LastInsertedID();
return character_pet_info_entry;
}
@ -252,6 +256,8 @@ public:
for (auto &character_pet_info_entry: character_pet_info_entries) {
std::vector<std::string> insert_values;
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(std::to_string(character_pet_info_entry.petpower));
insert_values.push_back(std::to_string(character_pet_info_entry.spell_id));

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -43,7 +43,7 @@ public:
static std::string PrimaryKey()
{
return std::string("slot");
return std::string("char_id");
}
static std::vector<std::string> Columns()
@ -117,7 +117,7 @@ public:
)
{
for (auto &character_pet_inventory : character_pet_inventorys) {
if (character_pet_inventory.slot == character_pet_inventory_id) {
if (character_pet_inventory.char_id == character_pet_inventory_id) {
return character_pet_inventory;
}
}
@ -176,6 +176,9 @@ public:
auto columns = Columns();
update_values.push_back(columns[0] + " = " + std::to_string(character_pet_inventory_entry.char_id));
update_values.push_back(columns[1] + " = " + std::to_string(character_pet_inventory_entry.pet));
update_values.push_back(columns[2] + " = " + std::to_string(character_pet_inventory_entry.slot));
update_values.push_back(columns[3] + " = " + std::to_string(character_pet_inventory_entry.item_id));
auto results = database.QueryDatabase(
@ -184,7 +187,7 @@ public:
TableName(),
implode(", ", update_values),
PrimaryKey(),
character_pet_inventory_entry.slot
character_pet_inventory_entry.char_id
)
);
@ -197,6 +200,9 @@ public:
{
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(character_pet_inventory_entry.char_id));
insert_values.push_back(std::to_string(character_pet_inventory_entry.pet));
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));
auto results = database.QueryDatabase(
@ -208,7 +214,7 @@ public:
);
if (results.Success()) {
character_pet_inventory_entry.id = results.LastInsertedID();
character_pet_inventory_entry.char_id = results.LastInsertedID();
return character_pet_inventory_entry;
}
@ -226,6 +232,9 @@ public:
for (auto &character_pet_inventory_entry: character_pet_inventory_entries) {
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(character_pet_inventory_entry.char_id));
insert_values.push_back(std::to_string(character_pet_inventory_entry.pet));
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) + ")");

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -43,7 +43,7 @@ public:
static std::string PrimaryKey()
{
return std::string("potion_id");
return std::string("id");
}
static std::vector<std::string> Columns()
@ -117,7 +117,7 @@ public:
)
{
for (auto &character_potionbelt : character_potionbelts) {
if (character_potionbelt.potion_id == character_potionbelt_id) {
if (character_potionbelt.id == character_potionbelt_id) {
return character_potionbelt;
}
}
@ -176,6 +176,8 @@ public:
auto columns = Columns();
update_values.push_back(columns[0] + " = " + std::to_string(character_potionbelt_entry.id));
update_values.push_back(columns[1] + " = " + std::to_string(character_potionbelt_entry.potion_id));
update_values.push_back(columns[2] + " = " + std::to_string(character_potionbelt_entry.item_id));
update_values.push_back(columns[3] + " = " + std::to_string(character_potionbelt_entry.icon));
@ -185,7 +187,7 @@ public:
TableName(),
implode(", ", update_values),
PrimaryKey(),
character_potionbelt_entry.potion_id
character_potionbelt_entry.id
)
);
@ -198,6 +200,8 @@ public:
{
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(character_potionbelt_entry.id));
insert_values.push_back(std::to_string(character_potionbelt_entry.potion_id));
insert_values.push_back(std::to_string(character_potionbelt_entry.item_id));
insert_values.push_back(std::to_string(character_potionbelt_entry.icon));
@ -228,6 +232,8 @@ public:
for (auto &character_potionbelt_entry: character_potionbelt_entries) {
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(character_potionbelt_entry.id));
insert_values.push_back(std::to_string(character_potionbelt_entry.potion_id));
insert_values.push_back(std::to_string(character_potionbelt_entry.item_id));
insert_values.push_back(std::to_string(character_potionbelt_entry.icon));

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -42,7 +42,7 @@ public:
static std::string PrimaryKey()
{
return std::string("skill_id");
return std::string("id");
}
static std::vector<std::string> Columns()
@ -114,7 +114,7 @@ public:
)
{
for (auto &character_skills : character_skillss) {
if (character_skills.skill_id == character_skills_id) {
if (character_skills.id == character_skills_id) {
return character_skills;
}
}
@ -172,6 +172,7 @@ public:
auto columns = Columns();
update_values.push_back(columns[1] + " = " + std::to_string(character_skills_entry.skill_id));
update_values.push_back(columns[2] + " = " + std::to_string(character_skills_entry.value));
auto results = database.QueryDatabase(
@ -180,7 +181,7 @@ public:
TableName(),
implode(", ", update_values),
PrimaryKey(),
character_skills_entry.skill_id
character_skills_entry.id
)
);
@ -193,6 +194,7 @@ public:
{
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(character_skills_entry.skill_id));
insert_values.push_back(std::to_string(character_skills_entry.value));
auto results = database.QueryDatabase(
@ -222,6 +224,7 @@ public:
for (auto &character_skills_entry: character_skills_entries) {
std::vector<std::string> insert_values;
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) + ")");

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -42,7 +42,7 @@ public:
static std::string PrimaryKey()
{
return std::string("slot_id");
return std::string("id");
}
static std::vector<std::string> Columns()
@ -114,7 +114,7 @@ public:
)
{
for (auto &character_spells : character_spellss) {
if (character_spells.slot_id == character_spells_id) {
if (character_spells.id == character_spells_id) {
return character_spells;
}
}
@ -172,6 +172,7 @@ public:
auto columns = Columns();
update_values.push_back(columns[1] + " = " + std::to_string(character_spells_entry.slot_id));
update_values.push_back(columns[2] + " = " + std::to_string(character_spells_entry.spell_id));
auto results = database.QueryDatabase(
@ -180,7 +181,7 @@ public:
TableName(),
implode(", ", update_values),
PrimaryKey(),
character_spells_entry.slot_id
character_spells_entry.id
)
);
@ -193,6 +194,7 @@ public:
{
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(character_spells_entry.slot_id));
insert_values.push_back(std::to_string(character_spells_entry.spell_id));
auto results = database.QueryDatabase(
@ -222,6 +224,7 @@ public:
for (auto &character_spells_entry: character_spells_entries) {
std::vector<std::string> insert_values;
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) + ")");

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -44,7 +44,7 @@ public:
static std::string PrimaryKey()
{
return std::string("taskid");
return std::string("charid");
}
static std::vector<std::string> Columns()
@ -120,7 +120,7 @@ public:
)
{
for (auto &character_tasks : character_taskss) {
if (character_tasks.taskid == character_tasks_id) {
if (character_tasks.charid == character_tasks_id) {
return character_tasks;
}
}
@ -180,6 +180,8 @@ public:
auto columns = Columns();
update_values.push_back(columns[0] + " = " + std::to_string(character_tasks_entry.charid));
update_values.push_back(columns[1] + " = " + std::to_string(character_tasks_entry.taskid));
update_values.push_back(columns[2] + " = " + std::to_string(character_tasks_entry.slot));
update_values.push_back(columns[3] + " = " + std::to_string(character_tasks_entry.type));
update_values.push_back(columns[4] + " = " + std::to_string(character_tasks_entry.acceptedtime));
@ -190,7 +192,7 @@ public:
TableName(),
implode(", ", update_values),
PrimaryKey(),
character_tasks_entry.taskid
character_tasks_entry.charid
)
);
@ -203,6 +205,8 @@ public:
{
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(character_tasks_entry.charid));
insert_values.push_back(std::to_string(character_tasks_entry.taskid));
insert_values.push_back(std::to_string(character_tasks_entry.slot));
insert_values.push_back(std::to_string(character_tasks_entry.type));
insert_values.push_back(std::to_string(character_tasks_entry.acceptedtime));
@ -216,7 +220,7 @@ public:
);
if (results.Success()) {
character_tasks_entry.id = results.LastInsertedID();
character_tasks_entry.charid = results.LastInsertedID();
return character_tasks_entry;
}
@ -234,6 +238,8 @@ public:
for (auto &character_tasks_entry: character_tasks_entries) {
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(character_tasks_entry.charid));
insert_values.push_back(std::to_string(character_tasks_entry.taskid));
insert_values.push_back(std::to_string(character_tasks_entry.slot));
insert_values.push_back(std::to_string(character_tasks_entry.type));
insert_values.push_back(std::to_string(character_tasks_entry.acceptedtime));

View File

@ -1,318 +0,0 @@
/**
* EQEmulator: Everquest Server Emulator
* Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY except by those people which sell it, which
* are required to give you total support for your newly bought product;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
#ifndef EQEMU_BASE_CHARACTER_TRIBUTE_REPOSITORY_H
#define EQEMU_BASE_CHARACTER_TRIBUTE_REPOSITORY_H
#include "../../database.h"
#include "../../string_util.h"
class BaseCharacterTributeRepository {
public:
struct CharacterTribute {
int id;
int8 tier;
int tribute;
};
static std::string PrimaryKey()
{
return std::string("id");
}
static std::vector<std::string> Columns()
{
return {
"id",
"tier",
"tribute",
};
}
static std::string ColumnsRaw()
{
return std::string(implode(", ", Columns()));
}
static std::string InsertColumnsRaw()
{
std::vector<std::string> insert_columns;
for (auto &column : Columns()) {
if (column == PrimaryKey()) {
continue;
}
insert_columns.push_back(column);
}
return std::string(implode(", ", insert_columns));
}
static std::string TableName()
{
return std::string("character_tribute");
}
static std::string BaseSelect()
{
return fmt::format(
"SELECT {} FROM {}",
ColumnsRaw(),
TableName()
);
}
static std::string BaseInsert()
{
return fmt::format(
"INSERT INTO {} ({}) ",
TableName(),
InsertColumnsRaw()
);
}
static CharacterTribute NewEntity()
{
CharacterTribute entry{};
entry.id = 0;
entry.tier = 0;
entry.tribute = 0;
return entry;
}
static CharacterTribute GetCharacterTributeEntry(
const std::vector<CharacterTribute> &character_tributes,
int character_tribute_id
)
{
for (auto &character_tribute : character_tributes) {
if (character_tribute.id == character_tribute_id) {
return character_tribute;
}
}
return NewEntity();
}
static CharacterTribute FindOne(
int character_tribute_id
)
{
auto results = database.QueryDatabase(
fmt::format(
"{} WHERE id = {} LIMIT 1",
BaseSelect(),
character_tribute_id
)
);
auto row = results.begin();
if (results.RowCount() == 1) {
CharacterTribute entry{};
entry.id = atoi(row[0]);
entry.tier = atoi(row[1]);
entry.tribute = atoi(row[2]);
return entry;
}
return NewEntity();
}
static int DeleteOne(
int character_tribute_id
)
{
auto results = database.QueryDatabase(
fmt::format(
"DELETE FROM {} WHERE {} = {}",
TableName(),
PrimaryKey(),
character_tribute_id
)
);
return (results.Success() ? results.RowsAffected() : 0);
}
static int UpdateOne(
CharacterTribute character_tribute_entry
)
{
std::vector<std::string> update_values;
auto columns = Columns();
update_values.push_back(columns[0] + " = " + std::to_string(character_tribute_entry.id));
update_values.push_back(columns[1] + " = " + std::to_string(character_tribute_entry.tier));
update_values.push_back(columns[2] + " = " + std::to_string(character_tribute_entry.tribute));
auto results = database.QueryDatabase(
fmt::format(
"UPDATE {} SET {} WHERE {} = {}",
TableName(),
implode(", ", update_values),
PrimaryKey(),
character_tribute_entry.id
)
);
return (results.Success() ? results.RowsAffected() : 0);
}
static CharacterTribute InsertOne(
CharacterTribute character_tribute_entry
)
{
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(character_tribute_entry.id));
insert_values.push_back(std::to_string(character_tribute_entry.tier));
insert_values.push_back(std::to_string(character_tribute_entry.tribute));
auto results = database.QueryDatabase(
fmt::format(
"{} VALUES ({})",
BaseInsert(),
implode(",", insert_values)
)
);
if (results.Success()) {
character_tribute_entry.id = results.LastInsertedID();
return character_tribute_entry;
}
character_tribute_entry = NewEntity();
return character_tribute_entry;
}
static int InsertMany(
std::vector<CharacterTribute> character_tribute_entries
)
{
std::vector<std::string> insert_chunks;
for (auto &character_tribute_entry: character_tribute_entries) {
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(character_tribute_entry.id));
insert_values.push_back(std::to_string(character_tribute_entry.tier));
insert_values.push_back(std::to_string(character_tribute_entry.tribute));
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
}
std::vector<std::string> insert_values;
auto results = database.QueryDatabase(
fmt::format(
"{} VALUES {}",
BaseInsert(),
implode(",", insert_chunks)
)
);
return (results.Success() ? results.RowsAffected() : 0);
}
static std::vector<CharacterTribute> All()
{
std::vector<CharacterTribute> all_entries;
auto results = database.QueryDatabase(
fmt::format(
"{}",
BaseSelect()
)
);
all_entries.reserve(results.RowCount());
for (auto row = results.begin(); row != results.end(); ++row) {
CharacterTribute entry{};
entry.id = atoi(row[0]);
entry.tier = atoi(row[1]);
entry.tribute = atoi(row[2]);
all_entries.push_back(entry);
}
return all_entries;
}
static std::vector<CharacterTribute> GetWhere(std::string where_filter)
{
std::vector<CharacterTribute> all_entries;
auto results = database.QueryDatabase(
fmt::format(
"{} WHERE {}",
BaseSelect(),
where_filter
)
);
all_entries.reserve(results.RowCount());
for (auto row = results.begin(); row != results.end(); ++row) {
CharacterTribute entry{};
entry.id = atoi(row[0]);
entry.tier = atoi(row[1]);
entry.tribute = atoi(row[2]);
all_entries.push_back(entry);
}
return all_entries;
}
static int DeleteWhere(std::string where_filter)
{
auto results = database.QueryDatabase(
fmt::format(
"DELETE FROM {} WHERE {}",
TableName(),
PrimaryKey(),
where_filter
)
);
return (results.Success() ? results.RowsAffected() : 0);
}
};
#endif //EQEMU_BASE_CHARACTER_TRIBUTE_REPOSITORY_H

View File

@ -1,324 +0,0 @@
/**
* EQEmulator: Everquest Server Emulator
* Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY except by those people which sell it, which
* are required to give you total support for your newly bought product;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
#ifndef EQEMU_BASE_CHATCHANNELS_REPOSITORY_H
#define EQEMU_BASE_CHATCHANNELS_REPOSITORY_H
#include "../../database.h"
#include "../../string_util.h"
class BaseChatchannelsRepository {
public:
struct Chatchannels {
std::string name;
std::string owner;
std::string password;
int minstatus;
};
static std::string PrimaryKey()
{
return std::string("name");
}
static std::vector<std::string> Columns()
{
return {
"name",
"owner",
"password",
"minstatus",
};
}
static std::string ColumnsRaw()
{
return std::string(implode(", ", Columns()));
}
static std::string InsertColumnsRaw()
{
std::vector<std::string> insert_columns;
for (auto &column : Columns()) {
if (column == PrimaryKey()) {
continue;
}
insert_columns.push_back(column);
}
return std::string(implode(", ", insert_columns));
}
static std::string TableName()
{
return std::string("chatchannels");
}
static std::string BaseSelect()
{
return fmt::format(
"SELECT {} FROM {}",
ColumnsRaw(),
TableName()
);
}
static std::string BaseInsert()
{
return fmt::format(
"INSERT INTO {} ({}) ",
TableName(),
InsertColumnsRaw()
);
}
static Chatchannels NewEntity()
{
Chatchannels entry{};
entry.name = "";
entry.owner = "";
entry.password = "";
entry.minstatus = 0;
return entry;
}
static Chatchannels GetChatchannelsEntry(
const std::vector<Chatchannels> &chatchannelss,
int chatchannels_id
)
{
for (auto &chatchannels : chatchannelss) {
if (chatchannels.name == chatchannels_id) {
return chatchannels;
}
}
return NewEntity();
}
static Chatchannels FindOne(
int chatchannels_id
)
{
auto results = database.QueryDatabase(
fmt::format(
"{} WHERE id = {} LIMIT 1",
BaseSelect(),
chatchannels_id
)
);
auto row = results.begin();
if (results.RowCount() == 1) {
Chatchannels entry{};
entry.name = row[0] ? row[0] : "";
entry.owner = row[1] ? row[1] : "";
entry.password = row[2] ? row[2] : "";
entry.minstatus = atoi(row[3]);
return entry;
}
return NewEntity();
}
static int DeleteOne(
int chatchannels_id
)
{
auto results = database.QueryDatabase(
fmt::format(
"DELETE FROM {} WHERE {} = {}",
TableName(),
PrimaryKey(),
chatchannels_id
)
);
return (results.Success() ? results.RowsAffected() : 0);
}
static int UpdateOne(
Chatchannels chatchannels_entry
)
{
std::vector<std::string> update_values;
auto columns = Columns();
update_values.push_back(columns[1] + " = '" + EscapeString(chatchannels_entry.owner) + "'");
update_values.push_back(columns[2] + " = '" + EscapeString(chatchannels_entry.password) + "'");
update_values.push_back(columns[3] + " = " + std::to_string(chatchannels_entry.minstatus));
auto results = database.QueryDatabase(
fmt::format(
"UPDATE {} SET {} WHERE {} = {}",
TableName(),
implode(", ", update_values),
PrimaryKey(),
chatchannels_entry.name
)
);
return (results.Success() ? results.RowsAffected() : 0);
}
static Chatchannels InsertOne(
Chatchannels chatchannels_entry
)
{
std::vector<std::string> insert_values;
insert_values.push_back("'" + EscapeString(chatchannels_entry.owner) + "'");
insert_values.push_back("'" + EscapeString(chatchannels_entry.password) + "'");
insert_values.push_back(std::to_string(chatchannels_entry.minstatus));
auto results = database.QueryDatabase(
fmt::format(
"{} VALUES ({})",
BaseInsert(),
implode(",", insert_values)
)
);
if (results.Success()) {
chatchannels_entry.id = results.LastInsertedID();
return chatchannels_entry;
}
chatchannels_entry = NewEntity();
return chatchannels_entry;
}
static int InsertMany(
std::vector<Chatchannels> chatchannels_entries
)
{
std::vector<std::string> insert_chunks;
for (auto &chatchannels_entry: chatchannels_entries) {
std::vector<std::string> insert_values;
insert_values.push_back("'" + EscapeString(chatchannels_entry.owner) + "'");
insert_values.push_back("'" + EscapeString(chatchannels_entry.password) + "'");
insert_values.push_back(std::to_string(chatchannels_entry.minstatus));
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
}
std::vector<std::string> insert_values;
auto results = database.QueryDatabase(
fmt::format(
"{} VALUES {}",
BaseInsert(),
implode(",", insert_chunks)
)
);
return (results.Success() ? results.RowsAffected() : 0);
}
static std::vector<Chatchannels> All()
{
std::vector<Chatchannels> all_entries;
auto results = database.QueryDatabase(
fmt::format(
"{}",
BaseSelect()
)
);
all_entries.reserve(results.RowCount());
for (auto row = results.begin(); row != results.end(); ++row) {
Chatchannels entry{};
entry.name = row[0] ? row[0] : "";
entry.owner = row[1] ? row[1] : "";
entry.password = row[2] ? row[2] : "";
entry.minstatus = atoi(row[3]);
all_entries.push_back(entry);
}
return all_entries;
}
static std::vector<Chatchannels> GetWhere(std::string where_filter)
{
std::vector<Chatchannels> all_entries;
auto results = database.QueryDatabase(
fmt::format(
"{} WHERE {}",
BaseSelect(),
where_filter
)
);
all_entries.reserve(results.RowCount());
for (auto row = results.begin(); row != results.end(); ++row) {
Chatchannels entry{};
entry.name = row[0] ? row[0] : "";
entry.owner = row[1] ? row[1] : "";
entry.password = row[2] ? row[2] : "";
entry.minstatus = atoi(row[3]);
all_entries.push_back(entry);
}
return all_entries;
}
static int DeleteWhere(std::string where_filter)
{
auto results = database.QueryDatabase(
fmt::format(
"DELETE FROM {} WHERE {}",
TableName(),
PrimaryKey(),
where_filter
)
);
return (results.Success() ? results.RowsAffected() : 0);
}
};
#endif //EQEMU_BASE_CHATCHANNELS_REPOSITORY_H

View File

@ -1,315 +0,0 @@
/**
* EQEmulator: Everquest Server Emulator
* Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY except by those people which sell it, which
* are required to give you total support for your newly bought product;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
#ifndef EQEMU_BASE_COMMAND_SETTINGS_REPOSITORY_H
#define EQEMU_BASE_COMMAND_SETTINGS_REPOSITORY_H
#include "../../database.h"
#include "../../string_util.h"
class BaseCommandSettingsRepository {
public:
struct CommandSettings {
std::string command;
int access;
std::string aliases;
};
static std::string PrimaryKey()
{
return std::string("command");
}
static std::vector<std::string> Columns()
{
return {
"command",
"access",
"aliases",
};
}
static std::string ColumnsRaw()
{
return std::string(implode(", ", Columns()));
}
static std::string InsertColumnsRaw()
{
std::vector<std::string> insert_columns;
for (auto &column : Columns()) {
if (column == PrimaryKey()) {
continue;
}
insert_columns.push_back(column);
}
return std::string(implode(", ", insert_columns));
}
static std::string TableName()
{
return std::string("command_settings");
}
static std::string BaseSelect()
{
return fmt::format(
"SELECT {} FROM {}",
ColumnsRaw(),
TableName()
);
}
static std::string BaseInsert()
{
return fmt::format(
"INSERT INTO {} ({}) ",
TableName(),
InsertColumnsRaw()
);
}
static CommandSettings NewEntity()
{
CommandSettings entry{};
entry.command = "";
entry.access = 0;
entry.aliases = "";
return entry;
}
static CommandSettings GetCommandSettingsEntry(
const std::vector<CommandSettings> &command_settingss,
int command_settings_id
)
{
for (auto &command_settings : command_settingss) {
if (command_settings.command == command_settings_id) {
return command_settings;
}
}
return NewEntity();
}
static CommandSettings FindOne(
int command_settings_id
)
{
auto results = database.QueryDatabase(
fmt::format(
"{} WHERE id = {} LIMIT 1",
BaseSelect(),
command_settings_id
)
);
auto row = results.begin();
if (results.RowCount() == 1) {
CommandSettings entry{};
entry.command = row[0] ? row[0] : "";
entry.access = atoi(row[1]);
entry.aliases = row[2] ? row[2] : "";
return entry;
}
return NewEntity();
}
static int DeleteOne(
int command_settings_id
)
{
auto results = database.QueryDatabase(
fmt::format(
"DELETE FROM {} WHERE {} = {}",
TableName(),
PrimaryKey(),
command_settings_id
)
);
return (results.Success() ? results.RowsAffected() : 0);
}
static int UpdateOne(
CommandSettings command_settings_entry
)
{
std::vector<std::string> update_values;
auto columns = Columns();
update_values.push_back(columns[1] + " = " + std::to_string(command_settings_entry.access));
update_values.push_back(columns[2] + " = '" + EscapeString(command_settings_entry.aliases) + "'");
auto results = database.QueryDatabase(
fmt::format(
"UPDATE {} SET {} WHERE {} = {}",
TableName(),
implode(", ", update_values),
PrimaryKey(),
command_settings_entry.command
)
);
return (results.Success() ? results.RowsAffected() : 0);
}
static CommandSettings InsertOne(
CommandSettings command_settings_entry
)
{
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(command_settings_entry.access));
insert_values.push_back("'" + EscapeString(command_settings_entry.aliases) + "'");
auto results = database.QueryDatabase(
fmt::format(
"{} VALUES ({})",
BaseInsert(),
implode(",", insert_values)
)
);
if (results.Success()) {
command_settings_entry.id = results.LastInsertedID();
return command_settings_entry;
}
command_settings_entry = NewEntity();
return command_settings_entry;
}
static int InsertMany(
std::vector<CommandSettings> command_settings_entries
)
{
std::vector<std::string> insert_chunks;
for (auto &command_settings_entry: command_settings_entries) {
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(command_settings_entry.access));
insert_values.push_back("'" + EscapeString(command_settings_entry.aliases) + "'");
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
}
std::vector<std::string> insert_values;
auto results = database.QueryDatabase(
fmt::format(
"{} VALUES {}",
BaseInsert(),
implode(",", insert_chunks)
)
);
return (results.Success() ? results.RowsAffected() : 0);
}
static std::vector<CommandSettings> All()
{
std::vector<CommandSettings> all_entries;
auto results = database.QueryDatabase(
fmt::format(
"{}",
BaseSelect()
)
);
all_entries.reserve(results.RowCount());
for (auto row = results.begin(); row != results.end(); ++row) {
CommandSettings entry{};
entry.command = row[0] ? row[0] : "";
entry.access = atoi(row[1]);
entry.aliases = row[2] ? row[2] : "";
all_entries.push_back(entry);
}
return all_entries;
}
static std::vector<CommandSettings> GetWhere(std::string where_filter)
{
std::vector<CommandSettings> all_entries;
auto results = database.QueryDatabase(
fmt::format(
"{} WHERE {}",
BaseSelect(),
where_filter
)
);
all_entries.reserve(results.RowCount());
for (auto row = results.begin(); row != results.end(); ++row) {
CommandSettings entry{};
entry.command = row[0] ? row[0] : "";
entry.access = atoi(row[1]);
entry.aliases = row[2] ? row[2] : "";
all_entries.push_back(entry);
}
return all_entries;
}
static int DeleteWhere(std::string where_filter)
{
auto results = database.QueryDatabase(
fmt::format(
"DELETE FROM {} WHERE {}",
TableName(),
PrimaryKey(),
where_filter
)
);
return (results.Success() ? results.RowsAffected() : 0);
}
};
#endif //EQEMU_BASE_COMMAND_SETTINGS_REPOSITORY_H

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -43,7 +43,7 @@ public:
static std::string PrimaryKey()
{
return std::string("activityid");
return std::string("charid");
}
static std::vector<std::string> Columns()
@ -117,7 +117,7 @@ public:
)
{
for (auto &completed_tasks : completed_taskss) {
if (completed_tasks.activityid == completed_tasks_id) {
if (completed_tasks.charid == completed_tasks_id) {
return completed_tasks;
}
}
@ -176,7 +176,10 @@ public:
auto columns = Columns();
update_values.push_back(columns[0] + " = " + std::to_string(completed_tasks_entry.charid));
update_values.push_back(columns[1] + " = " + std::to_string(completed_tasks_entry.completedtime));
update_values.push_back(columns[2] + " = " + std::to_string(completed_tasks_entry.taskid));
update_values.push_back(columns[3] + " = " + std::to_string(completed_tasks_entry.activityid));
auto results = database.QueryDatabase(
fmt::format(
@ -184,7 +187,7 @@ public:
TableName(),
implode(", ", update_values),
PrimaryKey(),
completed_tasks_entry.activityid
completed_tasks_entry.charid
)
);
@ -197,7 +200,10 @@ public:
{
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(completed_tasks_entry.charid));
insert_values.push_back(std::to_string(completed_tasks_entry.completedtime));
insert_values.push_back(std::to_string(completed_tasks_entry.taskid));
insert_values.push_back(std::to_string(completed_tasks_entry.activityid));
auto results = database.QueryDatabase(
fmt::format(
@ -208,7 +214,7 @@ public:
);
if (results.Success()) {
completed_tasks_entry.id = results.LastInsertedID();
completed_tasks_entry.charid = results.LastInsertedID();
return completed_tasks_entry;
}
@ -226,7 +232,10 @@ public:
for (auto &completed_tasks_entry: completed_tasks_entries) {
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(completed_tasks_entry.charid));
insert_values.push_back(std::to_string(completed_tasks_entry.completedtime));
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) + ")");
}

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -42,7 +42,7 @@ public:
static std::string PrimaryKey()
{
return std::string("type");
return std::string("id");
}
static std::vector<std::string> Columns()
@ -114,7 +114,7 @@ public:
)
{
for (auto &db_str : db_strs) {
if (db_str.type == db_str_id) {
if (db_str.id == db_str_id) {
return db_str;
}
}
@ -172,6 +172,8 @@ public:
auto columns = Columns();
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) + "'");
auto results = database.QueryDatabase(
@ -180,7 +182,7 @@ public:
TableName(),
implode(", ", update_values),
PrimaryKey(),
db_str_entry.type
db_str_entry.id
)
);
@ -193,6 +195,8 @@ public:
{
std::vector<std::string> insert_values;
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) + "'");
auto results = database.QueryDatabase(
@ -222,6 +226,8 @@ public:
for (auto &db_str_entry: db_str_entries) {
std::vector<std::string> insert_values;
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_chunks.push_back("(" + implode(",", insert_values) + ")");

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -176,6 +176,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[2] + " = " + std::to_string(discovered_items_entry.discovered_date));
update_values.push_back(columns[3] + " = " + std::to_string(discovered_items_entry.account_status));
@ -199,6 +200,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(std::to_string(discovered_items_entry.discovered_date));
insert_values.push_back(std::to_string(discovered_items_entry.account_status));
@ -212,7 +214,7 @@ public:
);
if (results.Success()) {
discovered_items_entry.id = results.LastInsertedID();
discovered_items_entry.item_id = results.LastInsertedID();
return discovered_items_entry;
}
@ -230,6 +232,7 @@ public:
for (auto &discovered_items_entry: discovered_items_entries) {
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(std::to_string(discovered_items_entry.discovered_date));
insert_values.push_back(std::to_string(discovered_items_entry.account_status));

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -184,6 +184,7 @@ public:
auto columns = Columns();
update_values.push_back(columns[0] + " = " + std::to_string(faction_base_data_entry.client_faction_id));
update_values.push_back(columns[1] + " = " + std::to_string(faction_base_data_entry.min));
update_values.push_back(columns[2] + " = " + std::to_string(faction_base_data_entry.max));
update_values.push_back(columns[3] + " = " + std::to_string(faction_base_data_entry.unk_hero1));
@ -209,6 +210,7 @@ public:
{
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(faction_base_data_entry.client_faction_id));
insert_values.push_back(std::to_string(faction_base_data_entry.min));
insert_values.push_back(std::to_string(faction_base_data_entry.max));
insert_values.push_back(std::to_string(faction_base_data_entry.unk_hero1));
@ -224,7 +226,7 @@ public:
);
if (results.Success()) {
faction_base_data_entry.id = results.LastInsertedID();
faction_base_data_entry.client_faction_id = results.LastInsertedID();
return faction_base_data_entry;
}
@ -242,6 +244,7 @@ public:
for (auto &faction_base_data_entry: faction_base_data_entries) {
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(faction_base_data_entry.client_faction_id));
insert_values.push_back(std::to_string(faction_base_data_entry.min));
insert_values.push_back(std::to_string(faction_base_data_entry.max));
insert_values.push_back(std::to_string(faction_base_data_entry.unk_hero1));

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -172,6 +172,7 @@ 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[2] + " = " + std::to_string(faction_list_entry.base));
@ -194,6 +195,7 @@ 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(std::to_string(faction_list_entry.base));
@ -224,6 +226,7 @@ public:
for (auto &faction_list_entry: faction_list_entries) {
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(std::to_string(faction_list_entry.base));

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -43,7 +43,7 @@ public:
static std::string PrimaryKey()
{
return std::string("faction_id");
return std::string("char_id");
}
static std::vector<std::string> Columns()
@ -117,7 +117,7 @@ public:
)
{
for (auto &faction_values : faction_valuess) {
if (faction_values.faction_id == faction_values_id) {
if (faction_values.char_id == faction_values_id) {
return faction_values;
}
}
@ -176,6 +176,8 @@ public:
auto columns = Columns();
update_values.push_back(columns[0] + " = " + std::to_string(faction_values_entry.char_id));
update_values.push_back(columns[1] + " = " + std::to_string(faction_values_entry.faction_id));
update_values.push_back(columns[2] + " = " + std::to_string(faction_values_entry.current_value));
update_values.push_back(columns[3] + " = " + std::to_string(faction_values_entry.temp));
@ -185,7 +187,7 @@ public:
TableName(),
implode(", ", update_values),
PrimaryKey(),
faction_values_entry.faction_id
faction_values_entry.char_id
)
);
@ -198,6 +200,8 @@ public:
{
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(faction_values_entry.char_id));
insert_values.push_back(std::to_string(faction_values_entry.faction_id));
insert_values.push_back(std::to_string(faction_values_entry.current_value));
insert_values.push_back(std::to_string(faction_values_entry.temp));
@ -210,7 +214,7 @@ public:
);
if (results.Success()) {
faction_values_entry.id = results.LastInsertedID();
faction_values_entry.char_id = results.LastInsertedID();
return faction_values_entry;
}
@ -228,6 +232,8 @@ public:
for (auto &faction_values_entry: faction_values_entries) {
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(faction_values_entry.char_id));
insert_values.push_back(std::to_string(faction_values_entry.faction_id));
insert_values.push_back(std::to_string(faction_values_entry.current_value));
insert_values.push_back(std::to_string(faction_values_entry.temp));

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -42,7 +42,7 @@ public:
static std::string PrimaryKey()
{
return std::string("name");
return std::string("charid");
}
static std::vector<std::string> Columns()
@ -114,7 +114,7 @@ public:
)
{
for (auto &friends : friendss) {
if (friends.name == friends_id) {
if (friends.charid == friends_id) {
return friends;
}
}
@ -172,7 +172,9 @@ public:
auto columns = Columns();
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) + "'");
auto results = database.QueryDatabase(
fmt::format(
@ -180,7 +182,7 @@ public:
TableName(),
implode(", ", update_values),
PrimaryKey(),
friends_entry.name
friends_entry.charid
)
);
@ -193,7 +195,9 @@ public:
{
std::vector<std::string> insert_values;
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) + "'");
auto results = database.QueryDatabase(
fmt::format(
@ -204,7 +208,7 @@ public:
);
if (results.Success()) {
friends_entry.id = results.LastInsertedID();
friends_entry.charid = results.LastInsertedID();
return friends_entry;
}
@ -222,7 +226,9 @@ public:
for (auto &friends_entry: friends_entries) {
std::vector<std::string> insert_values;
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_chunks.push_back("(" + implode(",", insert_values) + ")");
}

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -42,7 +42,7 @@ public:
static std::string PrimaryKey()
{
return std::string("ip_address");
return std::string("account_id");
}
static std::vector<std::string> Columns()
@ -114,7 +114,7 @@ public:
)
{
for (auto &gm_ips : gm_ipss) {
if (gm_ips.ip_address == gm_ips_id) {
if (gm_ips.account_id == gm_ips_id) {
return gm_ips;
}
}
@ -173,6 +173,8 @@ public:
auto columns = Columns();
update_values.push_back(columns[0] + " = '" + EscapeString(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) + "'");
auto results = database.QueryDatabase(
fmt::format(
@ -180,7 +182,7 @@ public:
TableName(),
implode(", ", update_values),
PrimaryKey(),
gm_ips_entry.ip_address
gm_ips_entry.account_id
)
);
@ -194,6 +196,8 @@ public:
std::vector<std::string> insert_values;
insert_values.push_back("'" + EscapeString(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) + "'");
auto results = database.QueryDatabase(
fmt::format(
@ -204,7 +208,7 @@ public:
);
if (results.Success()) {
gm_ips_entry.id = results.LastInsertedID();
gm_ips_entry.account_id = results.LastInsertedID();
return gm_ips_entry;
}
@ -223,6 +227,8 @@ public:
std::vector<std::string> insert_values;
insert_values.push_back("'" + EscapeString(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_chunks.push_back("(" + implode(",", insert_values) + ")");
}

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr11, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -43,7 +43,7 @@ public:
static std::string PrimaryKey()
{
return std::string("zoneid");
return std::string("id");
}
static std::vector<std::string> Columns()
@ -117,7 +117,7 @@ public:
)
{
for (auto &grid : grids) {
if (grid.zoneid == grid_id) {
if (grid.id == grid_id) {
return grid;
}
}
@ -176,6 +176,8 @@ public:
auto columns = Columns();
update_values.push_back(columns[0] + " = " + std::to_string(grid_entry.id));
update_values.push_back(columns[1] + " = " + std::to_string(grid_entry.zoneid));
update_values.push_back(columns[2] + " = " + std::to_string(grid_entry.type));
update_values.push_back(columns[3] + " = " + std::to_string(grid_entry.type2));
@ -185,7 +187,7 @@ public:
TableName(),
implode(", ", update_values),
PrimaryKey(),
grid_entry.zoneid
grid_entry.id
)
);
@ -198,6 +200,8 @@ public:
{
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(grid_entry.id));
insert_values.push_back(std::to_string(grid_entry.zoneid));
insert_values.push_back(std::to_string(grid_entry.type));
insert_values.push_back(std::to_string(grid_entry.type2));
@ -228,6 +232,8 @@ public:
for (auto &grid_entry: grid_entries) {
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(grid_entry.id));
insert_values.push_back(std::to_string(grid_entry.zoneid));
insert_values.push_back(std::to_string(grid_entry.type));
insert_values.push_back(std::to_string(grid_entry.type2));

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -43,7 +43,7 @@ public:
static std::string PrimaryKey()
{
return std::string("ismerc");
return std::string("groupid");
}
static std::vector<std::string> Columns()
@ -117,7 +117,7 @@ public:
)
{
for (auto &group_id : group_ids) {
if (group_id.ismerc == group_id_id) {
if (group_id.groupid == group_id_id) {
return group_id;
}
}
@ -176,7 +176,10 @@ public:
auto columns = Columns();
update_values.push_back(columns[0] + " = " + std::to_string(group_id_entry.groupid));
update_values.push_back(columns[1] + " = " + std::to_string(group_id_entry.charid));
update_values.push_back(columns[2] + " = '" + EscapeString(group_id_entry.name) + "'");
update_values.push_back(columns[3] + " = " + std::to_string(group_id_entry.ismerc));
auto results = database.QueryDatabase(
fmt::format(
@ -184,7 +187,7 @@ public:
TableName(),
implode(", ", update_values),
PrimaryKey(),
group_id_entry.ismerc
group_id_entry.groupid
)
);
@ -197,7 +200,10 @@ public:
{
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(group_id_entry.groupid));
insert_values.push_back(std::to_string(group_id_entry.charid));
insert_values.push_back("'" + EscapeString(group_id_entry.name) + "'");
insert_values.push_back(std::to_string(group_id_entry.ismerc));
auto results = database.QueryDatabase(
fmt::format(
@ -208,7 +214,7 @@ public:
);
if (results.Success()) {
group_id_entry.id = results.LastInsertedID();
group_id_entry.groupid = results.LastInsertedID();
return group_id_entry;
}
@ -226,7 +232,10 @@ public:
for (auto &group_id_entry: group_id_entries) {
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(group_id_entry.groupid));
insert_values.push_back(std::to_string(group_id_entry.charid));
insert_values.push_back("'" + EscapeString(group_id_entry.name) + "'");
insert_values.push_back(std::to_string(group_id_entry.ismerc));
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
}

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -196,6 +196,7 @@ public:
auto columns = Columns();
update_values.push_back(columns[0] + " = " + std::to_string(group_leaders_entry.gid));
update_values.push_back(columns[1] + " = '" + EscapeString(group_leaders_entry.leadername) + "'");
update_values.push_back(columns[2] + " = '" + EscapeString(group_leaders_entry.marknpc) + "'");
update_values.push_back(columns[3] + " = '" + EscapeString(group_leaders_entry.leadershipaa) + "'");
@ -224,6 +225,7 @@ public:
{
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(group_leaders_entry.gid));
insert_values.push_back("'" + EscapeString(group_leaders_entry.leadername) + "'");
insert_values.push_back("'" + EscapeString(group_leaders_entry.marknpc) + "'");
insert_values.push_back("'" + EscapeString(group_leaders_entry.leadershipaa) + "'");
@ -242,7 +244,7 @@ public:
);
if (results.Success()) {
group_leaders_entry.id = results.LastInsertedID();
group_leaders_entry.gid = results.LastInsertedID();
return group_leaders_entry;
}
@ -260,6 +262,7 @@ public:
for (auto &group_leaders_entry: group_leaders_entries) {
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(group_leaders_entry.gid));
insert_values.push_back("'" + EscapeString(group_leaders_entry.leadername) + "'");
insert_values.push_back("'" + EscapeString(group_leaders_entry.marknpc) + "'");
insert_values.push_back("'" + EscapeString(group_leaders_entry.leadershipaa) + "'");

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -196,6 +196,7 @@ public:
auto columns = Columns();
update_values.push_back(columns[0] + " = " + std::to_string(guild_members_entry.char_id));
update_values.push_back(columns[1] + " = " + std::to_string(guild_members_entry.guild_id));
update_values.push_back(columns[2] + " = " + std::to_string(guild_members_entry.rank));
update_values.push_back(columns[3] + " = " + std::to_string(guild_members_entry.tribute_enable));
@ -224,6 +225,7 @@ public:
{
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(guild_members_entry.char_id));
insert_values.push_back(std::to_string(guild_members_entry.guild_id));
insert_values.push_back(std::to_string(guild_members_entry.rank));
insert_values.push_back(std::to_string(guild_members_entry.tribute_enable));
@ -242,7 +244,7 @@ public:
);
if (results.Success()) {
guild_members_entry.id = results.LastInsertedID();
guild_members_entry.char_id = results.LastInsertedID();
return guild_members_entry;
}
@ -260,6 +262,7 @@ public:
for (auto &guild_members_entry: guild_members_entries) {
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(guild_members_entry.char_id));
insert_values.push_back(std::to_string(guild_members_entry.guild_id));
insert_values.push_back(std::to_string(guild_members_entry.rank));
insert_values.push_back(std::to_string(guild_members_entry.tribute_enable));

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -50,7 +50,7 @@ public:
static std::string PrimaryKey()
{
return std::string("rank");
return std::string("guild_id");
}
static std::vector<std::string> Columns()
@ -138,7 +138,7 @@ public:
)
{
for (auto &guild_ranks : guild_rankss) {
if (guild_ranks.rank == guild_ranks_id) {
if (guild_ranks.guild_id == guild_ranks_id) {
return guild_ranks;
}
}
@ -204,6 +204,8 @@ public:
auto columns = Columns();
update_values.push_back(columns[0] + " = " + std::to_string(guild_ranks_entry.guild_id));
update_values.push_back(columns[1] + " = " + std::to_string(guild_ranks_entry.rank));
update_values.push_back(columns[2] + " = '" + EscapeString(guild_ranks_entry.title) + "'");
update_values.push_back(columns[3] + " = " + std::to_string(guild_ranks_entry.can_hear));
update_values.push_back(columns[4] + " = " + std::to_string(guild_ranks_entry.can_speak));
@ -220,7 +222,7 @@ public:
TableName(),
implode(", ", update_values),
PrimaryKey(),
guild_ranks_entry.rank
guild_ranks_entry.guild_id
)
);
@ -233,6 +235,8 @@ public:
{
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(guild_ranks_entry.guild_id));
insert_values.push_back(std::to_string(guild_ranks_entry.rank));
insert_values.push_back("'" + EscapeString(guild_ranks_entry.title) + "'");
insert_values.push_back(std::to_string(guild_ranks_entry.can_hear));
insert_values.push_back(std::to_string(guild_ranks_entry.can_speak));
@ -252,7 +256,7 @@ public:
);
if (results.Success()) {
guild_ranks_entry.id = results.LastInsertedID();
guild_ranks_entry.guild_id = results.LastInsertedID();
return guild_ranks_entry;
}
@ -270,6 +274,8 @@ public:
for (auto &guild_ranks_entry: guild_ranks_entries) {
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(guild_ranks_entry.guild_id));
insert_values.push_back(std::to_string(guild_ranks_entry.rank));
insert_values.push_back("'" + EscapeString(guild_ranks_entry.title) + "'");
insert_values.push_back(std::to_string(guild_ranks_entry.can_hear));
insert_values.push_back(std::to_string(guild_ranks_entry.can_speak));

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -42,7 +42,7 @@ public:
static std::string PrimaryKey()
{
return std::string("guild2");
return std::string("guild1");
}
static std::vector<std::string> Columns()
@ -114,7 +114,7 @@ public:
)
{
for (auto &guild_relations : guild_relationss) {
if (guild_relations.guild2 == guild_relations_id) {
if (guild_relations.guild1 == guild_relations_id) {
return guild_relations;
}
}
@ -172,6 +172,8 @@ public:
auto columns = Columns();
update_values.push_back(columns[0] + " = " + std::to_string(guild_relations_entry.guild1));
update_values.push_back(columns[1] + " = " + std::to_string(guild_relations_entry.guild2));
update_values.push_back(columns[2] + " = " + std::to_string(guild_relations_entry.relation));
auto results = database.QueryDatabase(
@ -180,7 +182,7 @@ public:
TableName(),
implode(", ", update_values),
PrimaryKey(),
guild_relations_entry.guild2
guild_relations_entry.guild1
)
);
@ -193,6 +195,8 @@ public:
{
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(guild_relations_entry.guild1));
insert_values.push_back(std::to_string(guild_relations_entry.guild2));
insert_values.push_back(std::to_string(guild_relations_entry.relation));
auto results = database.QueryDatabase(
@ -204,7 +208,7 @@ public:
);
if (results.Success()) {
guild_relations_entry.id = results.LastInsertedID();
guild_relations_entry.guild1 = results.LastInsertedID();
return guild_relations_entry;
}
@ -222,6 +226,8 @@ public:
for (auto &guild_relations_entry: guild_relations_entries) {
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(guild_relations_entry.guild1));
insert_values.push_back(std::to_string(guild_relations_entry.guild2));
insert_values.push_back(std::to_string(guild_relations_entry.relation));
insert_chunks.push_back("(" + implode(",", insert_values) + ")");

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -184,6 +184,7 @@ public:
auto columns = Columns();
update_values.push_back(columns[0] + " = '" + EscapeString(horses_entry.filename) + "'");
update_values.push_back(columns[1] + " = " + std::to_string(horses_entry.race));
update_values.push_back(columns[2] + " = " + std::to_string(horses_entry.gender));
update_values.push_back(columns[3] + " = " + std::to_string(horses_entry.texture));
@ -209,6 +210,7 @@ public:
{
std::vector<std::string> insert_values;
insert_values.push_back("'" + EscapeString(horses_entry.filename) + "'");
insert_values.push_back(std::to_string(horses_entry.race));
insert_values.push_back(std::to_string(horses_entry.gender));
insert_values.push_back(std::to_string(horses_entry.texture));
@ -224,7 +226,7 @@ public:
);
if (results.Success()) {
horses_entry.id = results.LastInsertedID();
horses_entry.filename = results.LastInsertedID();
return horses_entry;
}
@ -242,6 +244,7 @@ public:
for (auto &horses_entry: horses_entries) {
std::vector<std::string> insert_values;
insert_values.push_back("'" + EscapeString(horses_entry.filename) + "'");
insert_values.push_back(std::to_string(horses_entry.race));
insert_values.push_back(std::to_string(horses_entry.gender));
insert_values.push_back(std::to_string(horses_entry.texture));

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -41,7 +41,7 @@ public:
static std::string PrimaryKey()
{
return std::string("charid");
return std::string("id");
}
static std::vector<std::string> Columns()
@ -111,7 +111,7 @@ public:
)
{
for (auto &instance_list_player : instance_list_players) {
if (instance_list_player.charid == instance_list_player_id) {
if (instance_list_player.id == instance_list_player_id) {
return instance_list_player;
}
}
@ -168,7 +168,8 @@ public:
auto columns = Columns();
update_values.push_back(columns[0] + " = " + std::to_string(instance_list_player_entry.id));
update_values.push_back(columns[1] + " = " + std::to_string(instance_list_player_entry.charid));
auto results = database.QueryDatabase(
fmt::format(
@ -176,7 +177,7 @@ public:
TableName(),
implode(", ", update_values),
PrimaryKey(),
instance_list_player_entry.charid
instance_list_player_entry.id
)
);
@ -189,7 +190,8 @@ public:
{
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(instance_list_player_entry.id));
insert_values.push_back(std::to_string(instance_list_player_entry.charid));
auto results = database.QueryDatabase(
fmt::format(
@ -218,7 +220,8 @@ public:
for (auto &instance_list_player_entry: instance_list_player_entries) {
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(instance_list_player_entry.id));
insert_values.push_back(std::to_string(instance_list_player_entry.charid));
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
}

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -55,7 +55,7 @@ public:
static std::string PrimaryKey()
{
return std::string("slotid");
return std::string("charid");
}
static std::vector<std::string> Columns()
@ -153,7 +153,7 @@ public:
)
{
for (auto &inventory : inventorys) {
if (inventory.slotid == inventory_id) {
if (inventory.charid == inventory_id) {
return inventory;
}
}
@ -224,6 +224,8 @@ public:
auto columns = Columns();
update_values.push_back(columns[0] + " = " + std::to_string(inventory_entry.charid));
update_values.push_back(columns[1] + " = " + std::to_string(inventory_entry.slotid));
update_values.push_back(columns[2] + " = " + std::to_string(inventory_entry.itemid));
update_values.push_back(columns[3] + " = " + std::to_string(inventory_entry.charges));
update_values.push_back(columns[4] + " = " + std::to_string(inventory_entry.color));
@ -245,7 +247,7 @@ public:
TableName(),
implode(", ", update_values),
PrimaryKey(),
inventory_entry.slotid
inventory_entry.charid
)
);
@ -258,6 +260,8 @@ public:
{
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(inventory_entry.charid));
insert_values.push_back(std::to_string(inventory_entry.slotid));
insert_values.push_back(std::to_string(inventory_entry.itemid));
insert_values.push_back(std::to_string(inventory_entry.charges));
insert_values.push_back(std::to_string(inventory_entry.color));
@ -282,7 +286,7 @@ public:
);
if (results.Success()) {
inventory_entry.id = results.LastInsertedID();
inventory_entry.charid = results.LastInsertedID();
return inventory_entry;
}
@ -300,6 +304,8 @@ public:
for (auto &inventory_entry: inventory_entries) {
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(inventory_entry.charid));
insert_values.push_back(std::to_string(inventory_entry.slotid));
insert_values.push_back(std::to_string(inventory_entry.itemid));
insert_values.push_back(std::to_string(inventory_entry.charges));
insert_values.push_back(std::to_string(inventory_entry.color));

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -56,7 +56,7 @@ public:
static std::string PrimaryKey()
{
return std::string("slotid");
return std::string("time_index");
}
static std::vector<std::string> Columns()
@ -156,7 +156,7 @@ public:
)
{
for (auto &inventory_snapshots : inventory_snapshotss) {
if (inventory_snapshots.slotid == inventory_snapshots_id) {
if (inventory_snapshots.time_index == inventory_snapshots_id) {
return inventory_snapshots;
}
}
@ -228,6 +228,9 @@ public:
auto columns = Columns();
update_values.push_back(columns[0] + " = " + std::to_string(inventory_snapshots_entry.time_index));
update_values.push_back(columns[1] + " = " + std::to_string(inventory_snapshots_entry.charid));
update_values.push_back(columns[2] + " = " + std::to_string(inventory_snapshots_entry.slotid));
update_values.push_back(columns[3] + " = " + std::to_string(inventory_snapshots_entry.itemid));
update_values.push_back(columns[4] + " = " + std::to_string(inventory_snapshots_entry.charges));
update_values.push_back(columns[5] + " = " + std::to_string(inventory_snapshots_entry.color));
@ -249,7 +252,7 @@ public:
TableName(),
implode(", ", update_values),
PrimaryKey(),
inventory_snapshots_entry.slotid
inventory_snapshots_entry.time_index
)
);
@ -262,6 +265,9 @@ public:
{
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(inventory_snapshots_entry.time_index));
insert_values.push_back(std::to_string(inventory_snapshots_entry.charid));
insert_values.push_back(std::to_string(inventory_snapshots_entry.slotid));
insert_values.push_back(std::to_string(inventory_snapshots_entry.itemid));
insert_values.push_back(std::to_string(inventory_snapshots_entry.charges));
insert_values.push_back(std::to_string(inventory_snapshots_entry.color));
@ -286,7 +292,7 @@ public:
);
if (results.Success()) {
inventory_snapshots_entry.id = results.LastInsertedID();
inventory_snapshots_entry.time_index = results.LastInsertedID();
return inventory_snapshots_entry;
}
@ -304,6 +310,9 @@ public:
for (auto &inventory_snapshots_entry: inventory_snapshots_entries) {
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(inventory_snapshots_entry.time_index));
insert_values.push_back(std::to_string(inventory_snapshots_entry.charid));
insert_values.push_back(std::to_string(inventory_snapshots_entry.slotid));
insert_values.push_back(std::to_string(inventory_snapshots_entry.itemid));
insert_values.push_back(std::to_string(inventory_snapshots_entry.charges));
insert_values.push_back(std::to_string(inventory_snapshots_entry.color));

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -206,7 +206,7 @@ public:
);
if (results.Success()) {
ip_exemptions_entry.id = results.LastInsertedID();
ip_exemptions_entry.exemption_id = results.LastInsertedID();
return ip_exemptions_entry;
}

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -224,7 +224,7 @@ public:
);
if (results.Success()) {
item_tick_entry.id = results.LastInsertedID();
item_tick_entry.it_id = results.LastInsertedID();
return item_tick_entry;
}

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -1300,6 +1300,7 @@ public:
auto columns = Columns();
update_values.push_back(columns[0] + " = " + std::to_string(items_entry.id));
update_values.push_back(columns[1] + " = " + std::to_string(items_entry.minstatus));
update_values.push_back(columns[2] + " = '" + EscapeString(items_entry.Name) + "'");
update_values.push_back(columns[3] + " = " + std::to_string(items_entry.aagi));
@ -1604,6 +1605,7 @@ public:
{
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(items_entry.id));
insert_values.push_back(std::to_string(items_entry.minstatus));
insert_values.push_back("'" + EscapeString(items_entry.Name) + "'");
insert_values.push_back(std::to_string(items_entry.aagi));
@ -1916,6 +1918,7 @@ public:
for (auto &items_entry: items_entries) {
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(items_entry.id));
insert_values.push_back(std::to_string(items_entry.minstatus));
insert_values.push_back("'" + EscapeString(items_entry.Name) + "'");
insert_values.push_back(std::to_string(items_entry.aagi));

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -168,6 +168,7 @@ public:
auto columns = Columns();
update_values.push_back(columns[0] + " = '" + EscapeString(launcher_entry.name) + "'");
update_values.push_back(columns[1] + " = " + std::to_string(launcher_entry.dynamics));
auto results = database.QueryDatabase(
@ -189,6 +190,7 @@ public:
{
std::vector<std::string> insert_values;
insert_values.push_back("'" + EscapeString(launcher_entry.name) + "'");
insert_values.push_back(std::to_string(launcher_entry.dynamics));
auto results = database.QueryDatabase(
@ -200,7 +202,7 @@ public:
);
if (results.Success()) {
launcher_entry.id = results.LastInsertedID();
launcher_entry.name = results.LastInsertedID();
return launcher_entry;
}
@ -218,6 +220,7 @@ public:
for (auto &launcher_entry: launcher_entries) {
std::vector<std::string> insert_values;
insert_values.push_back("'" + EscapeString(launcher_entry.name) + "'");
insert_values.push_back(std::to_string(launcher_entry.dynamics));
insert_chunks.push_back("(" + implode(",", insert_values) + ")");

View File

@ -1,312 +0,0 @@
/**
* EQEmulator: Everquest Server Emulator
* Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY except by those people which sell it, which
* are required to give you total support for your newly bought product;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
#ifndef EQEMU_BASE_LAUNCHER_ZONES_REPOSITORY_H
#define EQEMU_BASE_LAUNCHER_ZONES_REPOSITORY_H
#include "../../database.h"
#include "../../string_util.h"
class BaseLauncherZonesRepository {
public:
struct LauncherZones {
std::string launcher;
std::string zone;
int port;
};
static std::string PrimaryKey()
{
return std::string("zone");
}
static std::vector<std::string> Columns()
{
return {
"launcher",
"zone",
"port",
};
}
static std::string ColumnsRaw()
{
return std::string(implode(", ", Columns()));
}
static std::string InsertColumnsRaw()
{
std::vector<std::string> insert_columns;
for (auto &column : Columns()) {
if (column == PrimaryKey()) {
continue;
}
insert_columns.push_back(column);
}
return std::string(implode(", ", insert_columns));
}
static std::string TableName()
{
return std::string("launcher_zones");
}
static std::string BaseSelect()
{
return fmt::format(
"SELECT {} FROM {}",
ColumnsRaw(),
TableName()
);
}
static std::string BaseInsert()
{
return fmt::format(
"INSERT INTO {} ({}) ",
TableName(),
InsertColumnsRaw()
);
}
static LauncherZones NewEntity()
{
LauncherZones entry{};
entry.launcher = "";
entry.zone = "";
entry.port = 0;
return entry;
}
static LauncherZones GetLauncherZonesEntry(
const std::vector<LauncherZones> &launcher_zoness,
int launcher_zones_id
)
{
for (auto &launcher_zones : launcher_zoness) {
if (launcher_zones.zone == launcher_zones_id) {
return launcher_zones;
}
}
return NewEntity();
}
static LauncherZones FindOne(
int launcher_zones_id
)
{
auto results = database.QueryDatabase(
fmt::format(
"{} WHERE id = {} LIMIT 1",
BaseSelect(),
launcher_zones_id
)
);
auto row = results.begin();
if (results.RowCount() == 1) {
LauncherZones entry{};
entry.launcher = row[0] ? row[0] : "";
entry.zone = row[1] ? row[1] : "";
entry.port = atoi(row[2]);
return entry;
}
return NewEntity();
}
static int DeleteOne(
int launcher_zones_id
)
{
auto results = database.QueryDatabase(
fmt::format(
"DELETE FROM {} WHERE {} = {}",
TableName(),
PrimaryKey(),
launcher_zones_id
)
);
return (results.Success() ? results.RowsAffected() : 0);
}
static int UpdateOne(
LauncherZones launcher_zones_entry
)
{
std::vector<std::string> update_values;
auto columns = Columns();
update_values.push_back(columns[2] + " = " + std::to_string(launcher_zones_entry.port));
auto results = database.QueryDatabase(
fmt::format(
"UPDATE {} SET {} WHERE {} = {}",
TableName(),
implode(", ", update_values),
PrimaryKey(),
launcher_zones_entry.zone
)
);
return (results.Success() ? results.RowsAffected() : 0);
}
static LauncherZones InsertOne(
LauncherZones launcher_zones_entry
)
{
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(launcher_zones_entry.port));
auto results = database.QueryDatabase(
fmt::format(
"{} VALUES ({})",
BaseInsert(),
implode(",", insert_values)
)
);
if (results.Success()) {
launcher_zones_entry.id = results.LastInsertedID();
return launcher_zones_entry;
}
launcher_zones_entry = NewEntity();
return launcher_zones_entry;
}
static int InsertMany(
std::vector<LauncherZones> launcher_zones_entries
)
{
std::vector<std::string> insert_chunks;
for (auto &launcher_zones_entry: launcher_zones_entries) {
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(launcher_zones_entry.port));
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
}
std::vector<std::string> insert_values;
auto results = database.QueryDatabase(
fmt::format(
"{} VALUES {}",
BaseInsert(),
implode(",", insert_chunks)
)
);
return (results.Success() ? results.RowsAffected() : 0);
}
static std::vector<LauncherZones> All()
{
std::vector<LauncherZones> all_entries;
auto results = database.QueryDatabase(
fmt::format(
"{}",
BaseSelect()
)
);
all_entries.reserve(results.RowCount());
for (auto row = results.begin(); row != results.end(); ++row) {
LauncherZones entry{};
entry.launcher = row[0] ? row[0] : "";
entry.zone = row[1] ? row[1] : "";
entry.port = atoi(row[2]);
all_entries.push_back(entry);
}
return all_entries;
}
static std::vector<LauncherZones> GetWhere(std::string where_filter)
{
std::vector<LauncherZones> all_entries;
auto results = database.QueryDatabase(
fmt::format(
"{} WHERE {}",
BaseSelect(),
where_filter
)
);
all_entries.reserve(results.RowCount());
for (auto row = results.begin(); row != results.end(); ++row) {
LauncherZones entry{};
entry.launcher = row[0] ? row[0] : "";
entry.zone = row[1] ? row[1] : "";
entry.port = atoi(row[2]);
all_entries.push_back(entry);
}
return all_entries;
}
static int DeleteWhere(std::string where_filter)
{
auto results = database.QueryDatabase(
fmt::format(
"DELETE FROM {} WHERE {}",
TableName(),
PrimaryKey(),
where_filter
)
);
return (results.Success() ? results.RowsAffected() : 0);
}
};
#endif //EQEMU_BASE_LAUNCHER_ZONES_REPOSITORY_H

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -41,7 +41,7 @@ public:
static std::string PrimaryKey()
{
return std::string("trap_id");
return std::string("id");
}
static std::vector<std::string> Columns()
@ -111,7 +111,7 @@ public:
)
{
for (auto &ldon_trap_entries : ldon_trap_entriess) {
if (ldon_trap_entries.trap_id == ldon_trap_entries_id) {
if (ldon_trap_entries.id == ldon_trap_entries_id) {
return ldon_trap_entries;
}
}
@ -168,7 +168,8 @@ public:
auto columns = Columns();
update_values.push_back(columns[0] + " = " + std::to_string(ldon_trap_entries_entry.id));
update_values.push_back(columns[1] + " = " + std::to_string(ldon_trap_entries_entry.trap_id));
auto results = content_db.QueryDatabase(
fmt::format(
@ -176,7 +177,7 @@ public:
TableName(),
implode(", ", update_values),
PrimaryKey(),
ldon_trap_entries_entry.trap_id
ldon_trap_entries_entry.id
)
);
@ -189,7 +190,8 @@ public:
{
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(ldon_trap_entries_entry.id));
insert_values.push_back(std::to_string(ldon_trap_entries_entry.trap_id));
auto results = content_db.QueryDatabase(
fmt::format(
@ -218,7 +220,8 @@ public:
for (auto &ldon_trap_entries_entry: ldon_trap_entries_entries) {
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(ldon_trap_entries_entry.id));
insert_values.push_back(std::to_string(ldon_trap_entries_entry.trap_id));
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
}

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -180,6 +180,7 @@ public:
auto columns = Columns();
update_values.push_back(columns[0] + " = " + std::to_string(ldon_trap_templates_entry.id));
update_values.push_back(columns[1] + " = " + std::to_string(ldon_trap_templates_entry.type));
update_values.push_back(columns[2] + " = " + std::to_string(ldon_trap_templates_entry.spell_id));
update_values.push_back(columns[3] + " = " + std::to_string(ldon_trap_templates_entry.skill));
@ -204,6 +205,7 @@ public:
{
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(ldon_trap_templates_entry.id));
insert_values.push_back(std::to_string(ldon_trap_templates_entry.type));
insert_values.push_back(std::to_string(ldon_trap_templates_entry.spell_id));
insert_values.push_back(std::to_string(ldon_trap_templates_entry.skill));
@ -236,6 +238,7 @@ public:
for (auto &ldon_trap_templates_entry: ldon_trap_templates_entries) {
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(ldon_trap_templates_entry.id));
insert_values.push_back(std::to_string(ldon_trap_templates_entry.type));
insert_values.push_back(std::to_string(ldon_trap_templates_entry.spell_id));
insert_values.push_back(std::to_string(ldon_trap_templates_entry.skill));

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -172,6 +172,7 @@ public:
auto columns = Columns();
update_values.push_back(columns[0] + " = " + std::to_string(level_exp_mods_entry.level));
update_values.push_back(columns[1] + " = " + std::to_string(level_exp_mods_entry.exp_mod));
update_values.push_back(columns[2] + " = " + std::to_string(level_exp_mods_entry.aa_exp_mod));
@ -194,6 +195,7 @@ public:
{
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(level_exp_mods_entry.level));
insert_values.push_back(std::to_string(level_exp_mods_entry.exp_mod));
insert_values.push_back(std::to_string(level_exp_mods_entry.aa_exp_mod));
@ -206,7 +208,7 @@ public:
);
if (results.Success()) {
level_exp_mods_entry.id = results.LastInsertedID();
level_exp_mods_entry.level = results.LastInsertedID();
return level_exp_mods_entry;
}
@ -224,6 +226,7 @@ public:
for (auto &level_exp_mods_entry: level_exp_mods_entries) {
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(level_exp_mods_entry.level));
insert_values.push_back(std::to_string(level_exp_mods_entry.exp_mod));
insert_values.push_back(std::to_string(level_exp_mods_entry.aa_exp_mod));

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -48,7 +48,7 @@ public:
static std::string PrimaryKey()
{
return std::string("name");
return std::string("type");
}
static std::vector<std::string> Columns()
@ -132,7 +132,7 @@ public:
)
{
for (auto &lfguild : lfguilds) {
if (lfguild.name == lfguild_id) {
if (lfguild.type == lfguild_id) {
return lfguild;
}
}
@ -196,6 +196,8 @@ public:
auto columns = Columns();
update_values.push_back(columns[0] + " = " + std::to_string(lfguild_entry.type));
update_values.push_back(columns[1] + " = '" + EscapeString(lfguild_entry.name) + "'");
update_values.push_back(columns[2] + " = '" + EscapeString(lfguild_entry.comment) + "'");
update_values.push_back(columns[3] + " = " + std::to_string(lfguild_entry.fromlevel));
update_values.push_back(columns[4] + " = " + std::to_string(lfguild_entry.tolevel));
@ -210,7 +212,7 @@ public:
TableName(),
implode(", ", update_values),
PrimaryKey(),
lfguild_entry.name
lfguild_entry.type
)
);
@ -223,6 +225,8 @@ public:
{
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(lfguild_entry.type));
insert_values.push_back("'" + EscapeString(lfguild_entry.name) + "'");
insert_values.push_back("'" + EscapeString(lfguild_entry.comment) + "'");
insert_values.push_back(std::to_string(lfguild_entry.fromlevel));
insert_values.push_back(std::to_string(lfguild_entry.tolevel));
@ -240,7 +244,7 @@ public:
);
if (results.Success()) {
lfguild_entry.id = results.LastInsertedID();
lfguild_entry.type = results.LastInsertedID();
return lfguild_entry;
}
@ -258,6 +262,8 @@ public:
for (auto &lfguild_entry: lfguild_entries) {
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(lfguild_entry.type));
insert_values.push_back("'" + EscapeString(lfguild_entry.name) + "'");
insert_values.push_back("'" + EscapeString(lfguild_entry.comment) + "'");
insert_values.push_back(std::to_string(lfguild_entry.fromlevel));
insert_values.push_back(std::to_string(lfguild_entry.tolevel));

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -196,6 +196,7 @@ public:
auto columns = Columns();
update_values.push_back(columns[0] + " = " + std::to_string(login_accounts_entry.id));
update_values.push_back(columns[1] + " = '" + EscapeString(login_accounts_entry.account_name) + "'");
update_values.push_back(columns[2] + " = '" + EscapeString(login_accounts_entry.account_password) + "'");
update_values.push_back(columns[3] + " = '" + EscapeString(login_accounts_entry.account_email) + "'");
@ -224,6 +225,7 @@ public:
{
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(login_accounts_entry.id));
insert_values.push_back("'" + EscapeString(login_accounts_entry.account_name) + "'");
insert_values.push_back("'" + EscapeString(login_accounts_entry.account_password) + "'");
insert_values.push_back("'" + EscapeString(login_accounts_entry.account_email) + "'");
@ -260,6 +262,7 @@ public:
for (auto &login_accounts_entry: login_accounts_entries) {
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(login_accounts_entry.id));
insert_values.push_back("'" + EscapeString(login_accounts_entry.account_name) + "'");
insert_values.push_back("'" + EscapeString(login_accounts_entry.account_password) + "'");
insert_values.push_back("'" + EscapeString(login_accounts_entry.account_email) + "'");

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/

View File

@ -20,8 +20,8 @@
*/
/**
* This repository was automatically generated on Apr 5, 2020 and is NOT
* to be modified directly. Any repository modifications are meant to be made to
* This repository was automatically generated and is NOT to be modified directly.
* Any repository modifications are meant to be made to
* the repository extending the base. Any modifications to base repositories are to
* be made by the generator only
*/
@ -168,6 +168,7 @@ public:
auto columns = Columns();
update_values.push_back(columns[0] + " = " + std::to_string(login_server_list_types_entry.id));
update_values.push_back(columns[1] + " = '" + EscapeString(login_server_list_types_entry.description) + "'");
auto results = database.QueryDatabase(
@ -189,6 +190,7 @@ public:
{
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(login_server_list_types_entry.id));
insert_values.push_back("'" + EscapeString(login_server_list_types_entry.description) + "'");
auto results = database.QueryDatabase(
@ -218,6 +220,7 @@ public:
for (auto &login_server_list_types_entry: login_server_list_types_entries) {
std::vector<std::string> insert_values;
insert_values.push_back(std::to_string(login_server_list_types_entry.id));
insert_values.push_back("'" + EscapeString(login_server_list_types_entry.description) + "'");
insert_chunks.push_back("(" + implode(",", insert_values) + ")");

Some files were not shown because too many files have changed in this diff Show More