feat(Core/Database): port TrinityCore database API (#5611)

This commit is contained in:
Kargatum
2021-06-22 11:21:07 +07:00
committed by GitHub
parent 2a2e54d8c5
commit 9ac6fddcae
155 changed files with 5818 additions and 4321 deletions

View File

@@ -1333,7 +1333,7 @@ public:
limit = limitStr ? atoi(limitStr) : -1;
}
PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_ACCOUNT_BY_IP);
LoginDatabasePreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_ACCOUNT_BY_IP);
stmt->setString(0, ip);
PreparedQueryResult result = LoginDatabase.Query(stmt);
@@ -1353,7 +1353,7 @@ public:
(account))
return false;
PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_ACCOUNT_LIST_BY_NAME);
LoginDatabasePreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_ACCOUNT_LIST_BY_NAME);
stmt->setString(0, account);
PreparedQueryResult result = LoginDatabase.Query(stmt);
@@ -1369,7 +1369,7 @@ public:
char* limitStr = strtok(nullptr, " ");
int32 limit = limitStr ? atoi(limitStr) : -1;
PreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_ACCOUNT_LIST_BY_EMAIL);
LoginDatabasePreparedStatement* stmt = LoginDatabase.GetPreparedStatement(LOGIN_SEL_ACCOUNT_LIST_BY_EMAIL);
stmt->setString(0, email);
PreparedQueryResult result = LoginDatabase.Query(stmt);
@@ -1404,7 +1404,7 @@ public:
uint32 accountId = fields[0].GetUInt32();
std::string accountName = fields[1].GetString();
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHAR_GUID_NAME_BY_ACC);
CharacterDatabasePreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_CHAR_GUID_NAME_BY_ACC);
stmt->setUInt32(0, accountId);
PreparedQueryResult result2 = CharacterDatabase.Query(stmt);