© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Drizzle TeamDT
Drizzle Team•2y ago•
2 replies
Matt

D1_ERROR: near \"ilike\":

Can anyone spot what I'm doing wrong?

Drizzle:
export async function searchByFontFamilyName(db: DB, search: string) {
  return db
    .select({
      family: table_fonts.family,
    })
    .from(table_fonts)
    .where(
      ilike(table_fonts.family, `%${search}%`), // search: "nato"
    );
}
export async function searchByFontFamilyName(db: DB, search: string) {
  return db
    .select({
      family: table_fonts.family,
    })
    .from(table_fonts)
    .where(
      ilike(table_fonts.family, `%${search}%`), // search: "nato"
    );
}

Logs this output:
Query: select "family" from "fonts" where "fonts"."family" ilike ? -- params: ["%nato%"]
Query: select "family" from "fonts" where "fonts"."family" ilike ? -- params: ["%nato%"]

I get this error:
D1_ERROR: near \"ilike\": syntax error at offset 66
D1_ERROR: near \"ilike\": syntax error at offset 66
Drizzle TeamJoin
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
11,879Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

SQLITE_ERROR: near "ilike": syntax error
Drizzle TeamDTDrizzle Team / help
3y ago
D1_ERROR: near "in": syntax error at offset 153
Drizzle TeamDTDrizzle Team / help
2y ago
error with ILIKE on libsql
Drizzle TeamDTDrizzle Team / help
3y ago
`ilike` in sqlite
Drizzle TeamDTDrizzle Team / help
2y ago