|
@@ -219,7 +219,8 @@ namespace Emby.Server.Implementations.Data
|
|
|
{
|
|
|
connection.RunQueries(queries);
|
|
|
|
|
|
- connection.RunInTransaction(db =>
|
|
|
+ connection.RunInTransaction(
|
|
|
+ db =>
|
|
|
{
|
|
|
var existingColumnNames = GetColumnNames(db, "AncestorIds");
|
|
|
AddColumn(db, "AncestorIds", "AncestorIdText", "Text", existingColumnNames);
|
|
@@ -495,7 +496,8 @@ namespace Emby.Server.Implementations.Data
|
|
|
|
|
|
using (var connection = GetConnection())
|
|
|
{
|
|
|
- connection.RunInTransaction(db =>
|
|
|
+ connection.RunInTransaction(
|
|
|
+ db =>
|
|
|
{
|
|
|
using (var saveImagesStatement = base.PrepareStatement(db, "Update TypedBaseItems set Images=@Images where guid=@Id"))
|
|
|
{
|
|
@@ -546,7 +548,8 @@ namespace Emby.Server.Implementations.Data
|
|
|
|
|
|
using (var connection = GetConnection())
|
|
|
{
|
|
|
- connection.RunInTransaction(db =>
|
|
|
+ connection.RunInTransaction(
|
|
|
+ db =>
|
|
|
{
|
|
|
SaveItemsInTranscation(db, tuples);
|
|
|
}, TransactionMode);
|
|
@@ -2032,7 +2035,8 @@ namespace Emby.Server.Implementations.Data
|
|
|
|
|
|
using (var connection = GetConnection())
|
|
|
{
|
|
|
- connection.RunInTransaction(db =>
|
|
|
+ connection.RunInTransaction(
|
|
|
+ db =>
|
|
|
{
|
|
|
// First delete chapters
|
|
|
db.Execute("delete from " + ChaptersTableName + " where ItemId=@ItemId", idBlob);
|
|
@@ -2263,7 +2267,6 @@ namespace Emby.Server.Implementations.Data
|
|
|
return query.IncludeItemTypes.Contains("Trailer", StringComparer.OrdinalIgnoreCase);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
private static readonly HashSet<string> _artistExcludeParentTypes = new HashSet<string>(StringComparer.OrdinalIgnoreCase)
|
|
|
{
|
|
|
"Series",
|
|
@@ -2922,7 +2925,8 @@ namespace Emby.Server.Implementations.Data
|
|
|
var result = new QueryResult<BaseItem>();
|
|
|
using (var connection = GetConnection(true))
|
|
|
{
|
|
|
- connection.RunInTransaction(db =>
|
|
|
+ connection.RunInTransaction(
|
|
|
+ db =>
|
|
|
{
|
|
|
var statements = PrepareAll(db, statementTexts);
|
|
|
|
|
@@ -3291,7 +3295,6 @@ namespace Emby.Server.Implementations.Data
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
var isReturningZeroItems = query.Limit.HasValue && query.Limit <= 0;
|
|
|
|
|
|
var statementTexts = new List<string>();
|
|
@@ -3326,7 +3329,8 @@ namespace Emby.Server.Implementations.Data
|
|
|
var result = new QueryResult<Guid>();
|
|
|
using (var connection = GetConnection(true))
|
|
|
{
|
|
|
- connection.RunInTransaction(db =>
|
|
|
+ connection.RunInTransaction(
|
|
|
+ db =>
|
|
|
{
|
|
|
var statements = PrepareAll(db, statementTexts);
|
|
|
|
|
@@ -4901,7 +4905,8 @@ where AncestorIdText not null and ItemValues.Value not null and ItemValues.Type
|
|
|
|
|
|
using (var connection = GetConnection())
|
|
|
{
|
|
|
- connection.RunInTransaction(db =>
|
|
|
+ connection.RunInTransaction(
|
|
|
+ db =>
|
|
|
{
|
|
|
connection.ExecuteAll(sql);
|
|
|
}, TransactionMode);
|
|
@@ -4952,7 +4957,8 @@ where AncestorIdText not null and ItemValues.Value not null and ItemValues.Type
|
|
|
|
|
|
using (var connection = GetConnection())
|
|
|
{
|
|
|
- connection.RunInTransaction(db =>
|
|
|
+ connection.RunInTransaction(
|
|
|
+ db =>
|
|
|
{
|
|
|
var idBlob = id.ToByteArray();
|
|
|
|
|
@@ -5359,7 +5365,7 @@ where AncestorIdText not null and ItemValues.Value not null and ItemValues.Type
|
|
|
|
|
|
itemCountColumns = new Dictionary<string, string>()
|
|
|
{
|
|
|
- { "itemTypes", "(" + itemCountColumnQuery + ") as itemTypes"}
|
|
|
+ { "itemTypes", "(" + itemCountColumnQuery + ") as itemTypes" }
|
|
|
};
|
|
|
}
|
|
|
|
|
@@ -5746,7 +5752,8 @@ where AncestorIdText not null and ItemValues.Value not null and ItemValues.Type
|
|
|
|
|
|
using (var connection = GetConnection())
|
|
|
{
|
|
|
- connection.RunInTransaction(db =>
|
|
|
+ connection.RunInTransaction(
|
|
|
+ db =>
|
|
|
{
|
|
|
var itemIdBlob = itemId.ToByteArray();
|
|
|
|
|
@@ -5900,7 +5907,8 @@ where AncestorIdText not null and ItemValues.Value not null and ItemValues.Type
|
|
|
|
|
|
using (var connection = GetConnection())
|
|
|
{
|
|
|
- connection.RunInTransaction(db =>
|
|
|
+ connection.RunInTransaction(
|
|
|
+ db =>
|
|
|
{
|
|
|
var itemIdBlob = id.ToByteArray();
|
|
|
|
|
@@ -6006,7 +6014,6 @@ where AncestorIdText not null and ItemValues.Value not null and ItemValues.Type
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
/// <summary>
|
|
|
/// Gets the chapter.
|
|
|
/// </summary>
|
|
@@ -6235,7 +6242,8 @@ where AncestorIdText not null and ItemValues.Value not null and ItemValues.Type
|
|
|
|
|
|
using (var connection = GetConnection())
|
|
|
{
|
|
|
- connection.RunInTransaction(db =>
|
|
|
+ connection.RunInTransaction(
|
|
|
+ db =>
|
|
|
{
|
|
|
var itemIdBlob = id.ToByteArray();
|
|
|
|