mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-28 09:17:15 +00:00
Repository tweaks [skip ci]
This commit is contained in:
@@ -20,8 +20,8 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* This repository was automatically generated on Apr 5, 2020 and is NOT
|
||||
* to be modified directly. Any repository modifications are meant to be made to
|
||||
* This repository was automatically generated and is NOT to be modified directly.
|
||||
* Any repository modifications are meant to be made to
|
||||
* the repository extending the base. Any modifications to base repositories are to
|
||||
* be made by the generator only
|
||||
*/
|
||||
@@ -43,7 +43,7 @@ public:
|
||||
|
||||
static std::string PrimaryKey()
|
||||
{
|
||||
return std::string("instance_id");
|
||||
return std::string("id");
|
||||
}
|
||||
|
||||
static std::vector<std::string> Columns()
|
||||
@@ -117,7 +117,7 @@ public:
|
||||
)
|
||||
{
|
||||
for (auto &respawn_times : respawn_timess) {
|
||||
if (respawn_times.instance_id == respawn_times_id) {
|
||||
if (respawn_times.id == respawn_times_id) {
|
||||
return respawn_times;
|
||||
}
|
||||
}
|
||||
@@ -176,8 +176,10 @@ public:
|
||||
|
||||
auto columns = Columns();
|
||||
|
||||
update_values.push_back(columns[0] + " = " + std::to_string(respawn_times_entry.id));
|
||||
update_values.push_back(columns[1] + " = " + std::to_string(respawn_times_entry.start));
|
||||
update_values.push_back(columns[2] + " = " + std::to_string(respawn_times_entry.duration));
|
||||
update_values.push_back(columns[3] + " = " + std::to_string(respawn_times_entry.instance_id));
|
||||
|
||||
auto results = database.QueryDatabase(
|
||||
fmt::format(
|
||||
@@ -185,7 +187,7 @@ public:
|
||||
TableName(),
|
||||
implode(", ", update_values),
|
||||
PrimaryKey(),
|
||||
respawn_times_entry.instance_id
|
||||
respawn_times_entry.id
|
||||
)
|
||||
);
|
||||
|
||||
@@ -198,8 +200,10 @@ public:
|
||||
{
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
insert_values.push_back(std::to_string(respawn_times_entry.id));
|
||||
insert_values.push_back(std::to_string(respawn_times_entry.start));
|
||||
insert_values.push_back(std::to_string(respawn_times_entry.duration));
|
||||
insert_values.push_back(std::to_string(respawn_times_entry.instance_id));
|
||||
|
||||
auto results = database.QueryDatabase(
|
||||
fmt::format(
|
||||
@@ -228,8 +232,10 @@ public:
|
||||
for (auto &respawn_times_entry: respawn_times_entries) {
|
||||
std::vector<std::string> insert_values;
|
||||
|
||||
insert_values.push_back(std::to_string(respawn_times_entry.id));
|
||||
insert_values.push_back(std::to_string(respawn_times_entry.start));
|
||||
insert_values.push_back(std::to_string(respawn_times_entry.duration));
|
||||
insert_values.push_back(std::to_string(respawn_times_entry.instance_id));
|
||||
|
||||
insert_chunks.push_back("(" + implode(",", insert_values) + ")");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user