mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-08-27 04:16:47 +00:00
Properly dispose prepared statements
This commit is contained in:
parent
218b819a9f
commit
b69abd4d7d
2 changed files with 39 additions and 72 deletions
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue