fix: include benchmark games in device filter and exclude soft-deleted entries from search
Task 10: Device filter now combines games with platform support entries AND games with performance entries for the selected hardware, instead of only checking gamePlatformSupport. This ensures games that have benchmarks but no explicit platform support entry still appear in filtered results. Task 11: The benchmark count query (bCounts) in unified search now filters out soft-deleted performance entries using isRemoved = false. The pCounts and perfStats queries already had this filter; only bCounts was missing it.
This commit is contained in:
@@ -104,7 +104,12 @@ export const searchUnifiedRoutes = new Elysia({ prefix: "/search" }).get(
|
||||
gameVersions,
|
||||
eq(performanceEntries.versionId, gameVersions.id),
|
||||
)
|
||||
.where(inArray(gameVersions.gameId, localGameIds))
|
||||
.where(
|
||||
and(
|
||||
inArray(gameVersions.gameId, localGameIds),
|
||||
eq(performanceEntries.isRemoved, false),
|
||||
),
|
||||
)
|
||||
.groupBy(gameVersions.gameId),
|
||||
db
|
||||
.select({
|
||||
|
||||
Reference in New Issue
Block a user