feat: rearrange game benchmark wizard and improve overall

This commit is contained in:
2026-05-01 01:18:13 +08:00
parent 293aadbff0
commit 824fbbd13f
22 changed files with 722 additions and 143 deletions
+3 -1
View File
@@ -8,6 +8,7 @@ import {
hardware,
} from "@/lib/db/schema"
import { ilike, or, sql, eq, and, desc, asc, inArray, gte, lte } from "drizzle-orm"
import { fuzzySearchTerm } from "@/lib/db/search"
const MAX_OFFSET = 10000
const PAGE_SIZE = 24
@@ -39,10 +40,11 @@ export const gamesListingRoutes = new Elysia({ prefix: "/games/listing" }).get(
// Search filter (title, developer, publisher)
if (search) {
const titleTerm = fuzzySearchTerm(search)
const term = `%${search}%`
conditions.push(
or(
ilike(games.title, term),
ilike(games.title, titleTerm),
ilike(games.developer, term),
ilike(games.publisher, term),
)!,