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
+4 -4
View File
@@ -100,7 +100,7 @@ namespace Game.Chat.Commands
break;
}
PreparedStatement stmt = DB.World.GetPreparedStatement(WorldStatements.SEL_DISABLES);
PreparedStatement stmt = WorldDatabase.GetPreparedStatement(WorldStatements.SEL_DISABLES);
stmt.AddValue(0, entry);
stmt.AddValue(1, (byte)disableType);
SQLResult result = DB.World.Query(stmt);
@@ -110,7 +110,7 @@ namespace Game.Chat.Commands
return false;
}
stmt = DB.World.GetPreparedStatement(WorldStatements.INS_DISABLES);
stmt = WorldDatabase.GetPreparedStatement(WorldStatements.INS_DISABLES);
stmt.AddValue(0, entry);
stmt.AddValue(1, (byte)disableType);
stmt.AddValue(2, flags);
@@ -178,7 +178,7 @@ namespace Game.Chat.Commands
if (entry == 0)
return false;
PreparedStatement stmt = DB.World.GetPreparedStatement(WorldStatements.SEL_DISABLES);
PreparedStatement stmt = WorldDatabase.GetPreparedStatement(WorldStatements.SEL_DISABLES);
stmt.AddValue(0, entry);
stmt.AddValue(1, (byte)disableType);
SQLResult result = DB.World.Query(stmt);
@@ -188,7 +188,7 @@ namespace Game.Chat.Commands
return false;
}
stmt = DB.World.GetPreparedStatement(WorldStatements.DEL_DISABLES);
stmt = WorldDatabase.GetPreparedStatement(WorldStatements.DEL_DISABLES);
stmt.AddValue(0, entry);
stmt.AddValue(1, (byte)disableType);
DB.World.Execute(stmt);