this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

filters

+3 -8
+3 -8
src/data/db.ts
··· 1 - import { SQL, like, sql } from "drizzle-orm"; 1 + import { ilike, sql } from "drizzle-orm"; 2 2 import { drizzle } from "drizzle-orm/libsql"; 3 3 import * as schema from "./schema"; 4 4 ··· 37 37 name: true, 38 38 dexId: true, 39 39 }, 40 - where: (pokemon, { ilike }) => 41 - ilike(pokemon.name, sql.placeholder("nameFilter")), 40 + where: (pokemon, { sql }) => 41 + sql`lower(${pokemon.name}) like lower(${sql.placeholder("nameFilter")})`, 42 42 orderBy: (pokemon, { asc }) => [asc(pokemon.dexId)], 43 43 limit: sql.placeholder("limit"), 44 44 offset: sql.placeholder("offset"), ··· 81 81 }, 82 82 }, 83 83 }; 84 - 85 - // custom lower function 86 - export function lower(email: AnySQLiteColumn): SQL { 87 - return sql`lower(${email})`; 88 - }