mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-16 22:13:06 +03:00
update queries
This commit is contained in:
@@ -89,11 +89,12 @@ namespace Emby.Server.Implementations.Data
|
||||
{
|
||||
connection.RunInTransaction(db =>
|
||||
{
|
||||
var commandText = "replace into users (guid, data) values (?, ?)";
|
||||
|
||||
db.Execute(commandText,
|
||||
user.Id.ToGuidParamValue(),
|
||||
serialized);
|
||||
using (var statement = db.PrepareStatement("replace into users (guid, data) values (@guid, @data)"))
|
||||
{
|
||||
statement.BindParameters.TryBind("@guid", user.Id.ToGuidParamValue());
|
||||
statement.BindParameters.TryBind("@data", serialized);
|
||||
statement.MoveNext();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -151,10 +152,11 @@ namespace Emby.Server.Implementations.Data
|
||||
{
|
||||
connection.RunInTransaction(db =>
|
||||
{
|
||||
var commandText = "delete from users where guid=?";
|
||||
|
||||
db.Execute(commandText,
|
||||
user.Id.ToGuidParamValue());
|
||||
using (var statement = db.PrepareStatement("delete from users where guid=@id"))
|
||||
{
|
||||
statement.BindParameters.TryBind("@id", user.Id.ToGuidParamValue());
|
||||
statement.MoveNext();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user