Properly dispose prepared statements

This commit is contained in:
Bond_009
2023-04-13 01:50:57 +02:00
parent 218b819a9f
commit b69abd4d7d
2 changed files with 39 additions and 72 deletions

View File

@@ -166,18 +166,6 @@ namespace Emby.Server.Implementations.Data
public IStatement PrepareStatement(IDatabaseConnection connection, string sql)
=> connection.PrepareStatement(sql);
public IStatement[] PrepareAll(IDatabaseConnection connection, IReadOnlyList<string> sql)
{
int len = sql.Count;
IStatement[] statements = new IStatement[len];
for (int i = 0; i < len; i++)
{
statements[i] = connection.PrepareStatement(sql[i]);
}
return statements;
}
protected bool TableExists(ManagedConnection connection, string name)
{
return connection.RunInTransaction(