diff --git a/common/repositories/base/base_aa_ability_repository.h b/common/repositories/base/base_aa_ability_repository.h index f687604b1..fbf16f0ba 100644 --- a/common/repositories/base/base_aa_ability_repository.h +++ b/common/repositories/base/base_aa_ability_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_AA_ABILITY_REPOSITORY_H @@ -81,21 +64,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("aa_ability"); @@ -115,7 +83,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_aa_rank_effects_repository.h b/common/repositories/base/base_aa_rank_effects_repository.h index 4bed89085..fa0eebcd1 100644 --- a/common/repositories/base/base_aa_rank_effects_repository.h +++ b/common/repositories/base/base_aa_rank_effects_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_AA_RANK_EFFECTS_REPOSITORY_H @@ -63,21 +46,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("aa_rank_effects"); @@ -97,7 +65,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_aa_rank_prereqs_repository.h b/common/repositories/base/base_aa_rank_prereqs_repository.h index 5bd751938..04b1a0a38 100644 --- a/common/repositories/base/base_aa_rank_prereqs_repository.h +++ b/common/repositories/base/base_aa_rank_prereqs_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_AA_RANK_PREREQS_REPOSITORY_H @@ -59,21 +42,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("aa_rank_prereqs"); @@ -93,7 +61,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_aa_ranks_repository.h b/common/repositories/base/base_aa_ranks_repository.h index 87af9d210..8145e3e96 100644 --- a/common/repositories/base/base_aa_ranks_repository.h +++ b/common/repositories/base/base_aa_ranks_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_AA_RANKS_REPOSITORY_H @@ -79,21 +62,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("aa_ranks"); @@ -113,7 +81,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_account_flags_repository.h b/common/repositories/base/base_account_flags_repository.h index 17c135219..af9c9b223 100644 --- a/common/repositories/base/base_account_flags_repository.h +++ b/common/repositories/base/base_account_flags_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_ACCOUNT_FLAGS_REPOSITORY_H @@ -59,21 +42,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("account_flags"); @@ -93,7 +61,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_account_ip_repository.h b/common/repositories/base/base_account_ip_repository.h index 757e72ef6..1384c4ef2 100644 --- a/common/repositories/base/base_account_ip_repository.h +++ b/common/repositories/base/base_account_ip_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_ACCOUNT_IP_REPOSITORY_H @@ -61,21 +44,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("account_ip"); @@ -95,7 +63,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_account_repository.h b/common/repositories/base/base_account_repository.h index b33310800..6283caf13 100644 --- a/common/repositories/base/base_account_repository.h +++ b/common/repositories/base/base_account_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_ACCOUNT_REPOSITORY_H @@ -91,21 +74,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("account"); @@ -125,7 +93,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -278,6 +246,7 @@ public: { std::vector insert_values; + insert_values.push_back(std::to_string(account_entry.id)); insert_values.push_back("'" + EscapeString(account_entry.name) + "'"); insert_values.push_back("'" + EscapeString(account_entry.charname) + "'"); insert_values.push_back(std::to_string(account_entry.sharedplat)); @@ -325,6 +294,7 @@ public: for (auto &account_entry: account_entries) { std::vector insert_values; + insert_values.push_back(std::to_string(account_entry.id)); insert_values.push_back("'" + EscapeString(account_entry.name) + "'"); insert_values.push_back("'" + EscapeString(account_entry.charname) + "'"); insert_values.push_back(std::to_string(account_entry.sharedplat)); diff --git a/common/repositories/base/base_account_rewards_repository.h b/common/repositories/base/base_account_rewards_repository.h index e08eba9ad..ee6213e16 100644 --- a/common/repositories/base/base_account_rewards_repository.h +++ b/common/repositories/base/base_account_rewards_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_ACCOUNT_REWARDS_REPOSITORY_H @@ -59,21 +42,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("account_rewards"); @@ -93,7 +61,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_adventure_details_repository.h b/common/repositories/base/base_adventure_details_repository.h index afdaf82ab..656ba8908 100644 --- a/common/repositories/base/base_adventure_details_repository.h +++ b/common/repositories/base/base_adventure_details_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_ADVENTURE_DETAILS_REPOSITORY_H @@ -71,21 +54,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("adventure_details"); @@ -105,7 +73,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -228,6 +196,7 @@ public: { std::vector insert_values; + insert_values.push_back(std::to_string(adventure_details_entry.id)); insert_values.push_back(std::to_string(adventure_details_entry.adventure_id)); insert_values.push_back(std::to_string(adventure_details_entry.instance_id)); insert_values.push_back(std::to_string(adventure_details_entry.count)); @@ -265,6 +234,7 @@ public: for (auto &adventure_details_entry: adventure_details_entries) { std::vector insert_values; + insert_values.push_back(std::to_string(adventure_details_entry.id)); insert_values.push_back(std::to_string(adventure_details_entry.adventure_id)); insert_values.push_back(std::to_string(adventure_details_entry.instance_id)); insert_values.push_back(std::to_string(adventure_details_entry.count)); diff --git a/common/repositories/base/base_adventure_members_repository.h b/common/repositories/base/base_adventure_members_repository.h index 1a2f5c15d..4cdc357fd 100644 --- a/common/repositories/base/base_adventure_members_repository.h +++ b/common/repositories/base/base_adventure_members_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_ADVENTURE_MEMBERS_REPOSITORY_H @@ -57,21 +40,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("adventure_members"); @@ -91,7 +59,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_adventure_stats_repository.h b/common/repositories/base/base_adventure_stats_repository.h index 62c3deaf5..b1634c080 100644 --- a/common/repositories/base/base_adventure_stats_repository.h +++ b/common/repositories/base/base_adventure_stats_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_ADVENTURE_STATS_REPOSITORY_H @@ -75,21 +58,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("adventure_stats"); @@ -109,7 +77,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_adventure_template_entry_flavor_repository.h b/common/repositories/base/base_adventure_template_entry_flavor_repository.h index 7950ae1cf..8b4bfa7b6 100644 --- a/common/repositories/base/base_adventure_template_entry_flavor_repository.h +++ b/common/repositories/base/base_adventure_template_entry_flavor_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_ADVENTURE_TEMPLATE_ENTRY_FLAVOR_REPOSITORY_H @@ -57,21 +40,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("adventure_template_entry_flavor"); @@ -91,7 +59,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_adventure_template_entry_repository.h b/common/repositories/base/base_adventure_template_entry_repository.h index dae7e3f9e..5e4b9ca7c 100644 --- a/common/repositories/base/base_adventure_template_entry_repository.h +++ b/common/repositories/base/base_adventure_template_entry_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_ADVENTURE_TEMPLATE_ENTRY_REPOSITORY_H @@ -57,21 +40,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("adventure_template_entry"); @@ -91,7 +59,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_adventure_template_repository.h b/common/repositories/base/base_adventure_template_repository.h index aa1de97b5..076b8abc5 100644 --- a/common/repositories/base/base_adventure_template_repository.h +++ b/common/repositories/base/base_adventure_template_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_ADVENTURE_TEMPLATE_REPOSITORY_H @@ -119,21 +102,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("adventure_template"); @@ -153,7 +121,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_alternate_currency_repository.h b/common/repositories/base/base_alternate_currency_repository.h index 8b918690e..832da0f84 100644 --- a/common/repositories/base/base_alternate_currency_repository.h +++ b/common/repositories/base/base_alternate_currency_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_ALTERNATE_CURRENCY_REPOSITORY_H @@ -57,21 +40,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("alternate_currency"); @@ -91,7 +59,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_auras_repository.h b/common/repositories/base/base_auras_repository.h index b500b3e81..e884fc50b 100644 --- a/common/repositories/base/base_auras_repository.h +++ b/common/repositories/base/base_auras_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_AURAS_REPOSITORY_H @@ -75,21 +58,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("auras"); @@ -109,7 +77,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_base_data_repository.h b/common/repositories/base/base_base_data_repository.h index e4a6aa8dc..3574f254a 100644 --- a/common/repositories/base/base_base_data_repository.h +++ b/common/repositories/base/base_base_data_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_BASE_DATA_REPOSITORY_H @@ -73,21 +56,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("base_data"); @@ -107,7 +75,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_blocked_spells_repository.h b/common/repositories/base/base_blocked_spells_repository.h index a6f58bbb0..d17524a2c 100644 --- a/common/repositories/base/base_blocked_spells_repository.h +++ b/common/repositories/base/base_blocked_spells_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_BLOCKED_SPELLS_REPOSITORY_H @@ -77,21 +60,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("blocked_spells"); @@ -111,7 +79,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -243,6 +211,7 @@ public: { std::vector insert_values; + insert_values.push_back(std::to_string(blocked_spells_entry.id)); insert_values.push_back(std::to_string(blocked_spells_entry.spellid)); insert_values.push_back(std::to_string(blocked_spells_entry.type)); insert_values.push_back(std::to_string(blocked_spells_entry.zoneid)); @@ -283,6 +252,7 @@ public: for (auto &blocked_spells_entry: blocked_spells_entries) { std::vector insert_values; + insert_values.push_back(std::to_string(blocked_spells_entry.id)); insert_values.push_back(std::to_string(blocked_spells_entry.spellid)); insert_values.push_back(std::to_string(blocked_spells_entry.type)); insert_values.push_back(std::to_string(blocked_spells_entry.zoneid)); diff --git a/common/repositories/base/base_bug_reports_repository.h b/common/repositories/base/base_bug_reports_repository.h index 9e3cea3d2..ecd1335ef 100644 --- a/common/repositories/base/base_bug_reports_repository.h +++ b/common/repositories/base/base_bug_reports_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_BUG_REPORTS_REPOSITORY_H @@ -117,21 +100,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("bug_reports"); @@ -151,7 +119,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -343,6 +311,7 @@ public: { std::vector insert_values; + insert_values.push_back(std::to_string(bug_reports_entry.id)); insert_values.push_back("'" + EscapeString(bug_reports_entry.zone) + "'"); insert_values.push_back(std::to_string(bug_reports_entry.client_version_id)); insert_values.push_back("'" + EscapeString(bug_reports_entry.client_version_name) + "'"); @@ -403,6 +372,7 @@ public: for (auto &bug_reports_entry: bug_reports_entries) { std::vector insert_values; + insert_values.push_back(std::to_string(bug_reports_entry.id)); insert_values.push_back("'" + EscapeString(bug_reports_entry.zone) + "'"); insert_values.push_back(std::to_string(bug_reports_entry.client_version_id)); insert_values.push_back("'" + EscapeString(bug_reports_entry.client_version_name) + "'"); diff --git a/common/repositories/base/base_bugs_repository.h b/common/repositories/base/base_bugs_repository.h index a6072991a..9ac9b9330 100644 --- a/common/repositories/base/base_bugs_repository.h +++ b/common/repositories/base/base_bugs_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_BUGS_REPOSITORY_H @@ -79,21 +62,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("bugs"); @@ -113,7 +81,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -248,6 +216,7 @@ public: { std::vector insert_values; + insert_values.push_back(std::to_string(bugs_entry.id)); insert_values.push_back("'" + EscapeString(bugs_entry.zone) + "'"); insert_values.push_back("'" + EscapeString(bugs_entry.name) + "'"); insert_values.push_back("'" + EscapeString(bugs_entry.ui) + "'"); @@ -289,6 +258,7 @@ public: for (auto &bugs_entry: bugs_entries) { std::vector insert_values; + insert_values.push_back(std::to_string(bugs_entry.id)); insert_values.push_back("'" + EscapeString(bugs_entry.zone) + "'"); insert_values.push_back("'" + EscapeString(bugs_entry.name) + "'"); insert_values.push_back("'" + EscapeString(bugs_entry.ui) + "'"); diff --git a/common/repositories/base/base_buyer_repository.h b/common/repositories/base/base_buyer_repository.h index a0898fefd..1b1cb9800 100644 --- a/common/repositories/base/base_buyer_repository.h +++ b/common/repositories/base/base_buyer_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_BUYER_REPOSITORY_H @@ -65,21 +48,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("buyer"); @@ -99,7 +67,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_char_create_combinations_repository.h b/common/repositories/base/base_char_create_combinations_repository.h index 68c806a54..ed806d6bd 100644 --- a/common/repositories/base/base_char_create_combinations_repository.h +++ b/common/repositories/base/base_char_create_combinations_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_CHAR_CREATE_COMBINATIONS_REPOSITORY_H @@ -65,21 +48,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("char_create_combinations"); @@ -99,7 +67,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_char_create_point_allocations_repository.h b/common/repositories/base/base_char_create_point_allocations_repository.h index 04148a2d9..7b3f4a2d6 100644 --- a/common/repositories/base/base_char_create_point_allocations_repository.h +++ b/common/repositories/base/base_char_create_point_allocations_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_CHAR_CREATE_POINT_ALLOCATIONS_REPOSITORY_H @@ -83,21 +66,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("char_create_point_allocations"); @@ -117,7 +85,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_char_recipe_list_repository.h b/common/repositories/base/base_char_recipe_list_repository.h index 0041a3032..cb3e33707 100644 --- a/common/repositories/base/base_char_recipe_list_repository.h +++ b/common/repositories/base/base_char_recipe_list_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_CHAR_RECIPE_LIST_REPOSITORY_H @@ -59,21 +42,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("char_recipe_list"); @@ -93,7 +61,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_character_activities_repository.h b/common/repositories/base/base_character_activities_repository.h index 3669d303b..9c4a7b144 100644 --- a/common/repositories/base/base_character_activities_repository.h +++ b/common/repositories/base/base_character_activities_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_CHARACTER_ACTIVITIES_REPOSITORY_H @@ -63,21 +46,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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_activities"); @@ -97,7 +65,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_character_alt_currency_repository.h b/common/repositories/base/base_character_alt_currency_repository.h index 7b97ebade..9e2ebc695 100644 --- a/common/repositories/base/base_character_alt_currency_repository.h +++ b/common/repositories/base/base_character_alt_currency_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_CHARACTER_ALT_CURRENCY_REPOSITORY_H @@ -59,21 +42,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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_alt_currency"); @@ -93,7 +61,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_character_alternate_abilities_repository.h b/common/repositories/base/base_character_alternate_abilities_repository.h index 3adc61c53..de4ef1cb4 100644 --- a/common/repositories/base/base_character_alternate_abilities_repository.h +++ b/common/repositories/base/base_character_alternate_abilities_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_CHARACTER_ALTERNATE_ABILITIES_REPOSITORY_H @@ -61,21 +44,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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_alternate_abilities"); @@ -95,7 +63,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_character_auras_repository.h b/common/repositories/base/base_character_auras_repository.h index cef91dc07..8ac89e458 100644 --- a/common/repositories/base/base_character_auras_repository.h +++ b/common/repositories/base/base_character_auras_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_CHARACTER_AURAS_REPOSITORY_H @@ -59,21 +42,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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_auras"); @@ -93,7 +61,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_character_bandolier_repository.h b/common/repositories/base/base_character_bandolier_repository.h index be2c861d3..a208ac9da 100644 --- a/common/repositories/base/base_character_bandolier_repository.h +++ b/common/repositories/base/base_character_bandolier_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_CHARACTER_BANDOLIER_REPOSITORY_H @@ -65,21 +48,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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_bandolier"); @@ -99,7 +67,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_character_bind_repository.h b/common/repositories/base/base_character_bind_repository.h index ba9498781..6ae2aee1d 100644 --- a/common/repositories/base/base_character_bind_repository.h +++ b/common/repositories/base/base_character_bind_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_CHARACTER_BIND_REPOSITORY_H @@ -69,21 +52,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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_bind"); @@ -103,7 +71,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -223,6 +191,7 @@ public: { std::vector insert_values; + insert_values.push_back(std::to_string(character_bind_entry.id)); 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)); @@ -259,6 +228,7 @@ public: for (auto &character_bind_entry: character_bind_entries) { std::vector insert_values; + insert_values.push_back(std::to_string(character_bind_entry.id)); 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)); diff --git a/common/repositories/base/base_character_buffs_repository.h b/common/repositories/base/base_character_buffs_repository.h index 77289fded..6e577e154 100644 --- a/common/repositories/base/base_character_buffs_repository.h +++ b/common/repositories/base/base_character_buffs_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_CHARACTER_BUFFS_REPOSITORY_H @@ -87,21 +70,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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_buffs"); @@ -121,7 +89,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_character_corpse_items_repository.h b/common/repositories/base/base_character_corpse_items_repository.h index 9328d1aa0..a1d50d125 100644 --- a/common/repositories/base/base_character_corpse_items_repository.h +++ b/common/repositories/base/base_character_corpse_items_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_CHARACTER_CORPSE_ITEMS_REPOSITORY_H @@ -75,21 +58,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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_corpse_items"); @@ -109,7 +77,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_character_corpses_repository.h b/common/repositories/base/base_character_corpses_repository.h index 10379d109..bb7df4e0d 100644 --- a/common/repositories/base/base_character_corpses_repository.h +++ b/common/repositories/base/base_character_corpses_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_CHARACTER_CORPSES_REPOSITORY_H @@ -147,21 +130,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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_corpses"); @@ -181,7 +149,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -418,6 +386,7 @@ public: { std::vector insert_values; + insert_values.push_back(std::to_string(character_corpses_entry.id)); insert_values.push_back(std::to_string(character_corpses_entry.charid)); insert_values.push_back("'" + EscapeString(character_corpses_entry.charname) + "'"); insert_values.push_back(std::to_string(character_corpses_entry.zone_id)); @@ -493,6 +462,7 @@ public: for (auto &character_corpses_entry: character_corpses_entries) { std::vector insert_values; + insert_values.push_back(std::to_string(character_corpses_entry.id)); insert_values.push_back(std::to_string(character_corpses_entry.charid)); insert_values.push_back("'" + EscapeString(character_corpses_entry.charname) + "'"); insert_values.push_back(std::to_string(character_corpses_entry.zone_id)); diff --git a/common/repositories/base/base_character_currency_repository.h b/common/repositories/base/base_character_currency_repository.h index 462fba848..17134a15d 100644 --- a/common/repositories/base/base_character_currency_repository.h +++ b/common/repositories/base/base_character_currency_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_CHARACTER_CURRENCY_REPOSITORY_H @@ -87,21 +70,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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_currency"); @@ -121,7 +89,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_character_data_repository.h b/common/repositories/base/base_character_data_repository.h index ff06fa11b..623a5a875 100644 --- a/common/repositories/base/base_character_data_repository.h +++ b/common/repositories/base/base_character_data_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_CHARACTER_DATA_REPOSITORY_H @@ -257,21 +240,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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_data"); @@ -291,7 +259,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -693,6 +661,7 @@ public: { std::vector insert_values; + insert_values.push_back(std::to_string(character_data_entry.id)); insert_values.push_back(std::to_string(character_data_entry.account_id)); insert_values.push_back("'" + EscapeString(character_data_entry.name) + "'"); insert_values.push_back("'" + EscapeString(character_data_entry.last_name) + "'"); @@ -823,6 +792,7 @@ public: for (auto &character_data_entry: character_data_entries) { std::vector insert_values; + insert_values.push_back(std::to_string(character_data_entry.id)); insert_values.push_back(std::to_string(character_data_entry.account_id)); insert_values.push_back("'" + EscapeString(character_data_entry.name) + "'"); insert_values.push_back("'" + EscapeString(character_data_entry.last_name) + "'"); diff --git a/common/repositories/base/base_character_disciplines_repository.h b/common/repositories/base/base_character_disciplines_repository.h index 0a10e7288..941e36056 100644 --- a/common/repositories/base/base_character_disciplines_repository.h +++ b/common/repositories/base/base_character_disciplines_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_CHARACTER_DISCIPLINES_REPOSITORY_H @@ -59,21 +42,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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_disciplines"); @@ -93,7 +61,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_character_expedition_lockouts_repository.h b/common/repositories/base/base_character_expedition_lockouts_repository.h index 705dacf10..580b31350 100644 --- a/common/repositories/base/base_character_expedition_lockouts_repository.h +++ b/common/repositories/base/base_character_expedition_lockouts_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_CHARACTER_EXPEDITION_LOCKOUTS_REPOSITORY_H @@ -67,21 +50,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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_expedition_lockouts"); @@ -101,7 +69,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -218,6 +186,7 @@ public: { std::vector insert_values; + insert_values.push_back(std::to_string(character_expedition_lockouts_entry.id)); insert_values.push_back(std::to_string(character_expedition_lockouts_entry.character_id)); insert_values.push_back("'" + EscapeString(character_expedition_lockouts_entry.expedition_name) + "'"); insert_values.push_back("'" + EscapeString(character_expedition_lockouts_entry.event_name) + "'"); @@ -253,6 +222,7 @@ public: for (auto &character_expedition_lockouts_entry: character_expedition_lockouts_entries) { std::vector insert_values; + insert_values.push_back(std::to_string(character_expedition_lockouts_entry.id)); insert_values.push_back(std::to_string(character_expedition_lockouts_entry.character_id)); insert_values.push_back("'" + EscapeString(character_expedition_lockouts_entry.expedition_name) + "'"); insert_values.push_back("'" + EscapeString(character_expedition_lockouts_entry.event_name) + "'"); diff --git a/common/repositories/base/base_character_inspect_messages_repository.h b/common/repositories/base/base_character_inspect_messages_repository.h index d5978defc..0a8cbc3e6 100644 --- a/common/repositories/base/base_character_inspect_messages_repository.h +++ b/common/repositories/base/base_character_inspect_messages_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_CHARACTER_INSPECT_MESSAGES_REPOSITORY_H @@ -57,21 +40,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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_inspect_messages"); @@ -91,7 +59,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_character_item_recast_repository.h b/common/repositories/base/base_character_item_recast_repository.h index d86f795df..433d0f0f0 100644 --- a/common/repositories/base/base_character_item_recast_repository.h +++ b/common/repositories/base/base_character_item_recast_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_CHARACTER_ITEM_RECAST_REPOSITORY_H @@ -59,21 +42,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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_item_recast"); @@ -93,7 +61,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_character_languages_repository.h b/common/repositories/base/base_character_languages_repository.h index 4c0bc6ac9..64217e8d7 100644 --- a/common/repositories/base/base_character_languages_repository.h +++ b/common/repositories/base/base_character_languages_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_CHARACTER_LANGUAGES_REPOSITORY_H @@ -59,21 +42,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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_languages"); @@ -93,7 +61,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -198,6 +166,7 @@ public: { std::vector insert_values; + insert_values.push_back(std::to_string(character_languages_entry.id)); insert_values.push_back(std::to_string(character_languages_entry.lang_id)); insert_values.push_back(std::to_string(character_languages_entry.value)); @@ -229,6 +198,7 @@ public: for (auto &character_languages_entry: character_languages_entries) { std::vector insert_values; + insert_values.push_back(std::to_string(character_languages_entry.id)); insert_values.push_back(std::to_string(character_languages_entry.lang_id)); insert_values.push_back(std::to_string(character_languages_entry.value)); diff --git a/common/repositories/base/base_character_leadership_abilities_repository.h b/common/repositories/base/base_character_leadership_abilities_repository.h index 5482523a2..ac872d88b 100644 --- a/common/repositories/base/base_character_leadership_abilities_repository.h +++ b/common/repositories/base/base_character_leadership_abilities_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_CHARACTER_LEADERSHIP_ABILITIES_REPOSITORY_H @@ -59,21 +42,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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_leadership_abilities"); @@ -93,7 +61,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_character_material_repository.h b/common/repositories/base/base_character_material_repository.h index 958c2d237..1b434cf2c 100644 --- a/common/repositories/base/base_character_material_repository.h +++ b/common/repositories/base/base_character_material_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_CHARACTER_MATERIAL_REPOSITORY_H @@ -67,21 +50,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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_material"); @@ -101,7 +69,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -218,6 +186,7 @@ public: { std::vector insert_values; + insert_values.push_back(std::to_string(character_material_entry.id)); 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)); @@ -253,6 +222,7 @@ public: for (auto &character_material_entry: character_material_entries) { std::vector insert_values; + insert_values.push_back(std::to_string(character_material_entry.id)); 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)); diff --git a/common/repositories/base/base_character_memmed_spells_repository.h b/common/repositories/base/base_character_memmed_spells_repository.h index 33b789392..b47750533 100644 --- a/common/repositories/base/base_character_memmed_spells_repository.h +++ b/common/repositories/base/base_character_memmed_spells_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_CHARACTER_MEMMED_SPELLS_REPOSITORY_H @@ -59,21 +42,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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_memmed_spells"); @@ -93,7 +61,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_character_pet_buffs_repository.h b/common/repositories/base/base_character_pet_buffs_repository.h index 4801262b2..3dc6eb689 100644 --- a/common/repositories/base/base_character_pet_buffs_repository.h +++ b/common/repositories/base/base_character_pet_buffs_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_CHARACTER_PET_BUFFS_REPOSITORY_H @@ -75,21 +58,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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_pet_buffs"); @@ -109,7 +77,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_character_pet_info_repository.h b/common/repositories/base/base_character_pet_info_repository.h index 3d1c1c977..91f65d216 100644 --- a/common/repositories/base/base_character_pet_info_repository.h +++ b/common/repositories/base/base_character_pet_info_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_CHARACTER_PET_INFO_REPOSITORY_H @@ -71,21 +54,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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_pet_info"); @@ -105,7 +73,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_character_pet_inventory_repository.h b/common/repositories/base/base_character_pet_inventory_repository.h index cb561d959..4e7e26456 100644 --- a/common/repositories/base/base_character_pet_inventory_repository.h +++ b/common/repositories/base/base_character_pet_inventory_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_CHARACTER_PET_INVENTORY_REPOSITORY_H @@ -61,21 +44,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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_pet_inventory"); @@ -95,7 +63,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_character_potionbelt_repository.h b/common/repositories/base/base_character_potionbelt_repository.h index 1fce31537..16d1cbfcd 100644 --- a/common/repositories/base/base_character_potionbelt_repository.h +++ b/common/repositories/base/base_character_potionbelt_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_CHARACTER_POTIONBELT_REPOSITORY_H @@ -61,21 +44,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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_potionbelt"); @@ -95,7 +63,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_character_skills_repository.h b/common/repositories/base/base_character_skills_repository.h index 0b74eb410..d654fd448 100644 --- a/common/repositories/base/base_character_skills_repository.h +++ b/common/repositories/base/base_character_skills_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_CHARACTER_SKILLS_REPOSITORY_H @@ -59,21 +42,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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_skills"); @@ -93,7 +61,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -198,6 +166,7 @@ public: { std::vector insert_values; + insert_values.push_back(std::to_string(character_skills_entry.id)); insert_values.push_back(std::to_string(character_skills_entry.skill_id)); insert_values.push_back(std::to_string(character_skills_entry.value)); @@ -229,6 +198,7 @@ public: for (auto &character_skills_entry: character_skills_entries) { std::vector insert_values; + insert_values.push_back(std::to_string(character_skills_entry.id)); insert_values.push_back(std::to_string(character_skills_entry.skill_id)); insert_values.push_back(std::to_string(character_skills_entry.value)); diff --git a/common/repositories/base/base_character_spells_repository.h b/common/repositories/base/base_character_spells_repository.h index 13e007855..eb34b0d43 100644 --- a/common/repositories/base/base_character_spells_repository.h +++ b/common/repositories/base/base_character_spells_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_CHARACTER_SPELLS_REPOSITORY_H @@ -59,21 +42,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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_spells"); @@ -93,7 +61,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -198,6 +166,7 @@ public: { std::vector insert_values; + insert_values.push_back(std::to_string(character_spells_entry.id)); insert_values.push_back(std::to_string(character_spells_entry.slot_id)); insert_values.push_back(std::to_string(character_spells_entry.spell_id)); @@ -229,6 +198,7 @@ public: for (auto &character_spells_entry: character_spells_entries) { std::vector insert_values; + insert_values.push_back(std::to_string(character_spells_entry.id)); insert_values.push_back(std::to_string(character_spells_entry.slot_id)); insert_values.push_back(std::to_string(character_spells_entry.spell_id)); diff --git a/common/repositories/base/base_character_tasks_repository.h b/common/repositories/base/base_character_tasks_repository.h index f7fa167db..9d8371f34 100644 --- a/common/repositories/base/base_character_tasks_repository.h +++ b/common/repositories/base/base_character_tasks_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_CHARACTER_TASKS_REPOSITORY_H @@ -63,21 +46,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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_tasks"); @@ -97,7 +65,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_completed_tasks_repository.h b/common/repositories/base/base_completed_tasks_repository.h index 023847085..bee95bf79 100644 --- a/common/repositories/base/base_completed_tasks_repository.h +++ b/common/repositories/base/base_completed_tasks_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_COMPLETED_TASKS_REPOSITORY_H @@ -61,21 +44,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("completed_tasks"); @@ -95,7 +63,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_content_flags_repository.h b/common/repositories/base/base_content_flags_repository.h index d9b1e74d4..f59ad8663 100644 --- a/common/repositories/base/base_content_flags_repository.h +++ b/common/repositories/base/base_content_flags_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_CONTENT_FLAGS_REPOSITORY_H @@ -61,21 +44,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("content_flags"); @@ -95,7 +63,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -203,6 +171,7 @@ public: { std::vector insert_values; + insert_values.push_back(std::to_string(content_flags_entry.id)); insert_values.push_back("'" + EscapeString(content_flags_entry.flag_name) + "'"); insert_values.push_back(std::to_string(content_flags_entry.enabled)); insert_values.push_back("'" + EscapeString(content_flags_entry.notes) + "'"); @@ -235,6 +204,7 @@ public: for (auto &content_flags_entry: content_flags_entries) { std::vector insert_values; + insert_values.push_back(std::to_string(content_flags_entry.id)); insert_values.push_back("'" + EscapeString(content_flags_entry.flag_name) + "'"); insert_values.push_back(std::to_string(content_flags_entry.enabled)); insert_values.push_back("'" + EscapeString(content_flags_entry.notes) + "'"); diff --git a/common/repositories/base/base_damageshieldtypes_repository.h b/common/repositories/base/base_damageshieldtypes_repository.h index c16e4d18c..b2c6be57e 100644 --- a/common/repositories/base/base_damageshieldtypes_repository.h +++ b/common/repositories/base/base_damageshieldtypes_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_DAMAGESHIELDTYPES_REPOSITORY_H @@ -57,21 +40,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("damageshieldtypes"); @@ -91,7 +59,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_data_buckets_repository.h b/common/repositories/base/base_data_buckets_repository.h index 91138da9a..cef173a69 100644 --- a/common/repositories/base/base_data_buckets_repository.h +++ b/common/repositories/base/base_data_buckets_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_DATA_BUCKETS_REPOSITORY_H @@ -61,21 +44,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("data_buckets"); @@ -95,7 +63,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -203,6 +171,7 @@ public: { std::vector insert_values; + insert_values.push_back(std::to_string(data_buckets_entry.id)); insert_values.push_back("'" + EscapeString(data_buckets_entry.key) + "'"); insert_values.push_back("'" + EscapeString(data_buckets_entry.value) + "'"); insert_values.push_back(std::to_string(data_buckets_entry.expires)); @@ -235,6 +204,7 @@ public: for (auto &data_buckets_entry: data_buckets_entries) { std::vector insert_values; + insert_values.push_back(std::to_string(data_buckets_entry.id)); insert_values.push_back("'" + EscapeString(data_buckets_entry.key) + "'"); insert_values.push_back("'" + EscapeString(data_buckets_entry.value) + "'"); insert_values.push_back(std::to_string(data_buckets_entry.expires)); diff --git a/common/repositories/base/base_db_str_repository.h b/common/repositories/base/base_db_str_repository.h index 036950948..f9a827d95 100644 --- a/common/repositories/base/base_db_str_repository.h +++ b/common/repositories/base/base_db_str_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_DB_STR_REPOSITORY_H @@ -59,21 +42,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("db_str"); @@ -93,7 +61,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_discovered_items_repository.h b/common/repositories/base/base_discovered_items_repository.h index 08ecba827..555566f9d 100644 --- a/common/repositories/base/base_discovered_items_repository.h +++ b/common/repositories/base/base_discovered_items_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_DISCOVERED_ITEMS_REPOSITORY_H @@ -61,21 +44,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("discovered_items"); @@ -95,7 +63,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_doors_repository.h b/common/repositories/base/base_doors_repository.h index ca554749f..75d740742 100644 --- a/common/repositories/base/base_doors_repository.h +++ b/common/repositories/base/base_doors_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_DOORS_REPOSITORY_H @@ -70,6 +53,7 @@ public: int max_expansion; std::string content_flags; std::string content_flags_disabled; + int is_instance_door; }; static std::string PrimaryKey() @@ -115,6 +99,7 @@ public: "max_expansion", "content_flags", "content_flags_disabled", + "is_instance_door", }; } @@ -123,21 +108,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("doors"); @@ -157,7 +127,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -200,6 +170,7 @@ public: entry.max_expansion = 0; entry.content_flags = ""; entry.content_flags_disabled = ""; + entry.is_instance_door = 0; return entry; } @@ -270,6 +241,7 @@ public: entry.max_expansion = atoi(row[32]); entry.content_flags = row[33] ? row[33] : ""; entry.content_flags_disabled = row[34] ? row[34] : ""; + entry.is_instance_door = atoi(row[35]); return entry; } @@ -337,6 +309,7 @@ public: update_values.push_back(columns[32] + " = " + std::to_string(doors_entry.max_expansion)); update_values.push_back(columns[33] + " = '" + EscapeString(doors_entry.content_flags) + "'"); update_values.push_back(columns[34] + " = '" + EscapeString(doors_entry.content_flags_disabled) + "'"); + update_values.push_back(columns[35] + " = " + std::to_string(doors_entry.is_instance_door)); auto results = db.QueryDatabase( fmt::format( @@ -358,6 +331,7 @@ public: { std::vector insert_values; + insert_values.push_back(std::to_string(doors_entry.id)); insert_values.push_back(std::to_string(doors_entry.doorid)); insert_values.push_back("'" + EscapeString(doors_entry.zone) + "'"); insert_values.push_back(std::to_string(doors_entry.version)); @@ -392,6 +366,7 @@ public: insert_values.push_back(std::to_string(doors_entry.max_expansion)); insert_values.push_back("'" + EscapeString(doors_entry.content_flags) + "'"); insert_values.push_back("'" + EscapeString(doors_entry.content_flags_disabled) + "'"); + insert_values.push_back(std::to_string(doors_entry.is_instance_door)); auto results = db.QueryDatabase( fmt::format( @@ -421,6 +396,7 @@ public: for (auto &doors_entry: doors_entries) { std::vector insert_values; + insert_values.push_back(std::to_string(doors_entry.id)); insert_values.push_back(std::to_string(doors_entry.doorid)); insert_values.push_back("'" + EscapeString(doors_entry.zone) + "'"); insert_values.push_back(std::to_string(doors_entry.version)); @@ -455,6 +431,7 @@ public: insert_values.push_back(std::to_string(doors_entry.max_expansion)); insert_values.push_back("'" + EscapeString(doors_entry.content_flags) + "'"); insert_values.push_back("'" + EscapeString(doors_entry.content_flags_disabled) + "'"); + insert_values.push_back(std::to_string(doors_entry.is_instance_door)); insert_chunks.push_back("(" + implode(",", insert_values) + ")"); } @@ -523,6 +500,7 @@ public: entry.max_expansion = atoi(row[32]); entry.content_flags = row[33] ? row[33] : ""; entry.content_flags_disabled = row[34] ? row[34] : ""; + entry.is_instance_door = atoi(row[35]); all_entries.push_back(entry); } @@ -582,6 +560,7 @@ public: entry.max_expansion = atoi(row[32]); entry.content_flags = row[33] ? row[33] : ""; entry.content_flags_disabled = row[34] ? row[34] : ""; + entry.is_instance_door = atoi(row[35]); all_entries.push_back(entry); } diff --git a/common/repositories/base/base_dynamic_zones_repository.h b/common/repositories/base/base_dynamic_zones_repository.h index 6a930330b..13aabb07b 100644 --- a/common/repositories/base/base_dynamic_zones_repository.h +++ b/common/repositories/base/base_dynamic_zones_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_DYNAMIC_ZONES_REPOSITORY_H @@ -87,21 +70,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("dynamic_zones"); @@ -121,7 +89,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -268,6 +236,7 @@ public: { std::vector insert_values; + insert_values.push_back(std::to_string(dynamic_zones_entry.id)); insert_values.push_back(std::to_string(dynamic_zones_entry.instance_id)); insert_values.push_back(std::to_string(dynamic_zones_entry.type)); insert_values.push_back(std::to_string(dynamic_zones_entry.compass_zone_id)); @@ -313,6 +282,7 @@ public: for (auto &dynamic_zones_entry: dynamic_zones_entries) { std::vector insert_values; + insert_values.push_back(std::to_string(dynamic_zones_entry.id)); insert_values.push_back(std::to_string(dynamic_zones_entry.instance_id)); insert_values.push_back(std::to_string(dynamic_zones_entry.type)); insert_values.push_back(std::to_string(dynamic_zones_entry.compass_zone_id)); diff --git a/common/repositories/base/base_eventlog_repository.h b/common/repositories/base/base_eventlog_repository.h index 5c134adaf..999fb455b 100644 --- a/common/repositories/base/base_eventlog_repository.h +++ b/common/repositories/base/base_eventlog_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_EVENTLOG_REPOSITORY_H @@ -73,21 +56,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("eventlog"); @@ -107,7 +75,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -233,6 +201,7 @@ public: { std::vector insert_values; + insert_values.push_back(std::to_string(eventlog_entry.id)); insert_values.push_back("'" + EscapeString(eventlog_entry.accountname) + "'"); insert_values.push_back(std::to_string(eventlog_entry.accountid)); insert_values.push_back(std::to_string(eventlog_entry.status)); @@ -271,6 +240,7 @@ public: for (auto &eventlog_entry: eventlog_entries) { std::vector insert_values; + insert_values.push_back(std::to_string(eventlog_entry.id)); insert_values.push_back("'" + EscapeString(eventlog_entry.accountname) + "'"); insert_values.push_back(std::to_string(eventlog_entry.accountid)); insert_values.push_back(std::to_string(eventlog_entry.status)); diff --git a/common/repositories/base/base_expedition_lockouts_repository.h b/common/repositories/base/base_expedition_lockouts_repository.h index 96ef8677a..f2f2bd5be 100644 --- a/common/repositories/base/base_expedition_lockouts_repository.h +++ b/common/repositories/base/base_expedition_lockouts_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_EXPEDITION_LOCKOUTS_REPOSITORY_H @@ -65,21 +48,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("expedition_lockouts"); @@ -99,7 +67,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -213,6 +181,7 @@ public: { std::vector insert_values; + insert_values.push_back(std::to_string(expedition_lockouts_entry.id)); insert_values.push_back(std::to_string(expedition_lockouts_entry.expedition_id)); insert_values.push_back("'" + EscapeString(expedition_lockouts_entry.event_name) + "'"); insert_values.push_back("'" + EscapeString(expedition_lockouts_entry.expire_time) + "'"); @@ -247,6 +216,7 @@ public: for (auto &expedition_lockouts_entry: expedition_lockouts_entries) { std::vector insert_values; + insert_values.push_back(std::to_string(expedition_lockouts_entry.id)); insert_values.push_back(std::to_string(expedition_lockouts_entry.expedition_id)); insert_values.push_back("'" + EscapeString(expedition_lockouts_entry.event_name) + "'"); insert_values.push_back("'" + EscapeString(expedition_lockouts_entry.expire_time) + "'"); diff --git a/common/repositories/base/base_expedition_members_repository.h b/common/repositories/base/base_expedition_members_repository.h index a5628a3d7..dde0be588 100644 --- a/common/repositories/base/base_expedition_members_repository.h +++ b/common/repositories/base/base_expedition_members_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_EXPEDITION_MEMBERS_REPOSITORY_H @@ -61,21 +44,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("expedition_members"); @@ -95,7 +63,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -203,6 +171,7 @@ public: { std::vector insert_values; + insert_values.push_back(std::to_string(expedition_members_entry.id)); insert_values.push_back(std::to_string(expedition_members_entry.expedition_id)); insert_values.push_back(std::to_string(expedition_members_entry.character_id)); insert_values.push_back(std::to_string(expedition_members_entry.is_current_member)); @@ -235,6 +204,7 @@ public: for (auto &expedition_members_entry: expedition_members_entries) { std::vector insert_values; + insert_values.push_back(std::to_string(expedition_members_entry.id)); insert_values.push_back(std::to_string(expedition_members_entry.expedition_id)); insert_values.push_back(std::to_string(expedition_members_entry.character_id)); insert_values.push_back(std::to_string(expedition_members_entry.is_current_member)); diff --git a/common/repositories/base/base_expeditions_repository.h b/common/repositories/base/base_expeditions_repository.h index 5eaadb9a6..8fea9a698 100644 --- a/common/repositories/base/base_expeditions_repository.h +++ b/common/repositories/base/base_expeditions_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_EXPEDITIONS_REPOSITORY_H @@ -71,21 +54,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("expeditions"); @@ -105,7 +73,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -228,6 +196,7 @@ public: { std::vector insert_values; + insert_values.push_back(std::to_string(expeditions_entry.id)); insert_values.push_back("'" + EscapeString(expeditions_entry.uuid) + "'"); insert_values.push_back(std::to_string(expeditions_entry.dynamic_zone_id)); insert_values.push_back("'" + EscapeString(expeditions_entry.expedition_name) + "'"); @@ -265,6 +234,7 @@ public: for (auto &expeditions_entry: expeditions_entries) { std::vector insert_values; + insert_values.push_back(std::to_string(expeditions_entry.id)); insert_values.push_back("'" + EscapeString(expeditions_entry.uuid) + "'"); insert_values.push_back(std::to_string(expeditions_entry.dynamic_zone_id)); insert_values.push_back("'" + EscapeString(expeditions_entry.expedition_name) + "'"); diff --git a/common/repositories/base/base_faction_base_data_repository.h b/common/repositories/base/base_faction_base_data_repository.h index faa099dfd..c5bfc8c43 100644 --- a/common/repositories/base/base_faction_base_data_repository.h +++ b/common/repositories/base/base_faction_base_data_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_FACTION_BASE_DATA_REPOSITORY_H @@ -65,21 +48,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("faction_base_data"); @@ -99,7 +67,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_faction_list_mod_repository.h b/common/repositories/base/base_faction_list_mod_repository.h index 136de8703..673c6ac96 100644 --- a/common/repositories/base/base_faction_list_mod_repository.h +++ b/common/repositories/base/base_faction_list_mod_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_FACTION_LIST_MOD_REPOSITORY_H @@ -61,21 +44,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("faction_list_mod"); @@ -95,7 +63,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -203,6 +171,7 @@ public: { std::vector insert_values; + insert_values.push_back(std::to_string(faction_list_mod_entry.id)); insert_values.push_back(std::to_string(faction_list_mod_entry.faction_id)); insert_values.push_back(std::to_string(faction_list_mod_entry.mod)); insert_values.push_back("'" + EscapeString(faction_list_mod_entry.mod_name) + "'"); @@ -235,6 +204,7 @@ public: for (auto &faction_list_mod_entry: faction_list_mod_entries) { std::vector insert_values; + insert_values.push_back(std::to_string(faction_list_mod_entry.id)); insert_values.push_back(std::to_string(faction_list_mod_entry.faction_id)); insert_values.push_back(std::to_string(faction_list_mod_entry.mod)); insert_values.push_back("'" + EscapeString(faction_list_mod_entry.mod_name) + "'"); diff --git a/common/repositories/base/base_faction_list_repository.h b/common/repositories/base/base_faction_list_repository.h index 870f6335f..32e20bb6c 100644 --- a/common/repositories/base/base_faction_list_repository.h +++ b/common/repositories/base/base_faction_list_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_FACTION_LIST_REPOSITORY_H @@ -59,21 +42,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("faction_list"); @@ -93,7 +61,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_faction_values_repository.h b/common/repositories/base/base_faction_values_repository.h index 63fbd2597..181779da3 100644 --- a/common/repositories/base/base_faction_values_repository.h +++ b/common/repositories/base/base_faction_values_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_FACTION_VALUES_REPOSITORY_H @@ -61,21 +44,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("faction_values"); @@ -95,7 +63,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_fishing_repository.h b/common/repositories/base/base_fishing_repository.h index 8ba5d7517..6ee2bf098 100644 --- a/common/repositories/base/base_fishing_repository.h +++ b/common/repositories/base/base_fishing_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_FISHING_REPOSITORY_H @@ -75,21 +58,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("fishing"); @@ -109,7 +77,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -238,6 +206,7 @@ public: { std::vector insert_values; + insert_values.push_back(std::to_string(fishing_entry.id)); insert_values.push_back(std::to_string(fishing_entry.zoneid)); insert_values.push_back(std::to_string(fishing_entry.Itemid)); insert_values.push_back(std::to_string(fishing_entry.skill_level)); @@ -277,6 +246,7 @@ public: for (auto &fishing_entry: fishing_entries) { std::vector insert_values; + insert_values.push_back(std::to_string(fishing_entry.id)); insert_values.push_back(std::to_string(fishing_entry.zoneid)); insert_values.push_back(std::to_string(fishing_entry.Itemid)); insert_values.push_back(std::to_string(fishing_entry.skill_level)); diff --git a/common/repositories/base/base_forage_repository.h b/common/repositories/base/base_forage_repository.h index 6fda9ba2d..0aa684b1b 100644 --- a/common/repositories/base/base_forage_repository.h +++ b/common/repositories/base/base_forage_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_FORAGE_REPOSITORY_H @@ -71,21 +54,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("forage"); @@ -105,7 +73,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -228,6 +196,7 @@ public: { std::vector insert_values; + insert_values.push_back(std::to_string(forage_entry.id)); insert_values.push_back(std::to_string(forage_entry.zoneid)); insert_values.push_back(std::to_string(forage_entry.Itemid)); insert_values.push_back(std::to_string(forage_entry.level)); @@ -265,6 +234,7 @@ public: for (auto &forage_entry: forage_entries) { std::vector insert_values; + insert_values.push_back(std::to_string(forage_entry.id)); insert_values.push_back(std::to_string(forage_entry.zoneid)); insert_values.push_back(std::to_string(forage_entry.Itemid)); insert_values.push_back(std::to_string(forage_entry.level)); diff --git a/common/repositories/base/base_friends_repository.h b/common/repositories/base/base_friends_repository.h index 64a2042d6..187994a85 100644 --- a/common/repositories/base/base_friends_repository.h +++ b/common/repositories/base/base_friends_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_FRIENDS_REPOSITORY_H @@ -59,21 +42,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("friends"); @@ -93,7 +61,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_global_loot_repository.h b/common/repositories/base/base_global_loot_repository.h index 87ebc18f3..98170acf5 100644 --- a/common/repositories/base/base_global_loot_repository.h +++ b/common/repositories/base/base_global_loot_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_GLOBAL_LOOT_REPOSITORY_H @@ -87,21 +70,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("global_loot"); @@ -121,7 +89,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -268,6 +236,7 @@ public: { std::vector insert_values; + insert_values.push_back(std::to_string(global_loot_entry.id)); insert_values.push_back("'" + EscapeString(global_loot_entry.description) + "'"); insert_values.push_back(std::to_string(global_loot_entry.loottable_id)); insert_values.push_back(std::to_string(global_loot_entry.enabled)); @@ -313,6 +282,7 @@ public: for (auto &global_loot_entry: global_loot_entries) { std::vector insert_values; + insert_values.push_back(std::to_string(global_loot_entry.id)); insert_values.push_back("'" + EscapeString(global_loot_entry.description) + "'"); insert_values.push_back(std::to_string(global_loot_entry.loottable_id)); insert_values.push_back(std::to_string(global_loot_entry.enabled)); diff --git a/common/repositories/base/base_gm_ips_repository.h b/common/repositories/base/base_gm_ips_repository.h index 84c124b83..56027c7a2 100644 --- a/common/repositories/base/base_gm_ips_repository.h +++ b/common/repositories/base/base_gm_ips_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_GM_IPS_REPOSITORY_H @@ -59,21 +42,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("gm_ips"); @@ -93,7 +61,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_goallists_repository.h b/common/repositories/base/base_goallists_repository.h index 68de11598..c736d9e01 100644 --- a/common/repositories/base/base_goallists_repository.h +++ b/common/repositories/base/base_goallists_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_GOALLISTS_REPOSITORY_H @@ -57,21 +40,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("goallists"); @@ -91,7 +59,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_graveyard_repository.h b/common/repositories/base/base_graveyard_repository.h index 54cc24657..500775a94 100644 --- a/common/repositories/base/base_graveyard_repository.h +++ b/common/repositories/base/base_graveyard_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_GRAVEYARD_REPOSITORY_H @@ -65,21 +48,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("graveyard"); @@ -99,7 +67,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -213,6 +181,7 @@ public: { std::vector insert_values; + insert_values.push_back(std::to_string(graveyard_entry.id)); insert_values.push_back(std::to_string(graveyard_entry.zone_id)); insert_values.push_back(std::to_string(graveyard_entry.x)); insert_values.push_back(std::to_string(graveyard_entry.y)); @@ -247,6 +216,7 @@ public: for (auto &graveyard_entry: graveyard_entries) { std::vector insert_values; + insert_values.push_back(std::to_string(graveyard_entry.id)); insert_values.push_back(std::to_string(graveyard_entry.zone_id)); insert_values.push_back(std::to_string(graveyard_entry.x)); insert_values.push_back(std::to_string(graveyard_entry.y)); diff --git a/common/repositories/base/base_ground_spawns_repository.h b/common/repositories/base/base_ground_spawns_repository.h index f4be68297..6b2a0d5cc 100644 --- a/common/repositories/base/base_ground_spawns_repository.h +++ b/common/repositories/base/base_ground_spawns_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_GROUND_SPAWNS_REPOSITORY_H @@ -89,21 +72,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("ground_spawns"); @@ -123,7 +91,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -273,6 +241,7 @@ public: { std::vector insert_values; + insert_values.push_back(std::to_string(ground_spawns_entry.id)); insert_values.push_back(std::to_string(ground_spawns_entry.zoneid)); insert_values.push_back(std::to_string(ground_spawns_entry.version)); insert_values.push_back(std::to_string(ground_spawns_entry.max_x)); @@ -319,6 +288,7 @@ public: for (auto &ground_spawns_entry: ground_spawns_entries) { std::vector insert_values; + insert_values.push_back(std::to_string(ground_spawns_entry.id)); insert_values.push_back(std::to_string(ground_spawns_entry.zoneid)); insert_values.push_back(std::to_string(ground_spawns_entry.version)); insert_values.push_back(std::to_string(ground_spawns_entry.max_x)); diff --git a/common/repositories/base/base_group_id_repository.h b/common/repositories/base/base_group_id_repository.h index d607541d1..8005f003e 100644 --- a/common/repositories/base/base_group_id_repository.h +++ b/common/repositories/base/base_group_id_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_GROUP_ID_REPOSITORY_H @@ -61,21 +44,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("group_id"); @@ -95,7 +63,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_group_leaders_repository.h b/common/repositories/base/base_group_leaders_repository.h index fc5264ef8..97e7028cd 100644 --- a/common/repositories/base/base_group_leaders_repository.h +++ b/common/repositories/base/base_group_leaders_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_GROUP_LEADERS_REPOSITORY_H @@ -71,21 +54,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("group_leaders"); @@ -105,7 +73,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_guild_members_repository.h b/common/repositories/base/base_guild_members_repository.h index 518150b61..931d0bdf6 100644 --- a/common/repositories/base/base_guild_members_repository.h +++ b/common/repositories/base/base_guild_members_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_GUILD_MEMBERS_REPOSITORY_H @@ -71,21 +54,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("guild_members"); @@ -105,7 +73,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_guild_ranks_repository.h b/common/repositories/base/base_guild_ranks_repository.h index d136defb3..b608cfaa5 100644 --- a/common/repositories/base/base_guild_ranks_repository.h +++ b/common/repositories/base/base_guild_ranks_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_GUILD_RANKS_REPOSITORY_H @@ -75,21 +58,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("guild_ranks"); @@ -109,7 +77,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_guild_relations_repository.h b/common/repositories/base/base_guild_relations_repository.h index 7ea85b4a0..2ddcd854f 100644 --- a/common/repositories/base/base_guild_relations_repository.h +++ b/common/repositories/base/base_guild_relations_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_GUILD_RELATIONS_REPOSITORY_H @@ -59,21 +42,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("guild_relations"); @@ -93,7 +61,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_guilds_repository.h b/common/repositories/base/base_guilds_repository.h index 312247a20..e1cd14f14 100644 --- a/common/repositories/base/base_guilds_repository.h +++ b/common/repositories/base/base_guilds_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_GUILDS_REPOSITORY_H @@ -71,21 +54,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("guilds"); @@ -105,7 +73,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -228,6 +196,7 @@ public: { std::vector insert_values; + insert_values.push_back(std::to_string(guilds_entry.id)); insert_values.push_back("'" + EscapeString(guilds_entry.name) + "'"); insert_values.push_back(std::to_string(guilds_entry.leader)); insert_values.push_back(std::to_string(guilds_entry.minstatus)); @@ -265,6 +234,7 @@ public: for (auto &guilds_entry: guilds_entries) { std::vector insert_values; + insert_values.push_back(std::to_string(guilds_entry.id)); insert_values.push_back("'" + EscapeString(guilds_entry.name) + "'"); insert_values.push_back(std::to_string(guilds_entry.leader)); insert_values.push_back(std::to_string(guilds_entry.minstatus)); diff --git a/common/repositories/base/base_hackers_repository.h b/common/repositories/base/base_hackers_repository.h index 5dcf5fba3..4a492deac 100644 --- a/common/repositories/base/base_hackers_repository.h +++ b/common/repositories/base/base_hackers_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_HACKERS_REPOSITORY_H @@ -65,21 +48,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("hackers"); @@ -99,7 +67,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -213,6 +181,7 @@ public: { std::vector insert_values; + insert_values.push_back(std::to_string(hackers_entry.id)); insert_values.push_back("'" + EscapeString(hackers_entry.account) + "'"); insert_values.push_back("'" + EscapeString(hackers_entry.name) + "'"); insert_values.push_back("'" + EscapeString(hackers_entry.hacked) + "'"); @@ -247,6 +216,7 @@ public: for (auto &hackers_entry: hackers_entries) { std::vector insert_values; + insert_values.push_back(std::to_string(hackers_entry.id)); insert_values.push_back("'" + EscapeString(hackers_entry.account) + "'"); insert_values.push_back("'" + EscapeString(hackers_entry.name) + "'"); insert_values.push_back("'" + EscapeString(hackers_entry.hacked) + "'"); diff --git a/common/repositories/base/base_instance_list_player_repository.h b/common/repositories/base/base_instance_list_player_repository.h index 66553cca0..4b8aed4ee 100644 --- a/common/repositories/base/base_instance_list_player_repository.h +++ b/common/repositories/base/base_instance_list_player_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_INSTANCE_LIST_PLAYER_REPOSITORY_H @@ -57,21 +40,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("instance_list_player"); @@ -91,7 +59,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_instance_list_repository.h b/common/repositories/base/base_instance_list_repository.h index dbe5a0dd2..55b31703f 100644 --- a/common/repositories/base/base_instance_list_repository.h +++ b/common/repositories/base/base_instance_list_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_INSTANCE_LIST_REPOSITORY_H @@ -67,21 +50,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("instance_list"); @@ -101,7 +69,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -218,6 +186,7 @@ public: { std::vector insert_values; + insert_values.push_back(std::to_string(instance_list_entry.id)); insert_values.push_back(std::to_string(instance_list_entry.zone)); insert_values.push_back(std::to_string(instance_list_entry.version)); insert_values.push_back(std::to_string(instance_list_entry.is_global)); @@ -253,6 +222,7 @@ public: for (auto &instance_list_entry: instance_list_entries) { std::vector insert_values; + insert_values.push_back(std::to_string(instance_list_entry.id)); insert_values.push_back(std::to_string(instance_list_entry.zone)); insert_values.push_back(std::to_string(instance_list_entry.version)); insert_values.push_back(std::to_string(instance_list_entry.is_global)); diff --git a/common/repositories/base/base_inventory_repository.h b/common/repositories/base/base_inventory_repository.h index 3deb76fd7..62308ebdf 100644 --- a/common/repositories/base/base_inventory_repository.h +++ b/common/repositories/base/base_inventory_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_INVENTORY_REPOSITORY_H @@ -85,21 +68,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("inventory"); @@ -119,7 +87,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_inventory_snapshots_repository.h b/common/repositories/base/base_inventory_snapshots_repository.h index a31e91da7..4d34062f3 100644 --- a/common/repositories/base/base_inventory_snapshots_repository.h +++ b/common/repositories/base/base_inventory_snapshots_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_INVENTORY_SNAPSHOTS_REPOSITORY_H @@ -87,21 +70,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("inventory_snapshots"); @@ -121,7 +89,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_ip_exemptions_repository.h b/common/repositories/base/base_ip_exemptions_repository.h index e673d18d2..dadd49b8e 100644 --- a/common/repositories/base/base_ip_exemptions_repository.h +++ b/common/repositories/base/base_ip_exemptions_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_IP_EXEMPTIONS_REPOSITORY_H @@ -59,21 +42,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("ip_exemptions"); @@ -93,7 +61,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -198,6 +166,7 @@ public: { std::vector insert_values; + insert_values.push_back(std::to_string(ip_exemptions_entry.exemption_id)); insert_values.push_back("'" + EscapeString(ip_exemptions_entry.exemption_ip) + "'"); insert_values.push_back(std::to_string(ip_exemptions_entry.exemption_amount)); @@ -229,6 +198,7 @@ public: for (auto &ip_exemptions_entry: ip_exemptions_entries) { std::vector insert_values; + insert_values.push_back(std::to_string(ip_exemptions_entry.exemption_id)); insert_values.push_back("'" + EscapeString(ip_exemptions_entry.exemption_ip) + "'"); insert_values.push_back(std::to_string(ip_exemptions_entry.exemption_amount)); diff --git a/common/repositories/base/base_item_tick_repository.h b/common/repositories/base/base_item_tick_repository.h index 5d788acca..77b0ec71e 100644 --- a/common/repositories/base/base_item_tick_repository.h +++ b/common/repositories/base/base_item_tick_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_ITEM_TICK_REPOSITORY_H @@ -65,21 +48,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("item_tick"); @@ -99,7 +67,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -216,6 +184,7 @@ public: insert_values.push_back(std::to_string(item_tick_entry.it_itemid)); insert_values.push_back(std::to_string(item_tick_entry.it_chance)); insert_values.push_back(std::to_string(item_tick_entry.it_level)); + insert_values.push_back(std::to_string(item_tick_entry.it_id)); insert_values.push_back("'" + EscapeString(item_tick_entry.it_qglobal) + "'"); insert_values.push_back(std::to_string(item_tick_entry.it_bagslot)); @@ -250,6 +219,7 @@ public: insert_values.push_back(std::to_string(item_tick_entry.it_itemid)); insert_values.push_back(std::to_string(item_tick_entry.it_chance)); insert_values.push_back(std::to_string(item_tick_entry.it_level)); + insert_values.push_back(std::to_string(item_tick_entry.it_id)); insert_values.push_back("'" + EscapeString(item_tick_entry.it_qglobal) + "'"); insert_values.push_back(std::to_string(item_tick_entry.it_bagslot)); diff --git a/common/repositories/base/base_items_repository.h b/common/repositories/base/base_items_repository.h index c309bc1b6..da124eca0 100644 --- a/common/repositories/base/base_items_repository.h +++ b/common/repositories/base/base_items_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_ITEMS_REPOSITORY_H @@ -623,21 +606,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("items"); @@ -657,7 +625,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_ldon_trap_entries_repository.h b/common/repositories/base/base_ldon_trap_entries_repository.h index 86ab6e8f2..05fc73bf5 100644 --- a/common/repositories/base/base_ldon_trap_entries_repository.h +++ b/common/repositories/base/base_ldon_trap_entries_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_LDON_TRAP_ENTRIES_REPOSITORY_H @@ -57,21 +40,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("ldon_trap_entries"); @@ -91,7 +59,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_ldon_trap_templates_repository.h b/common/repositories/base/base_ldon_trap_templates_repository.h index 396345ea8..27def1890 100644 --- a/common/repositories/base/base_ldon_trap_templates_repository.h +++ b/common/repositories/base/base_ldon_trap_templates_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_LDON_TRAP_TEMPLATES_REPOSITORY_H @@ -63,21 +46,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("ldon_trap_templates"); @@ -97,7 +65,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_level_exp_mods_repository.h b/common/repositories/base/base_level_exp_mods_repository.h index 47fb482c3..eaa4a5f4a 100644 --- a/common/repositories/base/base_level_exp_mods_repository.h +++ b/common/repositories/base/base_level_exp_mods_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_LEVEL_EXP_MODS_REPOSITORY_H @@ -59,21 +42,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("level_exp_mods"); @@ -93,7 +61,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_lfguild_repository.h b/common/repositories/base/base_lfguild_repository.h index 39a32a5c8..10e2f0682 100644 --- a/common/repositories/base/base_lfguild_repository.h +++ b/common/repositories/base/base_lfguild_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_LFGUILD_REPOSITORY_H @@ -71,21 +54,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("lfguild"); @@ -105,7 +73,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_login_accounts_repository.h b/common/repositories/base/base_login_accounts_repository.h index 767ea0ead..25dc167d1 100644 --- a/common/repositories/base/base_login_accounts_repository.h +++ b/common/repositories/base/base_login_accounts_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_LOGIN_ACCOUNTS_REPOSITORY_H @@ -71,21 +54,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("login_accounts"); @@ -105,7 +73,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_login_api_tokens_repository.h b/common/repositories/base/base_login_api_tokens_repository.h index 20be8143a..88ed5c74a 100644 --- a/common/repositories/base/base_login_api_tokens_repository.h +++ b/common/repositories/base/base_login_api_tokens_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_LOGIN_API_TOKENS_REPOSITORY_H @@ -65,21 +48,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("login_api_tokens"); @@ -99,7 +67,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -213,6 +181,7 @@ public: { std::vector insert_values; + insert_values.push_back(std::to_string(login_api_tokens_entry.id)); insert_values.push_back("'" + EscapeString(login_api_tokens_entry.token) + "'"); insert_values.push_back(std::to_string(login_api_tokens_entry.can_write)); insert_values.push_back(std::to_string(login_api_tokens_entry.can_read)); @@ -247,6 +216,7 @@ public: for (auto &login_api_tokens_entry: login_api_tokens_entries) { std::vector insert_values; + insert_values.push_back(std::to_string(login_api_tokens_entry.id)); insert_values.push_back("'" + EscapeString(login_api_tokens_entry.token) + "'"); insert_values.push_back(std::to_string(login_api_tokens_entry.can_write)); insert_values.push_back(std::to_string(login_api_tokens_entry.can_read)); diff --git a/common/repositories/base/base_login_server_admins_repository.h b/common/repositories/base/base_login_server_admins_repository.h index 6d25eb4c9..771eb014f 100644 --- a/common/repositories/base/base_login_server_admins_repository.h +++ b/common/repositories/base/base_login_server_admins_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_LOGIN_SERVER_ADMINS_REPOSITORY_H @@ -69,21 +52,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("login_server_admins"); @@ -103,7 +71,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -223,6 +191,7 @@ public: { std::vector insert_values; + insert_values.push_back(std::to_string(login_server_admins_entry.id)); insert_values.push_back("'" + EscapeString(login_server_admins_entry.account_name) + "'"); insert_values.push_back("'" + EscapeString(login_server_admins_entry.account_password) + "'"); insert_values.push_back("'" + EscapeString(login_server_admins_entry.first_name) + "'"); @@ -259,6 +228,7 @@ public: for (auto &login_server_admins_entry: login_server_admins_entries) { std::vector insert_values; + insert_values.push_back(std::to_string(login_server_admins_entry.id)); insert_values.push_back("'" + EscapeString(login_server_admins_entry.account_name) + "'"); insert_values.push_back("'" + EscapeString(login_server_admins_entry.account_password) + "'"); insert_values.push_back("'" + EscapeString(login_server_admins_entry.first_name) + "'"); diff --git a/common/repositories/base/base_login_server_list_types_repository.h b/common/repositories/base/base_login_server_list_types_repository.h index 5508e3704..16b47381c 100644 --- a/common/repositories/base/base_login_server_list_types_repository.h +++ b/common/repositories/base/base_login_server_list_types_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_LOGIN_SERVER_LIST_TYPES_REPOSITORY_H @@ -57,21 +40,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("login_server_list_types"); @@ -91,7 +59,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_login_world_servers_repository.h b/common/repositories/base/base_login_world_servers_repository.h index 8a21dc6b5..96dc1f8ae 100644 --- a/common/repositories/base/base_login_world_servers_repository.h +++ b/common/repositories/base/base_login_world_servers_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_LOGIN_WORLD_SERVERS_REPOSITORY_H @@ -73,21 +56,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("login_world_servers"); @@ -107,7 +75,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -233,6 +201,7 @@ public: { std::vector insert_values; + insert_values.push_back(std::to_string(login_world_servers_entry.id)); insert_values.push_back("'" + EscapeString(login_world_servers_entry.long_name) + "'"); insert_values.push_back("'" + EscapeString(login_world_servers_entry.short_name) + "'"); insert_values.push_back("'" + EscapeString(login_world_servers_entry.tag_description) + "'"); @@ -271,6 +240,7 @@ public: for (auto &login_world_servers_entry: login_world_servers_entries) { std::vector insert_values; + insert_values.push_back(std::to_string(login_world_servers_entry.id)); insert_values.push_back("'" + EscapeString(login_world_servers_entry.long_name) + "'"); insert_values.push_back("'" + EscapeString(login_world_servers_entry.short_name) + "'"); insert_values.push_back("'" + EscapeString(login_world_servers_entry.tag_description) + "'"); diff --git a/common/repositories/base/base_logsys_categories_repository.h b/common/repositories/base/base_logsys_categories_repository.h index 380897a76..4077e32f7 100644 --- a/common/repositories/base/base_logsys_categories_repository.h +++ b/common/repositories/base/base_logsys_categories_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_LOGSYS_CATEGORIES_REPOSITORY_H @@ -63,21 +46,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("logsys_categories"); @@ -97,7 +65,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_lootdrop_entries_repository.h b/common/repositories/base/base_lootdrop_entries_repository.h index 48d33f130..524b00588 100644 --- a/common/repositories/base/base_lootdrop_entries_repository.h +++ b/common/repositories/base/base_lootdrop_entries_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_LOOTDROP_ENTRIES_REPOSITORY_H @@ -75,21 +58,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("lootdrop_entries"); @@ -109,7 +77,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_lootdrop_repository.h b/common/repositories/base/base_lootdrop_repository.h index a0da43c83..abacd5f8b 100644 --- a/common/repositories/base/base_lootdrop_repository.h +++ b/common/repositories/base/base_lootdrop_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_LOOTDROP_REPOSITORY_H @@ -65,21 +48,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("lootdrop"); @@ -99,7 +67,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -213,6 +181,7 @@ public: { std::vector insert_values; + insert_values.push_back(std::to_string(lootdrop_entry.id)); insert_values.push_back("'" + EscapeString(lootdrop_entry.name) + "'"); insert_values.push_back(std::to_string(lootdrop_entry.min_expansion)); insert_values.push_back(std::to_string(lootdrop_entry.max_expansion)); @@ -247,6 +216,7 @@ public: for (auto &lootdrop_entry: lootdrop_entries) { std::vector insert_values; + insert_values.push_back(std::to_string(lootdrop_entry.id)); insert_values.push_back("'" + EscapeString(lootdrop_entry.name) + "'"); insert_values.push_back(std::to_string(lootdrop_entry.min_expansion)); insert_values.push_back(std::to_string(lootdrop_entry.max_expansion)); diff --git a/common/repositories/base/base_loottable_entries_repository.h b/common/repositories/base/base_loottable_entries_repository.h index 52a8a738c..e8143e7e3 100644 --- a/common/repositories/base/base_loottable_entries_repository.h +++ b/common/repositories/base/base_loottable_entries_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_LOOTTABLE_ENTRIES_REPOSITORY_H @@ -65,21 +48,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("loottable_entries"); @@ -99,7 +67,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_loottable_repository.h b/common/repositories/base/base_loottable_repository.h index e0ab61a00..88ff30ec9 100644 --- a/common/repositories/base/base_loottable_repository.h +++ b/common/repositories/base/base_loottable_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_LOOTTABLE_REPOSITORY_H @@ -73,21 +56,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("loottable"); @@ -107,7 +75,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -233,6 +201,7 @@ public: { std::vector insert_values; + insert_values.push_back(std::to_string(loottable_entry.id)); insert_values.push_back("'" + EscapeString(loottable_entry.name) + "'"); insert_values.push_back(std::to_string(loottable_entry.mincash)); insert_values.push_back(std::to_string(loottable_entry.maxcash)); @@ -271,6 +240,7 @@ public: for (auto &loottable_entry: loottable_entries) { std::vector insert_values; + insert_values.push_back(std::to_string(loottable_entry.id)); insert_values.push_back("'" + EscapeString(loottable_entry.name) + "'"); insert_values.push_back(std::to_string(loottable_entry.mincash)); insert_values.push_back(std::to_string(loottable_entry.maxcash)); diff --git a/common/repositories/base/base_mail_repository.h b/common/repositories/base/base_mail_repository.h index 39d2a086c..674881b64 100644 --- a/common/repositories/base/base_mail_repository.h +++ b/common/repositories/base/base_mail_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_MAIL_REPOSITORY_H @@ -69,21 +52,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("mail"); @@ -103,7 +71,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -223,6 +191,7 @@ public: { std::vector insert_values; + insert_values.push_back(std::to_string(mail_entry.msgid)); insert_values.push_back(std::to_string(mail_entry.charid)); insert_values.push_back(std::to_string(mail_entry.timestamp)); insert_values.push_back("'" + EscapeString(mail_entry.from) + "'"); @@ -259,6 +228,7 @@ public: for (auto &mail_entry: mail_entries) { std::vector insert_values; + insert_values.push_back(std::to_string(mail_entry.msgid)); insert_values.push_back(std::to_string(mail_entry.charid)); insert_values.push_back(std::to_string(mail_entry.timestamp)); insert_values.push_back("'" + EscapeString(mail_entry.from) + "'"); diff --git a/common/repositories/base/base_merchantlist_repository.h b/common/repositories/base/base_merchantlist_repository.h index 2b87bc7b6..437b419cd 100644 --- a/common/repositories/base/base_merchantlist_repository.h +++ b/common/repositories/base/base_merchantlist_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_MERCHANTLIST_REPOSITORY_H @@ -77,21 +60,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("merchantlist"); @@ -111,7 +79,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_merchantlist_temp_repository.h b/common/repositories/base/base_merchantlist_temp_repository.h index 87d96dfb1..1db32b796 100644 --- a/common/repositories/base/base_merchantlist_temp_repository.h +++ b/common/repositories/base/base_merchantlist_temp_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_MERCHANTLIST_TEMP_REPOSITORY_H @@ -61,21 +44,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("merchantlist_temp"); @@ -95,7 +63,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_name_filter_repository.h b/common/repositories/base/base_name_filter_repository.h index 93273046a..5f9c19a8b 100644 --- a/common/repositories/base/base_name_filter_repository.h +++ b/common/repositories/base/base_name_filter_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_NAME_FILTER_REPOSITORY_H @@ -57,21 +40,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("name_filter"); @@ -91,7 +59,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -193,6 +161,7 @@ public: { std::vector insert_values; + insert_values.push_back(std::to_string(name_filter_entry.id)); insert_values.push_back("'" + EscapeString(name_filter_entry.name) + "'"); auto results = db.QueryDatabase( @@ -223,6 +192,7 @@ public: for (auto &name_filter_entry: name_filter_entries) { std::vector insert_values; + insert_values.push_back(std::to_string(name_filter_entry.id)); insert_values.push_back("'" + EscapeString(name_filter_entry.name) + "'"); insert_chunks.push_back("(" + implode(",", insert_values) + ")"); diff --git a/common/repositories/base/base_npc_emotes_repository.h b/common/repositories/base/base_npc_emotes_repository.h index c32939af1..cc0503d16 100644 --- a/common/repositories/base/base_npc_emotes_repository.h +++ b/common/repositories/base/base_npc_emotes_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_NPC_EMOTES_REPOSITORY_H @@ -63,21 +46,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("npc_emotes"); @@ -97,7 +65,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -208,6 +176,7 @@ public: { std::vector insert_values; + insert_values.push_back(std::to_string(npc_emotes_entry.id)); insert_values.push_back(std::to_string(npc_emotes_entry.emoteid)); insert_values.push_back(std::to_string(npc_emotes_entry.event_)); insert_values.push_back(std::to_string(npc_emotes_entry.type)); @@ -241,6 +210,7 @@ public: for (auto &npc_emotes_entry: npc_emotes_entries) { std::vector insert_values; + insert_values.push_back(std::to_string(npc_emotes_entry.id)); insert_values.push_back(std::to_string(npc_emotes_entry.emoteid)); insert_values.push_back(std::to_string(npc_emotes_entry.event_)); insert_values.push_back(std::to_string(npc_emotes_entry.type)); diff --git a/common/repositories/base/base_npc_faction_entries_repository.h b/common/repositories/base/base_npc_faction_entries_repository.h index 5ce90f273..a25a9a258 100644 --- a/common/repositories/base/base_npc_faction_entries_repository.h +++ b/common/repositories/base/base_npc_faction_entries_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_NPC_FACTION_ENTRIES_REPOSITORY_H @@ -63,21 +46,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("npc_faction_entries"); @@ -97,7 +65,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_npc_faction_repository.h b/common/repositories/base/base_npc_faction_repository.h index 22435c946..5cb58fafa 100644 --- a/common/repositories/base/base_npc_faction_repository.h +++ b/common/repositories/base/base_npc_faction_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_NPC_FACTION_REPOSITORY_H @@ -61,21 +44,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("npc_faction"); @@ -95,7 +63,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -203,6 +171,7 @@ public: { std::vector insert_values; + insert_values.push_back(std::to_string(npc_faction_entry.id)); insert_values.push_back("'" + EscapeString(npc_faction_entry.name) + "'"); insert_values.push_back(std::to_string(npc_faction_entry.primaryfaction)); insert_values.push_back(std::to_string(npc_faction_entry.ignore_primary_assist)); @@ -235,6 +204,7 @@ public: for (auto &npc_faction_entry: npc_faction_entries) { std::vector insert_values; + insert_values.push_back(std::to_string(npc_faction_entry.id)); insert_values.push_back("'" + EscapeString(npc_faction_entry.name) + "'"); insert_values.push_back(std::to_string(npc_faction_entry.primaryfaction)); insert_values.push_back(std::to_string(npc_faction_entry.ignore_primary_assist)); diff --git a/common/repositories/base/base_npc_scale_global_base_repository.h b/common/repositories/base/base_npc_scale_global_base_repository.h index 186018ad7..e701c7686 100644 --- a/common/repositories/base/base_npc_scale_global_base_repository.h +++ b/common/repositories/base/base_npc_scale_global_base_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_NPC_SCALE_GLOBAL_BASE_REPOSITORY_H @@ -109,21 +92,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("npc_scale_global_base"); @@ -143,7 +111,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_npc_spells_effects_entries_repository.h b/common/repositories/base/base_npc_spells_effects_entries_repository.h index 3d12df705..563176079 100644 --- a/common/repositories/base/base_npc_spells_effects_entries_repository.h +++ b/common/repositories/base/base_npc_spells_effects_entries_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_NPC_SPELLS_EFFECTS_ENTRIES_REPOSITORY_H @@ -69,21 +52,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("npc_spells_effects_entries"); @@ -103,7 +71,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -223,6 +191,7 @@ public: { std::vector insert_values; + insert_values.push_back(std::to_string(npc_spells_effects_entries_entry.id)); insert_values.push_back(std::to_string(npc_spells_effects_entries_entry.npc_spells_effects_id)); insert_values.push_back(std::to_string(npc_spells_effects_entries_entry.spell_effect_id)); insert_values.push_back(std::to_string(npc_spells_effects_entries_entry.minlevel)); @@ -259,6 +228,7 @@ public: for (auto &npc_spells_effects_entries_entry: npc_spells_effects_entries_entries) { std::vector insert_values; + insert_values.push_back(std::to_string(npc_spells_effects_entries_entry.id)); insert_values.push_back(std::to_string(npc_spells_effects_entries_entry.npc_spells_effects_id)); insert_values.push_back(std::to_string(npc_spells_effects_entries_entry.spell_effect_id)); insert_values.push_back(std::to_string(npc_spells_effects_entries_entry.minlevel)); diff --git a/common/repositories/base/base_npc_spells_effects_repository.h b/common/repositories/base/base_npc_spells_effects_repository.h index b8e75e8d1..a6b5e52bd 100644 --- a/common/repositories/base/base_npc_spells_effects_repository.h +++ b/common/repositories/base/base_npc_spells_effects_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_NPC_SPELLS_EFFECTS_REPOSITORY_H @@ -59,21 +42,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("npc_spells_effects"); @@ -93,7 +61,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -198,6 +166,7 @@ public: { std::vector insert_values; + insert_values.push_back(std::to_string(npc_spells_effects_entry.id)); insert_values.push_back("'" + EscapeString(npc_spells_effects_entry.name) + "'"); insert_values.push_back(std::to_string(npc_spells_effects_entry.parent_list)); @@ -229,6 +198,7 @@ public: for (auto &npc_spells_effects_entry: npc_spells_effects_entries) { std::vector insert_values; + insert_values.push_back(std::to_string(npc_spells_effects_entry.id)); insert_values.push_back("'" + EscapeString(npc_spells_effects_entry.name) + "'"); insert_values.push_back(std::to_string(npc_spells_effects_entry.parent_list)); diff --git a/common/repositories/base/base_npc_spells_entries_repository.h b/common/repositories/base/base_npc_spells_entries_repository.h index 06f53c42a..97139ab2b 100644 --- a/common/repositories/base/base_npc_spells_entries_repository.h +++ b/common/repositories/base/base_npc_spells_entries_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_NPC_SPELLS_ENTRIES_REPOSITORY_H @@ -77,21 +60,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("npc_spells_entries"); @@ -111,7 +79,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -243,6 +211,7 @@ public: { std::vector insert_values; + insert_values.push_back(std::to_string(npc_spells_entries_entry.id)); insert_values.push_back(std::to_string(npc_spells_entries_entry.npc_spells_id)); insert_values.push_back(std::to_string(npc_spells_entries_entry.spellid)); insert_values.push_back(std::to_string(npc_spells_entries_entry.type)); @@ -283,6 +252,7 @@ public: for (auto &npc_spells_entries_entry: npc_spells_entries_entries) { std::vector insert_values; + insert_values.push_back(std::to_string(npc_spells_entries_entry.id)); insert_values.push_back(std::to_string(npc_spells_entries_entry.npc_spells_id)); insert_values.push_back(std::to_string(npc_spells_entries_entry.spellid)); insert_values.push_back(std::to_string(npc_spells_entries_entry.type)); diff --git a/common/repositories/base/base_npc_spells_repository.h b/common/repositories/base/base_npc_spells_repository.h index b99c67bf3..448683064 100644 --- a/common/repositories/base/base_npc_spells_repository.h +++ b/common/repositories/base/base_npc_spells_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_NPC_SPELLS_REPOSITORY_H @@ -95,21 +78,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("npc_spells"); @@ -129,7 +97,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -288,6 +256,7 @@ public: { std::vector insert_values; + insert_values.push_back(std::to_string(npc_spells_entry.id)); insert_values.push_back("'" + EscapeString(npc_spells_entry.name) + "'"); insert_values.push_back(std::to_string(npc_spells_entry.parent_list)); insert_values.push_back(std::to_string(npc_spells_entry.attack_proc)); @@ -337,6 +306,7 @@ public: for (auto &npc_spells_entry: npc_spells_entries) { std::vector insert_values; + insert_values.push_back(std::to_string(npc_spells_entry.id)); insert_values.push_back("'" + EscapeString(npc_spells_entry.name) + "'"); insert_values.push_back(std::to_string(npc_spells_entry.parent_list)); insert_values.push_back(std::to_string(npc_spells_entry.attack_proc)); diff --git a/common/repositories/base/base_npc_types_repository.h b/common/repositories/base/base_npc_types_repository.h index 8c8fcf116..b127988fa 100644 --- a/common/repositories/base/base_npc_types_repository.h +++ b/common/repositories/base/base_npc_types_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_NPC_TYPES_REPOSITORY_H @@ -297,21 +280,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("npc_types"); @@ -331,7 +299,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -793,6 +761,7 @@ public: { std::vector insert_values; + insert_values.push_back(std::to_string(npc_types_entry.id)); insert_values.push_back("'" + EscapeString(npc_types_entry.name) + "'"); insert_values.push_back("'" + EscapeString(npc_types_entry.lastname) + "'"); insert_values.push_back(std::to_string(npc_types_entry.level)); @@ -943,6 +912,7 @@ public: for (auto &npc_types_entry: npc_types_entries) { std::vector insert_values; + insert_values.push_back(std::to_string(npc_types_entry.id)); insert_values.push_back("'" + EscapeString(npc_types_entry.name) + "'"); insert_values.push_back("'" + EscapeString(npc_types_entry.lastname) + "'"); insert_values.push_back(std::to_string(npc_types_entry.level)); diff --git a/common/repositories/base/base_npc_types_tint_repository.h b/common/repositories/base/base_npc_types_tint_repository.h index dc4a1bbdf..3ba577f36 100644 --- a/common/repositories/base/base_npc_types_tint_repository.h +++ b/common/repositories/base/base_npc_types_tint_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_NPC_TYPES_TINT_REPOSITORY_H @@ -111,21 +94,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("npc_types_tint"); @@ -145,7 +113,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_object_contents_repository.h b/common/repositories/base/base_object_contents_repository.h index c73145c6d..576429ba0 100644 --- a/common/repositories/base/base_object_contents_repository.h +++ b/common/repositories/base/base_object_contents_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_OBJECT_CONTENTS_REPOSITORY_H @@ -77,21 +60,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("object_contents"); @@ -111,7 +79,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_object_repository.h b/common/repositories/base/base_object_repository.h index f2659d7a1..a572ed712 100644 --- a/common/repositories/base/base_object_repository.h +++ b/common/repositories/base/base_object_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_OBJECT_REPOSITORY_H @@ -113,21 +96,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("object"); @@ -147,7 +115,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -333,6 +301,7 @@ public: { std::vector insert_values; + insert_values.push_back(std::to_string(object_entry.id)); insert_values.push_back(std::to_string(object_entry.zoneid)); insert_values.push_back(std::to_string(object_entry.version)); insert_values.push_back(std::to_string(object_entry.xpos)); @@ -391,6 +360,7 @@ public: for (auto &object_entry: object_entries) { std::vector insert_values; + insert_values.push_back(std::to_string(object_entry.id)); insert_values.push_back(std::to_string(object_entry.zoneid)); insert_values.push_back(std::to_string(object_entry.version)); insert_values.push_back(std::to_string(object_entry.xpos)); diff --git a/common/repositories/base/base_perl_event_export_settings_repository.h b/common/repositories/base/base_perl_event_export_settings_repository.h index b54bf825f..d58084463 100644 --- a/common/repositories/base/base_perl_event_export_settings_repository.h +++ b/common/repositories/base/base_perl_event_export_settings_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_PERL_EVENT_EXPORT_SETTINGS_REPOSITORY_H @@ -67,21 +50,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("perl_event_export_settings"); @@ -101,7 +69,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_petitions_repository.h b/common/repositories/base/base_petitions_repository.h index c9cabfee8..30dd9feaa 100644 --- a/common/repositories/base/base_petitions_repository.h +++ b/common/repositories/base/base_petitions_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_PETITIONS_REPOSITORY_H @@ -85,21 +68,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("petitions"); @@ -119,7 +87,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -263,6 +231,7 @@ public: { std::vector insert_values; + insert_values.push_back(std::to_string(petitions_entry.dib)); insert_values.push_back(std::to_string(petitions_entry.petid)); insert_values.push_back("'" + EscapeString(petitions_entry.charname) + "'"); insert_values.push_back("'" + EscapeString(petitions_entry.accountname) + "'"); @@ -307,6 +276,7 @@ public: for (auto &petitions_entry: petitions_entries) { std::vector insert_values; + insert_values.push_back(std::to_string(petitions_entry.dib)); insert_values.push_back(std::to_string(petitions_entry.petid)); insert_values.push_back("'" + EscapeString(petitions_entry.charname) + "'"); insert_values.push_back("'" + EscapeString(petitions_entry.accountname) + "'"); diff --git a/common/repositories/base/base_pets_equipmentset_entries_repository.h b/common/repositories/base/base_pets_equipmentset_entries_repository.h index 2bf2f52e7..ecd9b2643 100644 --- a/common/repositories/base/base_pets_equipmentset_entries_repository.h +++ b/common/repositories/base/base_pets_equipmentset_entries_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_PETS_EQUIPMENTSET_ENTRIES_REPOSITORY_H @@ -59,21 +42,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("pets_equipmentset_entries"); @@ -93,7 +61,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_pets_equipmentset_repository.h b/common/repositories/base/base_pets_equipmentset_repository.h index c041477c3..0f27a879f 100644 --- a/common/repositories/base/base_pets_equipmentset_repository.h +++ b/common/repositories/base/base_pets_equipmentset_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_PETS_EQUIPMENTSET_REPOSITORY_H @@ -59,21 +42,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("pets_equipmentset"); @@ -93,7 +61,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_pets_repository.h b/common/repositories/base/base_pets_repository.h index ef4ddf7f1..75681e6c4 100644 --- a/common/repositories/base/base_pets_repository.h +++ b/common/repositories/base/base_pets_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_PETS_REPOSITORY_H @@ -69,21 +52,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("pets"); @@ -103,7 +71,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_player_titlesets_repository.h b/common/repositories/base/base_player_titlesets_repository.h index 4378090a6..12c800953 100644 --- a/common/repositories/base/base_player_titlesets_repository.h +++ b/common/repositories/base/base_player_titlesets_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_PLAYER_TITLESETS_REPOSITORY_H @@ -59,21 +42,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("player_titlesets"); @@ -93,7 +61,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -198,6 +166,7 @@ public: { std::vector insert_values; + insert_values.push_back(std::to_string(player_titlesets_entry.id)); insert_values.push_back(std::to_string(player_titlesets_entry.char_id)); insert_values.push_back(std::to_string(player_titlesets_entry.title_set)); @@ -229,6 +198,7 @@ public: for (auto &player_titlesets_entry: player_titlesets_entries) { std::vector insert_values; + insert_values.push_back(std::to_string(player_titlesets_entry.id)); insert_values.push_back(std::to_string(player_titlesets_entry.char_id)); insert_values.push_back(std::to_string(player_titlesets_entry.title_set)); diff --git a/common/repositories/base/base_proximities_repository.h b/common/repositories/base/base_proximities_repository.h index 2495da016..6b1f697b0 100644 --- a/common/repositories/base/base_proximities_repository.h +++ b/common/repositories/base/base_proximities_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_PROXIMITIES_REPOSITORY_H @@ -69,21 +52,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("proximities"); @@ -103,7 +71,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_quest_globals_repository.h b/common/repositories/base/base_quest_globals_repository.h index 0b20020e8..0870938fd 100644 --- a/common/repositories/base/base_quest_globals_repository.h +++ b/common/repositories/base/base_quest_globals_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_QUEST_GLOBALS_REPOSITORY_H @@ -65,21 +48,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("quest_globals"); @@ -99,7 +67,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_raid_details_repository.h b/common/repositories/base/base_raid_details_repository.h index fc00b12be..a0f717bc6 100644 --- a/common/repositories/base/base_raid_details_repository.h +++ b/common/repositories/base/base_raid_details_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_RAID_DETAILS_REPOSITORY_H @@ -61,21 +44,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("raid_details"); @@ -95,7 +63,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_raid_members_repository.h b/common/repositories/base/base_raid_members_repository.h index 983475640..b4c9ef94f 100644 --- a/common/repositories/base/base_raid_members_repository.h +++ b/common/repositories/base/base_raid_members_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_RAID_MEMBERS_REPOSITORY_H @@ -71,21 +54,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("raid_members"); @@ -105,7 +73,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_reports_repository.h b/common/repositories/base/base_reports_repository.h index c3842c923..caebd4107 100644 --- a/common/repositories/base/base_reports_repository.h +++ b/common/repositories/base/base_reports_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_REPORTS_REPOSITORY_H @@ -61,21 +44,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("reports"); @@ -95,7 +63,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -203,6 +171,7 @@ public: { std::vector insert_values; + insert_values.push_back(std::to_string(reports_entry.id)); insert_values.push_back("'" + EscapeString(reports_entry.name) + "'"); insert_values.push_back("'" + EscapeString(reports_entry.reported) + "'"); insert_values.push_back("'" + EscapeString(reports_entry.reported_text) + "'"); @@ -235,6 +204,7 @@ public: for (auto &reports_entry: reports_entries) { std::vector insert_values; + insert_values.push_back(std::to_string(reports_entry.id)); insert_values.push_back("'" + EscapeString(reports_entry.name) + "'"); insert_values.push_back("'" + EscapeString(reports_entry.reported) + "'"); insert_values.push_back("'" + EscapeString(reports_entry.reported_text) + "'"); diff --git a/common/repositories/base/base_respawn_times_repository.h b/common/repositories/base/base_respawn_times_repository.h index 16fd1f2ef..df69f2be9 100644 --- a/common/repositories/base/base_respawn_times_repository.h +++ b/common/repositories/base/base_respawn_times_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_RESPAWN_TIMES_REPOSITORY_H @@ -61,21 +44,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("respawn_times"); @@ -95,7 +63,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_rule_sets_repository.h b/common/repositories/base/base_rule_sets_repository.h index 2c6a4d679..31dab96d9 100644 --- a/common/repositories/base/base_rule_sets_repository.h +++ b/common/repositories/base/base_rule_sets_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_RULE_SETS_REPOSITORY_H @@ -57,21 +40,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("rule_sets"); @@ -91,7 +59,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -193,6 +161,7 @@ public: { std::vector insert_values; + insert_values.push_back(std::to_string(rule_sets_entry.ruleset_id)); insert_values.push_back("'" + EscapeString(rule_sets_entry.name) + "'"); auto results = db.QueryDatabase( @@ -223,6 +192,7 @@ public: for (auto &rule_sets_entry: rule_sets_entries) { std::vector insert_values; + insert_values.push_back(std::to_string(rule_sets_entry.ruleset_id)); insert_values.push_back("'" + EscapeString(rule_sets_entry.name) + "'"); insert_chunks.push_back("(" + implode(",", insert_values) + ")"); diff --git a/common/repositories/base/base_rule_values_repository.h b/common/repositories/base/base_rule_values_repository.h index 44bce4518..6bd6fe2d6 100644 --- a/common/repositories/base/base_rule_values_repository.h +++ b/common/repositories/base/base_rule_values_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_RULE_VALUES_REPOSITORY_H @@ -61,21 +44,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("rule_values"); @@ -95,7 +63,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_saylink_repository.h b/common/repositories/base/base_saylink_repository.h index 1bfc00807..e02b1954c 100644 --- a/common/repositories/base/base_saylink_repository.h +++ b/common/repositories/base/base_saylink_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_SAYLINK_REPOSITORY_H @@ -57,21 +40,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("saylink"); @@ -91,7 +59,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -193,6 +161,7 @@ public: { std::vector insert_values; + insert_values.push_back(std::to_string(saylink_entry.id)); insert_values.push_back("'" + EscapeString(saylink_entry.phrase) + "'"); auto results = db.QueryDatabase( @@ -223,6 +192,7 @@ public: for (auto &saylink_entry: saylink_entries) { std::vector insert_values; + insert_values.push_back(std::to_string(saylink_entry.id)); insert_values.push_back("'" + EscapeString(saylink_entry.phrase) + "'"); insert_chunks.push_back("(" + implode(",", insert_values) + ")"); diff --git a/common/repositories/base/base_skill_caps_repository.h b/common/repositories/base/base_skill_caps_repository.h index fcafdcf48..b17753782 100644 --- a/common/repositories/base/base_skill_caps_repository.h +++ b/common/repositories/base/base_skill_caps_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_SKILL_CAPS_REPOSITORY_H @@ -63,21 +46,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("skill_caps"); @@ -97,7 +65,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_spawn2_repository.h b/common/repositories/base/base_spawn2_repository.h index ce4d12ba8..921c9262d 100644 --- a/common/repositories/base/base_spawn2_repository.h +++ b/common/repositories/base/base_spawn2_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_SPAWN2_REPOSITORY_H @@ -91,21 +74,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("spawn2"); @@ -125,7 +93,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -278,6 +246,7 @@ public: { std::vector insert_values; + insert_values.push_back(std::to_string(spawn2_entry.id)); insert_values.push_back(std::to_string(spawn2_entry.spawngroupID)); insert_values.push_back("'" + EscapeString(spawn2_entry.zone) + "'"); insert_values.push_back(std::to_string(spawn2_entry.version)); @@ -325,6 +294,7 @@ public: for (auto &spawn2_entry: spawn2_entries) { std::vector insert_values; + insert_values.push_back(std::to_string(spawn2_entry.id)); insert_values.push_back(std::to_string(spawn2_entry.spawngroupID)); insert_values.push_back("'" + EscapeString(spawn2_entry.zone) + "'"); insert_values.push_back(std::to_string(spawn2_entry.version)); diff --git a/common/repositories/base/base_spawn_condition_values_repository.h b/common/repositories/base/base_spawn_condition_values_repository.h index 9a0d1668b..c54eee597 100644 --- a/common/repositories/base/base_spawn_condition_values_repository.h +++ b/common/repositories/base/base_spawn_condition_values_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_SPAWN_CONDITION_VALUES_REPOSITORY_H @@ -61,21 +44,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("spawn_condition_values"); @@ -95,7 +63,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_spawn_conditions_repository.h b/common/repositories/base/base_spawn_conditions_repository.h index c4bc27594..e0e7fa0ab 100644 --- a/common/repositories/base/base_spawn_conditions_repository.h +++ b/common/repositories/base/base_spawn_conditions_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_SPAWN_CONDITIONS_REPOSITORY_H @@ -63,21 +46,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("spawn_conditions"); @@ -97,7 +65,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_spawn_events_repository.h b/common/repositories/base/base_spawn_events_repository.h index abf1e7573..da52bbb8a 100644 --- a/common/repositories/base/base_spawn_events_repository.h +++ b/common/repositories/base/base_spawn_events_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_SPAWN_EVENTS_REPOSITORY_H @@ -81,21 +64,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("spawn_events"); @@ -115,7 +83,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -253,6 +221,7 @@ public: { std::vector insert_values; + insert_values.push_back(std::to_string(spawn_events_entry.id)); insert_values.push_back("'" + EscapeString(spawn_events_entry.zone) + "'"); insert_values.push_back(std::to_string(spawn_events_entry.cond_id)); insert_values.push_back("'" + EscapeString(spawn_events_entry.name) + "'"); @@ -295,6 +264,7 @@ public: for (auto &spawn_events_entry: spawn_events_entries) { std::vector insert_values; + insert_values.push_back(std::to_string(spawn_events_entry.id)); insert_values.push_back("'" + EscapeString(spawn_events_entry.zone) + "'"); insert_values.push_back(std::to_string(spawn_events_entry.cond_id)); insert_values.push_back("'" + EscapeString(spawn_events_entry.name) + "'"); diff --git a/common/repositories/base/base_spawnentry_repository.h b/common/repositories/base/base_spawnentry_repository.h index 8b00fe50c..4a04bf7d6 100644 --- a/common/repositories/base/base_spawnentry_repository.h +++ b/common/repositories/base/base_spawnentry_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_SPAWNENTRY_REPOSITORY_H @@ -61,21 +44,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("spawnentry"); @@ -95,7 +63,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_spawngroup_repository.h b/common/repositories/base/base_spawngroup_repository.h index 62557ce2b..0baba76aa 100644 --- a/common/repositories/base/base_spawngroup_repository.h +++ b/common/repositories/base/base_spawngroup_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_SPAWNGROUP_REPOSITORY_H @@ -79,21 +62,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("spawngroup"); @@ -113,7 +81,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -248,6 +216,7 @@ public: { std::vector insert_values; + insert_values.push_back(std::to_string(spawngroup_entry.id)); insert_values.push_back("'" + EscapeString(spawngroup_entry.name) + "'"); insert_values.push_back(std::to_string(spawngroup_entry.spawn_limit)); insert_values.push_back(std::to_string(spawngroup_entry.dist)); @@ -289,6 +258,7 @@ public: for (auto &spawngroup_entry: spawngroup_entries) { std::vector insert_values; + insert_values.push_back(std::to_string(spawngroup_entry.id)); insert_values.push_back("'" + EscapeString(spawngroup_entry.name) + "'"); insert_values.push_back(std::to_string(spawngroup_entry.spawn_limit)); insert_values.push_back(std::to_string(spawngroup_entry.dist)); diff --git a/common/repositories/base/base_spell_buckets_repository.h b/common/repositories/base/base_spell_buckets_repository.h index b0c9abc52..39ce3ff42 100644 --- a/common/repositories/base/base_spell_buckets_repository.h +++ b/common/repositories/base/base_spell_buckets_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_SPELL_BUCKETS_REPOSITORY_H @@ -59,21 +42,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("spell_buckets"); @@ -93,7 +61,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_spell_globals_repository.h b/common/repositories/base/base_spell_globals_repository.h index cc3a8e0d7..40ce563ce 100644 --- a/common/repositories/base/base_spell_globals_repository.h +++ b/common/repositories/base/base_spell_globals_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_SPELL_GLOBALS_REPOSITORY_H @@ -61,21 +44,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("spell_globals"); @@ -95,7 +63,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_spells_new_repository.h b/common/repositories/base/base_spells_new_repository.h index f0930baf9..e59ce3b28 100644 --- a/common/repositories/base/base_spells_new_repository.h +++ b/common/repositories/base/base_spells_new_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_SPELLS_NEW_REPOSITORY_H @@ -527,21 +510,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("spells_new"); @@ -561,7 +529,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_start_zones_repository.h b/common/repositories/base/base_start_zones_repository.h index 347012500..75a8595ca 100644 --- a/common/repositories/base/base_start_zones_repository.h +++ b/common/repositories/base/base_start_zones_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_START_ZONES_REPOSITORY_H @@ -91,21 +74,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("start_zones"); @@ -125,7 +93,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_starting_items_repository.h b/common/repositories/base/base_starting_items_repository.h index 2a18b33e8..edb2cafa9 100644 --- a/common/repositories/base/base_starting_items_repository.h +++ b/common/repositories/base/base_starting_items_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_STARTING_ITEMS_REPOSITORY_H @@ -79,21 +62,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("starting_items"); @@ -113,7 +81,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -248,6 +216,7 @@ public: { std::vector insert_values; + insert_values.push_back(std::to_string(starting_items_entry.id)); insert_values.push_back(std::to_string(starting_items_entry.race)); insert_values.push_back(std::to_string(starting_items_entry.class)); insert_values.push_back(std::to_string(starting_items_entry.deityid)); @@ -289,6 +258,7 @@ public: for (auto &starting_items_entry: starting_items_entries) { std::vector insert_values; + insert_values.push_back(std::to_string(starting_items_entry.id)); insert_values.push_back(std::to_string(starting_items_entry.race)); insert_values.push_back(std::to_string(starting_items_entry.class)); insert_values.push_back(std::to_string(starting_items_entry.deityid)); diff --git a/common/repositories/base/base_task_activities_repository.h b/common/repositories/base/base_task_activities_repository.h index 0bf3ca384..ad7f1fee4 100644 --- a/common/repositories/base/base_task_activities_repository.h +++ b/common/repositories/base/base_task_activities_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_TASK_ACTIVITIES_REPOSITORY_H @@ -83,21 +66,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("task_activities"); @@ -117,7 +85,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_tasks_repository.h b/common/repositories/base/base_tasks_repository.h index 8c5aa3ff5..bd4bc9d29 100644 --- a/common/repositories/base/base_tasks_repository.h +++ b/common/repositories/base/base_tasks_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_TASKS_REPOSITORY_H @@ -46,11 +29,27 @@ public: int cashreward; int xpreward; int rewardmethod; + int reward_points; + int reward_type; int minlevel; int maxlevel; int repeatable; int faction_reward; std::string completion_emote; + int replay_group; + int min_players; + int max_players; + int task_lock_step; + int instance_zone_id; + int zone_version; + int zone_in_zone_id; + float zone_in_x; + float zone_in_y; + int zone_in_object_id; + float dest_x; + float dest_y; + float dest_z; + float dest_h; }; static std::string PrimaryKey() @@ -72,11 +71,27 @@ public: "cashreward", "xpreward", "rewardmethod", + "reward_points", + "reward_type", "minlevel", "maxlevel", "repeatable", "faction_reward", "completion_emote", + "replay_group", + "min_players", + "max_players", + "task_lock_step", + "instance_zone_id", + "zone_version", + "zone_in_zone_id", + "zone_in_x", + "zone_in_y", + "zone_in_object_id", + "dest_x", + "dest_y", + "dest_z", + "dest_h", }; } @@ -85,21 +100,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("tasks"); @@ -119,7 +119,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -127,22 +127,38 @@ public: { Tasks entry{}; - entry.id = 0; - entry.type = 0; - entry.duration = 0; - entry.duration_code = 0; - entry.title = ""; - entry.description = ""; - entry.reward = ""; - entry.rewardid = 0; - entry.cashreward = 0; - entry.xpreward = 0; - entry.rewardmethod = 2; - entry.minlevel = 0; - entry.maxlevel = 0; - entry.repeatable = 1; - entry.faction_reward = 0; - entry.completion_emote = ""; + entry.id = 0; + entry.type = 0; + entry.duration = 0; + entry.duration_code = 0; + entry.title = ""; + entry.description = ""; + entry.reward = ""; + entry.rewardid = 0; + entry.cashreward = 0; + entry.xpreward = 0; + entry.rewardmethod = 2; + entry.reward_points = 0; + entry.reward_type = 0; + entry.minlevel = 0; + entry.maxlevel = 0; + entry.repeatable = 1; + entry.faction_reward = 0; + entry.completion_emote = ""; + entry.replay_group = 0; + entry.min_players = 0; + entry.max_players = 0; + entry.task_lock_step = 0; + entry.instance_zone_id = 0; + entry.zone_version = 0; + entry.zone_in_zone_id = 0; + entry.zone_in_x = 0; + entry.zone_in_y = 0; + entry.zone_in_object_id = 0; + entry.dest_x = 0; + entry.dest_y = 0; + entry.dest_z = 0; + entry.dest_h = 0; return entry; } @@ -178,22 +194,38 @@ public: if (results.RowCount() == 1) { Tasks entry{}; - entry.id = atoi(row[0]); - entry.type = atoi(row[1]); - entry.duration = atoi(row[2]); - entry.duration_code = atoi(row[3]); - entry.title = row[4] ? row[4] : ""; - entry.description = row[5] ? row[5] : ""; - entry.reward = row[6] ? row[6] : ""; - entry.rewardid = atoi(row[7]); - entry.cashreward = atoi(row[8]); - entry.xpreward = atoi(row[9]); - entry.rewardmethod = atoi(row[10]); - entry.minlevel = atoi(row[11]); - entry.maxlevel = atoi(row[12]); - entry.repeatable = atoi(row[13]); - entry.faction_reward = atoi(row[14]); - entry.completion_emote = row[15] ? row[15] : ""; + entry.id = atoi(row[0]); + entry.type = atoi(row[1]); + entry.duration = atoi(row[2]); + entry.duration_code = atoi(row[3]); + entry.title = row[4] ? row[4] : ""; + entry.description = row[5] ? row[5] : ""; + entry.reward = row[6] ? row[6] : ""; + entry.rewardid = atoi(row[7]); + entry.cashreward = atoi(row[8]); + entry.xpreward = atoi(row[9]); + entry.rewardmethod = atoi(row[10]); + entry.reward_points = atoi(row[11]); + entry.reward_type = atoi(row[12]); + entry.minlevel = atoi(row[13]); + entry.maxlevel = atoi(row[14]); + entry.repeatable = atoi(row[15]); + entry.faction_reward = atoi(row[16]); + entry.completion_emote = row[17] ? row[17] : ""; + entry.replay_group = atoi(row[18]); + entry.min_players = atoi(row[19]); + entry.max_players = atoi(row[20]); + entry.task_lock_step = atoi(row[21]); + entry.instance_zone_id = atoi(row[22]); + entry.zone_version = atoi(row[23]); + entry.zone_in_zone_id = atoi(row[24]); + entry.zone_in_x = static_cast(atof(row[25])); + entry.zone_in_y = static_cast(atof(row[26])); + entry.zone_in_object_id = atoi(row[27]); + entry.dest_x = static_cast(atof(row[28])); + entry.dest_y = static_cast(atof(row[29])); + entry.dest_z = static_cast(atof(row[30])); + entry.dest_h = static_cast(atof(row[31])); return entry; } @@ -238,11 +270,27 @@ public: update_values.push_back(columns[8] + " = " + std::to_string(tasks_entry.cashreward)); update_values.push_back(columns[9] + " = " + std::to_string(tasks_entry.xpreward)); update_values.push_back(columns[10] + " = " + std::to_string(tasks_entry.rewardmethod)); - update_values.push_back(columns[11] + " = " + std::to_string(tasks_entry.minlevel)); - update_values.push_back(columns[12] + " = " + std::to_string(tasks_entry.maxlevel)); - update_values.push_back(columns[13] + " = " + std::to_string(tasks_entry.repeatable)); - update_values.push_back(columns[14] + " = " + std::to_string(tasks_entry.faction_reward)); - update_values.push_back(columns[15] + " = '" + EscapeString(tasks_entry.completion_emote) + "'"); + update_values.push_back(columns[11] + " = " + std::to_string(tasks_entry.reward_points)); + update_values.push_back(columns[12] + " = " + std::to_string(tasks_entry.reward_type)); + update_values.push_back(columns[13] + " = " + std::to_string(tasks_entry.minlevel)); + update_values.push_back(columns[14] + " = " + std::to_string(tasks_entry.maxlevel)); + update_values.push_back(columns[15] + " = " + std::to_string(tasks_entry.repeatable)); + update_values.push_back(columns[16] + " = " + std::to_string(tasks_entry.faction_reward)); + update_values.push_back(columns[17] + " = '" + EscapeString(tasks_entry.completion_emote) + "'"); + update_values.push_back(columns[18] + " = " + std::to_string(tasks_entry.replay_group)); + update_values.push_back(columns[19] + " = " + std::to_string(tasks_entry.min_players)); + update_values.push_back(columns[20] + " = " + std::to_string(tasks_entry.max_players)); + update_values.push_back(columns[21] + " = " + std::to_string(tasks_entry.task_lock_step)); + update_values.push_back(columns[22] + " = " + std::to_string(tasks_entry.instance_zone_id)); + update_values.push_back(columns[23] + " = " + std::to_string(tasks_entry.zone_version)); + update_values.push_back(columns[24] + " = " + std::to_string(tasks_entry.zone_in_zone_id)); + update_values.push_back(columns[25] + " = " + std::to_string(tasks_entry.zone_in_x)); + update_values.push_back(columns[26] + " = " + std::to_string(tasks_entry.zone_in_y)); + update_values.push_back(columns[27] + " = " + std::to_string(tasks_entry.zone_in_object_id)); + update_values.push_back(columns[28] + " = " + std::to_string(tasks_entry.dest_x)); + update_values.push_back(columns[29] + " = " + std::to_string(tasks_entry.dest_y)); + update_values.push_back(columns[30] + " = " + std::to_string(tasks_entry.dest_z)); + update_values.push_back(columns[31] + " = " + std::to_string(tasks_entry.dest_h)); auto results = db.QueryDatabase( fmt::format( @@ -275,11 +323,27 @@ public: insert_values.push_back(std::to_string(tasks_entry.cashreward)); insert_values.push_back(std::to_string(tasks_entry.xpreward)); insert_values.push_back(std::to_string(tasks_entry.rewardmethod)); + insert_values.push_back(std::to_string(tasks_entry.reward_points)); + insert_values.push_back(std::to_string(tasks_entry.reward_type)); insert_values.push_back(std::to_string(tasks_entry.minlevel)); insert_values.push_back(std::to_string(tasks_entry.maxlevel)); insert_values.push_back(std::to_string(tasks_entry.repeatable)); insert_values.push_back(std::to_string(tasks_entry.faction_reward)); insert_values.push_back("'" + EscapeString(tasks_entry.completion_emote) + "'"); + insert_values.push_back(std::to_string(tasks_entry.replay_group)); + insert_values.push_back(std::to_string(tasks_entry.min_players)); + insert_values.push_back(std::to_string(tasks_entry.max_players)); + insert_values.push_back(std::to_string(tasks_entry.task_lock_step)); + insert_values.push_back(std::to_string(tasks_entry.instance_zone_id)); + insert_values.push_back(std::to_string(tasks_entry.zone_version)); + insert_values.push_back(std::to_string(tasks_entry.zone_in_zone_id)); + insert_values.push_back(std::to_string(tasks_entry.zone_in_x)); + insert_values.push_back(std::to_string(tasks_entry.zone_in_y)); + insert_values.push_back(std::to_string(tasks_entry.zone_in_object_id)); + insert_values.push_back(std::to_string(tasks_entry.dest_x)); + insert_values.push_back(std::to_string(tasks_entry.dest_y)); + insert_values.push_back(std::to_string(tasks_entry.dest_z)); + insert_values.push_back(std::to_string(tasks_entry.dest_h)); auto results = db.QueryDatabase( fmt::format( @@ -320,11 +384,27 @@ public: insert_values.push_back(std::to_string(tasks_entry.cashreward)); insert_values.push_back(std::to_string(tasks_entry.xpreward)); insert_values.push_back(std::to_string(tasks_entry.rewardmethod)); + insert_values.push_back(std::to_string(tasks_entry.reward_points)); + insert_values.push_back(std::to_string(tasks_entry.reward_type)); insert_values.push_back(std::to_string(tasks_entry.minlevel)); insert_values.push_back(std::to_string(tasks_entry.maxlevel)); insert_values.push_back(std::to_string(tasks_entry.repeatable)); insert_values.push_back(std::to_string(tasks_entry.faction_reward)); insert_values.push_back("'" + EscapeString(tasks_entry.completion_emote) + "'"); + insert_values.push_back(std::to_string(tasks_entry.replay_group)); + insert_values.push_back(std::to_string(tasks_entry.min_players)); + insert_values.push_back(std::to_string(tasks_entry.max_players)); + insert_values.push_back(std::to_string(tasks_entry.task_lock_step)); + insert_values.push_back(std::to_string(tasks_entry.instance_zone_id)); + insert_values.push_back(std::to_string(tasks_entry.zone_version)); + insert_values.push_back(std::to_string(tasks_entry.zone_in_zone_id)); + insert_values.push_back(std::to_string(tasks_entry.zone_in_x)); + insert_values.push_back(std::to_string(tasks_entry.zone_in_y)); + insert_values.push_back(std::to_string(tasks_entry.zone_in_object_id)); + insert_values.push_back(std::to_string(tasks_entry.dest_x)); + insert_values.push_back(std::to_string(tasks_entry.dest_y)); + insert_values.push_back(std::to_string(tasks_entry.dest_z)); + insert_values.push_back(std::to_string(tasks_entry.dest_h)); insert_chunks.push_back("(" + implode(",", insert_values) + ")"); } @@ -358,22 +438,38 @@ public: for (auto row = results.begin(); row != results.end(); ++row) { Tasks entry{}; - entry.id = atoi(row[0]); - entry.type = atoi(row[1]); - entry.duration = atoi(row[2]); - entry.duration_code = atoi(row[3]); - entry.title = row[4] ? row[4] : ""; - entry.description = row[5] ? row[5] : ""; - entry.reward = row[6] ? row[6] : ""; - entry.rewardid = atoi(row[7]); - entry.cashreward = atoi(row[8]); - entry.xpreward = atoi(row[9]); - entry.rewardmethod = atoi(row[10]); - entry.minlevel = atoi(row[11]); - entry.maxlevel = atoi(row[12]); - entry.repeatable = atoi(row[13]); - entry.faction_reward = atoi(row[14]); - entry.completion_emote = row[15] ? row[15] : ""; + entry.id = atoi(row[0]); + entry.type = atoi(row[1]); + entry.duration = atoi(row[2]); + entry.duration_code = atoi(row[3]); + entry.title = row[4] ? row[4] : ""; + entry.description = row[5] ? row[5] : ""; + entry.reward = row[6] ? row[6] : ""; + entry.rewardid = atoi(row[7]); + entry.cashreward = atoi(row[8]); + entry.xpreward = atoi(row[9]); + entry.rewardmethod = atoi(row[10]); + entry.reward_points = atoi(row[11]); + entry.reward_type = atoi(row[12]); + entry.minlevel = atoi(row[13]); + entry.maxlevel = atoi(row[14]); + entry.repeatable = atoi(row[15]); + entry.faction_reward = atoi(row[16]); + entry.completion_emote = row[17] ? row[17] : ""; + entry.replay_group = atoi(row[18]); + entry.min_players = atoi(row[19]); + entry.max_players = atoi(row[20]); + entry.task_lock_step = atoi(row[21]); + entry.instance_zone_id = atoi(row[22]); + entry.zone_version = atoi(row[23]); + entry.zone_in_zone_id = atoi(row[24]); + entry.zone_in_x = static_cast(atof(row[25])); + entry.zone_in_y = static_cast(atof(row[26])); + entry.zone_in_object_id = atoi(row[27]); + entry.dest_x = static_cast(atof(row[28])); + entry.dest_y = static_cast(atof(row[29])); + entry.dest_z = static_cast(atof(row[30])); + entry.dest_h = static_cast(atof(row[31])); all_entries.push_back(entry); } @@ -398,22 +494,38 @@ public: for (auto row = results.begin(); row != results.end(); ++row) { Tasks entry{}; - entry.id = atoi(row[0]); - entry.type = atoi(row[1]); - entry.duration = atoi(row[2]); - entry.duration_code = atoi(row[3]); - entry.title = row[4] ? row[4] : ""; - entry.description = row[5] ? row[5] : ""; - entry.reward = row[6] ? row[6] : ""; - entry.rewardid = atoi(row[7]); - entry.cashreward = atoi(row[8]); - entry.xpreward = atoi(row[9]); - entry.rewardmethod = atoi(row[10]); - entry.minlevel = atoi(row[11]); - entry.maxlevel = atoi(row[12]); - entry.repeatable = atoi(row[13]); - entry.faction_reward = atoi(row[14]); - entry.completion_emote = row[15] ? row[15] : ""; + entry.id = atoi(row[0]); + entry.type = atoi(row[1]); + entry.duration = atoi(row[2]); + entry.duration_code = atoi(row[3]); + entry.title = row[4] ? row[4] : ""; + entry.description = row[5] ? row[5] : ""; + entry.reward = row[6] ? row[6] : ""; + entry.rewardid = atoi(row[7]); + entry.cashreward = atoi(row[8]); + entry.xpreward = atoi(row[9]); + entry.rewardmethod = atoi(row[10]); + entry.reward_points = atoi(row[11]); + entry.reward_type = atoi(row[12]); + entry.minlevel = atoi(row[13]); + entry.maxlevel = atoi(row[14]); + entry.repeatable = atoi(row[15]); + entry.faction_reward = atoi(row[16]); + entry.completion_emote = row[17] ? row[17] : ""; + entry.replay_group = atoi(row[18]); + entry.min_players = atoi(row[19]); + entry.max_players = atoi(row[20]); + entry.task_lock_step = atoi(row[21]); + entry.instance_zone_id = atoi(row[22]); + entry.zone_version = atoi(row[23]); + entry.zone_in_zone_id = atoi(row[24]); + entry.zone_in_x = static_cast(atof(row[25])); + entry.zone_in_y = static_cast(atof(row[26])); + entry.zone_in_object_id = atoi(row[27]); + entry.dest_x = static_cast(atof(row[28])); + entry.dest_y = static_cast(atof(row[29])); + entry.dest_z = static_cast(atof(row[30])); + entry.dest_h = static_cast(atof(row[31])); all_entries.push_back(entry); } diff --git a/common/repositories/base/base_tasksets_repository.h b/common/repositories/base/base_tasksets_repository.h index a6fb2584a..c3feb4ccd 100644 --- a/common/repositories/base/base_tasksets_repository.h +++ b/common/repositories/base/base_tasksets_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_TASKSETS_REPOSITORY_H @@ -57,21 +40,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("tasksets"); @@ -91,7 +59,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_timers_repository.h b/common/repositories/base/base_timers_repository.h index aff07d9b1..f1d6d97b1 100644 --- a/common/repositories/base/base_timers_repository.h +++ b/common/repositories/base/base_timers_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_TIMERS_REPOSITORY_H @@ -63,21 +46,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("timers"); @@ -97,7 +65,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_titles_repository.h b/common/repositories/base/base_titles_repository.h index d08374d2a..c108c887b 100644 --- a/common/repositories/base/base_titles_repository.h +++ b/common/repositories/base/base_titles_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_TITLES_REPOSITORY_H @@ -81,21 +64,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("titles"); @@ -115,7 +83,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -253,6 +221,7 @@ public: { std::vector insert_values; + insert_values.push_back(std::to_string(titles_entry.id)); insert_values.push_back(std::to_string(titles_entry.skill_id)); insert_values.push_back(std::to_string(titles_entry.min_skill_value)); insert_values.push_back(std::to_string(titles_entry.max_skill_value)); @@ -295,6 +264,7 @@ public: for (auto &titles_entry: titles_entries) { std::vector insert_values; + insert_values.push_back(std::to_string(titles_entry.id)); insert_values.push_back(std::to_string(titles_entry.skill_id)); insert_values.push_back(std::to_string(titles_entry.min_skill_value)); insert_values.push_back(std::to_string(titles_entry.max_skill_value)); diff --git a/common/repositories/base/base_trader_repository.h b/common/repositories/base/base_trader_repository.h index 330791e2b..1eded1551 100644 --- a/common/repositories/base/base_trader_repository.h +++ b/common/repositories/base/base_trader_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_TRADER_REPOSITORY_H @@ -65,21 +48,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("trader"); @@ -99,7 +67,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_tradeskill_recipe_entries_repository.h b/common/repositories/base/base_tradeskill_recipe_entries_repository.h index d5a5351b7..13c293c77 100644 --- a/common/repositories/base/base_tradeskill_recipe_entries_repository.h +++ b/common/repositories/base/base_tradeskill_recipe_entries_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_TRADESKILL_RECIPE_ENTRIES_REPOSITORY_H @@ -69,21 +52,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("tradeskill_recipe_entries"); @@ -103,7 +71,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -223,6 +191,7 @@ public: { std::vector insert_values; + insert_values.push_back(std::to_string(tradeskill_recipe_entries_entry.id)); insert_values.push_back(std::to_string(tradeskill_recipe_entries_entry.recipe_id)); insert_values.push_back(std::to_string(tradeskill_recipe_entries_entry.item_id)); insert_values.push_back(std::to_string(tradeskill_recipe_entries_entry.successcount)); @@ -259,6 +228,7 @@ public: for (auto &tradeskill_recipe_entries_entry: tradeskill_recipe_entries_entries) { std::vector insert_values; + insert_values.push_back(std::to_string(tradeskill_recipe_entries_entry.id)); insert_values.push_back(std::to_string(tradeskill_recipe_entries_entry.recipe_id)); insert_values.push_back(std::to_string(tradeskill_recipe_entries_entry.item_id)); insert_values.push_back(std::to_string(tradeskill_recipe_entries_entry.successcount)); diff --git a/common/repositories/base/base_tradeskill_recipe_repository.h b/common/repositories/base/base_tradeskill_recipe_repository.h index 8156369c1..453d8b7dc 100644 --- a/common/repositories/base/base_tradeskill_recipe_repository.h +++ b/common/repositories/base/base_tradeskill_recipe_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_TRADESKILL_RECIPE_REPOSITORY_H @@ -83,21 +66,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("tradeskill_recipe"); @@ -117,7 +85,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -258,6 +226,7 @@ public: { std::vector insert_values; + insert_values.push_back(std::to_string(tradeskill_recipe_entry.id)); insert_values.push_back("'" + EscapeString(tradeskill_recipe_entry.name) + "'"); insert_values.push_back(std::to_string(tradeskill_recipe_entry.tradeskill)); insert_values.push_back(std::to_string(tradeskill_recipe_entry.skillneeded)); @@ -301,6 +270,7 @@ public: for (auto &tradeskill_recipe_entry: tradeskill_recipe_entries) { std::vector insert_values; + insert_values.push_back(std::to_string(tradeskill_recipe_entry.id)); insert_values.push_back("'" + EscapeString(tradeskill_recipe_entry.name) + "'"); insert_values.push_back(std::to_string(tradeskill_recipe_entry.tradeskill)); insert_values.push_back(std::to_string(tradeskill_recipe_entry.skillneeded)); diff --git a/common/repositories/base/base_traps_repository.h b/common/repositories/base/base_traps_repository.h index 53e5883bd..b76072525 100644 --- a/common/repositories/base/base_traps_repository.h +++ b/common/repositories/base/base_traps_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_TRAPS_REPOSITORY_H @@ -103,21 +86,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("traps"); @@ -137,7 +105,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -308,6 +276,7 @@ public: { std::vector insert_values; + insert_values.push_back(std::to_string(traps_entry.id)); insert_values.push_back("'" + EscapeString(traps_entry.zone) + "'"); insert_values.push_back(std::to_string(traps_entry.version)); insert_values.push_back(std::to_string(traps_entry.x)); @@ -361,6 +330,7 @@ public: for (auto &traps_entry: traps_entries) { std::vector insert_values; + insert_values.push_back(std::to_string(traps_entry.id)); insert_values.push_back("'" + EscapeString(traps_entry.zone) + "'"); insert_values.push_back(std::to_string(traps_entry.version)); insert_values.push_back(std::to_string(traps_entry.x)); diff --git a/common/repositories/base/base_tribute_levels_repository.h b/common/repositories/base/base_tribute_levels_repository.h index 1754a10de..2e49dab99 100644 --- a/common/repositories/base/base_tribute_levels_repository.h +++ b/common/repositories/base/base_tribute_levels_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_TRIBUTE_LEVELS_REPOSITORY_H @@ -61,21 +44,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("tribute_levels"); @@ -95,7 +63,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_tributes_repository.h b/common/repositories/base/base_tributes_repository.h index 10da88ef5..1acd2f63b 100644 --- a/common/repositories/base/base_tributes_repository.h +++ b/common/repositories/base/base_tributes_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_TRIBUTES_REPOSITORY_H @@ -63,21 +46,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("tributes"); @@ -97,7 +65,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_veteran_reward_templates_repository.h b/common/repositories/base/base_veteran_reward_templates_repository.h index 9a25e2b96..f41c1da3c 100644 --- a/common/repositories/base/base_veteran_reward_templates_repository.h +++ b/common/repositories/base/base_veteran_reward_templates_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_VETERAN_REWARD_TEMPLATES_REPOSITORY_H @@ -63,21 +46,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("veteran_reward_templates"); @@ -97,7 +65,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/common/repositories/base/base_zone_points_repository.h b/common/repositories/base/base_zone_points_repository.h index 92cdaf7f8..e34d9bafb 100644 --- a/common/repositories/base/base_zone_points_repository.h +++ b/common/repositories/base/base_zone_points_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_ZONE_POINTS_REPOSITORY_H @@ -101,21 +84,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("zone_points"); @@ -135,7 +103,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -303,6 +271,7 @@ public: { std::vector insert_values; + insert_values.push_back(std::to_string(zone_points_entry.id)); insert_values.push_back("'" + EscapeString(zone_points_entry.zone) + "'"); insert_values.push_back(std::to_string(zone_points_entry.version)); insert_values.push_back(std::to_string(zone_points_entry.number)); @@ -355,6 +324,7 @@ public: for (auto &zone_points_entry: zone_points_entries) { std::vector insert_values; + insert_values.push_back(std::to_string(zone_points_entry.id)); insert_values.push_back("'" + EscapeString(zone_points_entry.zone) + "'"); insert_values.push_back(std::to_string(zone_points_entry.version)); insert_values.push_back(std::to_string(zone_points_entry.number)); diff --git a/common/repositories/base/base_zone_repository.h b/common/repositories/base/base_zone_repository.h index 7e2066d42..f31b98491 100644 --- a/common/repositories/base/base_zone_repository.h +++ b/common/repositories/base/base_zone_repository.h @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_ZONE_REPOSITORY_H @@ -235,21 +218,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("zone"); @@ -269,7 +237,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } @@ -639,6 +607,7 @@ public: std::vector insert_values; insert_values.push_back("'" + EscapeString(zone_entry.short_name) + "'"); + insert_values.push_back(std::to_string(zone_entry.id)); insert_values.push_back("'" + EscapeString(zone_entry.file_name) + "'"); insert_values.push_back("'" + EscapeString(zone_entry.long_name) + "'"); insert_values.push_back("'" + EscapeString(zone_entry.map_file_name) + "'"); @@ -758,6 +727,7 @@ public: std::vector insert_values; insert_values.push_back("'" + EscapeString(zone_entry.short_name) + "'"); + insert_values.push_back(std::to_string(zone_entry.id)); insert_values.push_back("'" + EscapeString(zone_entry.file_name) + "'"); insert_values.push_back("'" + EscapeString(zone_entry.long_name) + "'"); insert_values.push_back("'" + EscapeString(zone_entry.map_file_name) + "'"); diff --git a/common/repositories/template/base_repository.template b/common/repositories/template/base_repository.template index 9bf695b1a..8b1695049 100644 --- a/common/repositories/template/base_repository.template +++ b/common/repositories/template/base_repository.template @@ -1,29 +1,12 @@ /** - * EQEmulator: Everquest Server Emulator - * Copyright (C) 2001-2020 EQEmulator Development Team (https://github.com/EQEmu/Server) + * DO NOT MODIFY THIS FILE * - * 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 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 + * 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 + * + * @generator ./utils/scripts/generators/repository-generator.pl + * @docs https://eqemu.gitbook.io/server/in-development/developer-area/repositories */ #ifndef EQEMU_BASE_{{TABLE_NAME_UPPER}}_REPOSITORY_H @@ -55,21 +38,6 @@ public: return std::string(implode(", ", Columns())); } - static std::string InsertColumnsRaw() - { - std::vector 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("{{TABLE_NAME_VAR}}"); @@ -89,7 +57,7 @@ public: return fmt::format( "INSERT INTO {} ({}) ", TableName(), - InsertColumnsRaw() + ColumnsRaw() ); } diff --git a/utils/scripts/generators/repository-generator.pl b/utils/scripts/generators/repository-generator.pl index 193bd1c37..838642b98 100644 --- a/utils/scripts/generators/repository-generator.pl +++ b/utils/scripts/generators/repository-generator.pl @@ -266,17 +266,15 @@ foreach my $table_to_generate (@tables) { ); } - # insert one - if ($extra ne "auto_increment") { - my $value = sprintf("\"'\" + EscapeString(%s_entry.%s) + \"'\"", $table_name, $column_name); - if ($data_type =~ /int|float|double|decimal/) { - $value = sprintf('std::to_string(%s_entry.%s)', $table_name, $column_name); - } - - $insert_one_entries .= sprintf("\t\tinsert_values.push_back(%s);\n", $value); - $insert_many_entries .= sprintf("\t\t\tinsert_values.push_back(%s);\n", $value); + # insert + my $value = sprintf("\"'\" + EscapeString(%s_entry.%s) + \"'\"", $table_name, $column_name); + if ($data_type =~ /int|float|double|decimal/) { + $value = sprintf('std::to_string(%s_entry.%s)', $table_name, $column_name); } + $insert_one_entries .= sprintf("\t\tinsert_values.push_back(%s);\n", $value); + $insert_many_entries .= sprintf("\t\t\tinsert_values.push_back(%s);\n", $value); + # find one / all (select) if ($data_type =~ /int/) { $all_entries .= sprintf("\t\t\tentry.%-${longest_column_length}s = atoi(row[%s]);\n", $column_name, $index);