Make PreparedStatements static for each database.

This commit is contained in:
hondacrx
2023-02-04 20:55:14 -05:00
parent e0e20b6b1c
commit 149fadccab
90 changed files with 922 additions and 923 deletions
@@ -77,7 +77,7 @@ namespace Game.DataStorage
void LoadFromDB(bool custom, HotfixStatements preparedStatement)
{
// Even though this query is executed only once, prepared statement is used to send data from mysql server in binary format
PreparedStatement stmt = DB.Hotfix.GetPreparedStatement(preparedStatement);
PreparedStatement stmt = HotfixDatabase.GetPreparedStatement(preparedStatement);
stmt.AddValue(0, !custom);
SQLResult result = DB.Hotfix.Query(stmt);
if (result.IsEmpty())
@@ -230,7 +230,7 @@ namespace Game.DataStorage
void LoadStringsFromDB(bool custom, Locale locale, HotfixStatements preparedStatement)
{
PreparedStatement stmt = DB.Hotfix.GetPreparedStatement(preparedStatement);
PreparedStatement stmt = HotfixDatabase.GetPreparedStatement(preparedStatement);
stmt.AddValue(0, !custom);
stmt.AddValue(1, locale.ToString());
SQLResult result = DB.Hotfix.Query(stmt);