Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Repositories] Insert repository improvements #1236

Merged
merged 3 commits into from
Feb 9, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 2 additions & 36 deletions common/repositories/base/base_aa_ability_repository.h
Original file line number Diff line number Diff line change
@@ -1,25 +1,6 @@
/**
* 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
Expand Down Expand Up @@ -81,21 +62,6 @@ class BaseAaAbilityRepository {
return std::string(implode(", ", Columns()));
}

static std::string InsertColumnsRaw()
{
std::vector<std::string> insert_columns;

for (auto &column : Columns()) {
if (column == PrimaryKey()) {
continue;
}

insert_columns.push_back(column);
}

return std::string(implode(", ", insert_columns));
}

static std::string TableName()
{
return std::string("aa_ability");
Expand All @@ -115,7 +81,7 @@ class BaseAaAbilityRepository {
return fmt::format(
"INSERT INTO {} ({}) ",
TableName(),
InsertColumnsRaw()
ColumnsRaw()
);
}

Expand Down
38 changes: 2 additions & 36 deletions common/repositories/base/base_aa_rank_effects_repository.h
Original file line number Diff line number Diff line change
@@ -1,25 +1,6 @@
/**
* 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
Expand Down Expand Up @@ -63,21 +44,6 @@ class BaseAaRankEffectsRepository {
return std::string(implode(", ", Columns()));
}

static std::string InsertColumnsRaw()
{
std::vector<std::string> insert_columns;

for (auto &column : Columns()) {
if (column == PrimaryKey()) {
continue;
}

insert_columns.push_back(column);
}

return std::string(implode(", ", insert_columns));
}

static std::string TableName()
{
return std::string("aa_rank_effects");
Expand All @@ -97,7 +63,7 @@ class BaseAaRankEffectsRepository {
return fmt::format(
"INSERT INTO {} ({}) ",
TableName(),
InsertColumnsRaw()
ColumnsRaw()
);
}

Expand Down
38 changes: 2 additions & 36 deletions common/repositories/base/base_aa_rank_prereqs_repository.h
Original file line number Diff line number Diff line change
@@ -1,25 +1,6 @@
/**
* 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
Expand Down Expand Up @@ -59,21 +40,6 @@ class BaseAaRankPrereqsRepository {
return std::string(implode(", ", Columns()));
}

static std::string InsertColumnsRaw()
{
std::vector<std::string> insert_columns;

for (auto &column : Columns()) {
if (column == PrimaryKey()) {
continue;
}

insert_columns.push_back(column);
}

return std::string(implode(", ", insert_columns));
}

static std::string TableName()
{
return std::string("aa_rank_prereqs");
Expand All @@ -93,7 +59,7 @@ class BaseAaRankPrereqsRepository {
return fmt::format(
"INSERT INTO {} ({}) ",
TableName(),
InsertColumnsRaw()
ColumnsRaw()
);
}

Expand Down
38 changes: 2 additions & 36 deletions common/repositories/base/base_aa_ranks_repository.h
Original file line number Diff line number Diff line change
@@ -1,25 +1,6 @@
/**
* 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
Expand Down Expand Up @@ -79,21 +60,6 @@ class BaseAaRanksRepository {
return std::string(implode(", ", Columns()));
}

static std::string InsertColumnsRaw()
{
std::vector<std::string> insert_columns;

for (auto &column : Columns()) {
if (column == PrimaryKey()) {
continue;
}

insert_columns.push_back(column);
}

return std::string(implode(", ", insert_columns));
}

static std::string TableName()
{
return std::string("aa_ranks");
Expand All @@ -113,7 +79,7 @@ class BaseAaRanksRepository {
return fmt::format(
"INSERT INTO {} ({}) ",
TableName(),
InsertColumnsRaw()
ColumnsRaw()
);
}

Expand Down
38 changes: 2 additions & 36 deletions common/repositories/base/base_account_flags_repository.h
Original file line number Diff line number Diff line change
@@ -1,25 +1,6 @@
/**
* 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
Expand Down Expand Up @@ -59,21 +40,6 @@ class BaseAccountFlagsRepository {
return std::string(implode(", ", Columns()));
}

static std::string InsertColumnsRaw()
{
std::vector<std::string> insert_columns;

for (auto &column : Columns()) {
if (column == PrimaryKey()) {
continue;
}

insert_columns.push_back(column);
}

return std::string(implode(", ", insert_columns));
}

static std::string TableName()
{
return std::string("account_flags");
Expand All @@ -93,7 +59,7 @@ class BaseAccountFlagsRepository {
return fmt::format(
"INSERT INTO {} ({}) ",
TableName(),
InsertColumnsRaw()
ColumnsRaw()
);
}

Expand Down
38 changes: 2 additions & 36 deletions common/repositories/base/base_account_ip_repository.h
Original file line number Diff line number Diff line change
@@ -1,25 +1,6 @@
/**
* 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
Expand Down Expand Up @@ -61,21 +42,6 @@ class BaseAccountIpRepository {
return std::string(implode(", ", Columns()));
}

static std::string InsertColumnsRaw()
{
std::vector<std::string> insert_columns;

for (auto &column : Columns()) {
if (column == PrimaryKey()) {
continue;
}

insert_columns.push_back(column);
}

return std::string(implode(", ", insert_columns));
}

static std::string TableName()
{
return std::string("account_ip");
Expand All @@ -95,7 +61,7 @@ class BaseAccountIpRepository {
return fmt::format(
"INSERT INTO {} ({}) ",
TableName(),
InsertColumnsRaw()
ColumnsRaw()
);
}

Expand Down
Loading