© 2026 Hedgehog Software, LLC

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

Functional Indexes

So working with PlanetScale and have a query that checks for LOWER(city) and LOWER(state) to handle user input. How can I use Drizzle-orm to create the composite functional index. I've tried a bunch of variations like the below but no luck.

stateCityIdx: index("state_city_idx").on(
sql
(LOWER(${table.city}) LOWER(${table.state}))
(LOWER(${table.city}) LOWER(${table.state}))
,
),
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

Find needed indexes
Drizzle TeamDTDrizzle Team / help
2y ago
indexes with pgTable deprecated
Drizzle TeamDTDrizzle Team / help
15mo ago
postgres schema indexes INCLUDE
Drizzle TeamDTDrizzle Team / help
2y ago
drizzle migration shows 0 indexes
Drizzle TeamDTDrizzle Team / help
3y ago