[Repository] Add null integer column support, instance_list notes migration, regenerate repositories (#3969)

This commit is contained in:
Chris Miles
2024-01-12 22:23:55 -06:00
committed by GitHub
parent 1238a6ca68
commit 818f833d04
189 changed files with 17218 additions and 3604 deletions
@@ -16,7 +16,6 @@
#include "../../strings.h"
#include <ctime>
class BaseCharacterSpellsRepository {
public:
struct CharacterSpells {
@@ -124,9 +123,9 @@ public:
if (results.RowCount() == 1) {
CharacterSpells e{};
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
e.slot_id = static_cast<uint16_t>(strtoul(row[1], nullptr, 10));
e.spell_id = static_cast<uint16_t>(strtoul(row[2], nullptr, 10));
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
e.slot_id = row[1] ? static_cast<uint16_t>(strtoul(row[1], nullptr, 10)) : 0;
e.spell_id = row[2] ? static_cast<uint16_t>(strtoul(row[2], nullptr, 10)) : 0;
return e;
}
@@ -251,9 +250,9 @@ public:
for (auto row = results.begin(); row != results.end(); ++row) {
CharacterSpells e{};
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
e.slot_id = static_cast<uint16_t>(strtoul(row[1], nullptr, 10));
e.spell_id = static_cast<uint16_t>(strtoul(row[2], nullptr, 10));
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
e.slot_id = row[1] ? static_cast<uint16_t>(strtoul(row[1], nullptr, 10)) : 0;
e.spell_id = row[2] ? static_cast<uint16_t>(strtoul(row[2], nullptr, 10)) : 0;
all_entries.push_back(e);
}
@@ -278,9 +277,9 @@ public:
for (auto row = results.begin(); row != results.end(); ++row) {
CharacterSpells e{};
e.id = static_cast<uint32_t>(strtoul(row[0], nullptr, 10));
e.slot_id = static_cast<uint16_t>(strtoul(row[1], nullptr, 10));
e.spell_id = static_cast<uint16_t>(strtoul(row[2], nullptr, 10));
e.id = row[0] ? static_cast<uint32_t>(strtoul(row[0], nullptr, 10)) : 0;
e.slot_id = row[1] ? static_cast<uint16_t>(strtoul(row[1], nullptr, 10)) : 0;
e.spell_id = row[2] ? static_cast<uint16_t>(strtoul(row[2], nullptr, 10)) : 0;
all_entries.push_back(e);
}