mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-18 23:13:06 +03:00
Properly dispose prepared statements
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user