|
|
@ -130,6 +130,7 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
|
|
|
|
|
|
|
|
|
|
|
"create table if not exists TypedBaseItems (guid GUID primary key, type TEXT, data BLOB, ParentId GUID)",
|
|
|
|
"create table if not exists TypedBaseItems (guid GUID primary key, type TEXT, data BLOB, ParentId GUID)",
|
|
|
|
"create index if not exists idx_TypedBaseItems on TypedBaseItems(guid)",
|
|
|
|
"create index if not exists idx_TypedBaseItems on TypedBaseItems(guid)",
|
|
|
|
|
|
|
|
"create index if not exists idx_PathTypedBaseItems on TypedBaseItems(Path)",
|
|
|
|
"create index if not exists idx_ParentIdTypedBaseItems on TypedBaseItems(ParentId)",
|
|
|
|
"create index if not exists idx_ParentIdTypedBaseItems on TypedBaseItems(ParentId)",
|
|
|
|
|
|
|
|
|
|
|
|
"create table if not exists AncestorIds (ItemId GUID, AncestorId GUID, AncestorIdText TEXT, PRIMARY KEY (ItemId, AncestorId))",
|
|
|
|
"create table if not exists AncestorIds (ItemId GUID, AncestorId GUID, AncestorIdText TEXT, PRIMARY KEY (ItemId, AncestorId))",
|
|
|
@ -1804,6 +1805,12 @@ namespace MediaBrowser.Server.Implementations.Persistence
|
|
|
|
cmd.Parameters.Add(cmd, "@ParentId", DbType.Guid).Value = query.ParentId.Value;
|
|
|
|
cmd.Parameters.Add(cmd, "@ParentId", DbType.Guid).Value = query.ParentId.Value;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!string.IsNullOrWhiteSpace(query.Path))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
whereClauses.Add("Path=@Path");
|
|
|
|
|
|
|
|
cmd.Parameters.Add(cmd, "@Path", DbType.String).Value = query.Path;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (query.MinEndDate.HasValue)
|
|
|
|
if (query.MinEndDate.HasValue)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
whereClauses.Add("EndDate>=@MinEndDate");
|
|
|
|
whereClauses.Add("EndDate>=@MinEndDate");
|
|
|
|