mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-07-09 03:04:24 -04:00
Add comments to SqliteItemRepository to help out whoever is next
This commit is contained in:
parent
a356c1417a
commit
490e22c790
@ -4712,9 +4712,21 @@ namespace Emby.Server.Implementations.Data
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
var paramName = "@HasAnyProviderId" + index;
|
// TODO this seems to be an idea for a better schema where ProviderIds are their own table
|
||||||
|
// buut this is not implemented
|
||||||
//hasProviderIds.Add("(COALESCE((select value from ProviderIds where ItemId=Guid and Name = '" + pair.Key + "'), '') <> " + paramName + ")");
|
//hasProviderIds.Add("(COALESCE((select value from ProviderIds where ItemId=Guid and Name = '" + pair.Key + "'), '') <> " + paramName + ")");
|
||||||
|
|
||||||
|
// TODO this is a really BAD way to do it since the pair:
|
||||||
|
// Tmdb, 1234 matches Tmdb=1234 but also Tmdb=1234567
|
||||||
|
// and maybe even NotTmdb=1234.
|
||||||
|
|
||||||
|
// this is a placeholder for this specific pair to correlate it in the bigger query
|
||||||
|
var paramName = "@HasAnyProviderId" + index;
|
||||||
|
|
||||||
|
// this is a search for the placeholder
|
||||||
hasProviderIds.Add("ProviderIds like " + paramName + "");
|
hasProviderIds.Add("ProviderIds like " + paramName + "");
|
||||||
|
|
||||||
|
// this replaces the placeholder with a value, here: %key=val%
|
||||||
if (statement != null)
|
if (statement != null)
|
||||||
{
|
{
|
||||||
statement.TryBind(paramName, "%" + pair.Key + "=" + pair.Value + "%");
|
statement.TryBind(paramName, "%" + pair.Key + "=" + pair.Value + "%");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user