How can i implement ilike in sqlite?

sql`lower(${Recipe.title}) like '%${filters.search.toLowerCase()}%'`
throws an error in turso

"LibsqlError: ARGS_INVALID: Arguments do not match SQL parameters: too many parameters, expected 1 found 2".

Alternatively is there a way i can reference selected fields? for example if i select

titleLower: sql<string>`lower(${Recipe.title})`.as('titleLower')


is there a way i can reference this in a where clause? I know with Kysely you can easily do that but haven't found an answer with drizzle
Was this page helpful?